/* Global Styles for SoosanEgypt Project */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --accent-color: #4ade80;
    --background-color: #f8fafc;
    --text-color: #111827;
    --text-muted: #6b7280;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-duration: 0.4s;
    --border-radius: 12px;
}

/* Body padding for fixed navbar */
body {
    padding-top: 72px;
    /* Match navbar height */
}

/* Enhanced Navbar Styles for All Pages */
.navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 72px;
    font-size: 1.15rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
}

/* Ensure navbar stays on top */
.navbar.fixed-top {
    z-index: 1050 !important;
}

/* Adjust page header section for fixed navbar */
.bg-white.border-bottom.shadow-sm {
    margin-top: 0;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Icon Navigation Styles */
.icon-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-icon-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    min-width: 60px;
}

.nav-icon-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.05);
    text-decoration: none;
}

.nav-icon-item.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-icon-item:hover .nav-icon {
    transform: scale(1.1);
    animation: iconBounce 0.6s ease;
}

/* Loading state for navigation */
.nav-icon-item.loading .nav-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.nav-icon-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-icon-item:hover .nav-icon-label {
    opacity: 1;
    transform: scale(1.05);
}

/* Icon specific animations */
.nav-icon-item:hover .fa-home {
    animation: homeAnimation 0.6s ease;
}

.nav-icon-item:hover .fa-cogs {
    animation: gearsAnimation 1s ease;
}

.nav-icon-item:hover .fa-search {
    animation: searchAnimation 0.8s ease;
}

.nav-icon-item:hover .fa-user-shield {
    animation: shieldAnimation 0.7s ease;
}

.nav-icon-item:hover .fa-wrench {
    animation: wrenchAnimation 0.8s ease;
}

.nav-icon-item:hover .fa-phone {
    animation: phoneAnimation 0.6s ease;
}

.nav-icon-item:hover .fa-info-circle {
    animation: infoAnimation 0.7s ease;
}

.nav-icon-item:hover .fa-headset {
    animation: supportAnimation 0.8s ease;
}

/* Keyframe animations */
@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1.1);
    }

    50% {
        transform: scale(1.25);
    }
}

@keyframes homeAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    25% {
        transform: scale(1.2) rotate(-5deg);
    }

    75% {
        transform: scale(1.2) rotate(5deg);
    }
}

@keyframes gearsAnimation {

    0%,
    100% {
        transform: scale(1.1) rotate(0deg);
    }

    50% {
        transform: scale(1.25) rotate(180deg);
    }
}

@keyframes searchAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    25% {
        transform: scale(1.2) translateX(-2px);
    }

    75% {
        transform: scale(1.2) translateX(2px);
    }
}

@keyframes shieldAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    50% {
        transform: scale(1.25);
    }

    25% {
        filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.5));
    }

    75% {
        filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.7));
    }
}

@keyframes wrenchAnimation {

    0%,
    100% {
        transform: scale(1.1) rotate(0deg);
    }

    25% {
        transform: scale(1.2) rotate(-15deg);
    }

    75% {
        transform: scale(1.2) rotate(15deg);
    }
}

@keyframes phoneAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    25% {
        transform: scale(1.2) rotate(10deg);
    }

    75% {
        transform: scale(1.2) rotate(-10deg);
    }
}

@keyframes infoAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    50% {
        transform: scale(1.25);
        filter: brightness(1.2);
    }
}

@keyframes supportAnimation {

    0%,
    100% {
        transform: scale(1.1);
    }

    33% {
        transform: scale(1.2) translateY(-2px);
    }

    66% {
        transform: scale(1.2) translateY(2px);
    }
}

/* Active indicator */
.nav-icon-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-icon-item.active::after,
.nav-icon-item:hover::after {
    width: 24px;
}

/* iPhone-style Language Toggle Switch */
.language-toggle-container {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.language-toggle {
    position: relative;
    width: 80px;
    height: 36px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
}

.language-toggle.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.language-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.language-toggle.active .language-toggle-slider {
    transform: translateX(44px);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.language-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    font-size: 11px;
    font-weight: 600;
}

.lang-en {
    color: #64748b;
    transition: all 0.3s ease;
}

.lang-ar {
    color: #64748b;
    transition: all 0.3s ease;
}

.language-toggle.active .lang-en {
    color: rgba(255, 255, 255, 0.8);
}

.language-toggle.active .lang-ar {
    color: rgba(255, 255, 255, 0.8);
}

/* Hover effects */
.language-toggle:hover {
    transform: scale(1.02);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-toggle:active {
    transform: scale(0.98);
}

/* Animation for smooth sliding */
@keyframes slideToggle {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(44px);
    }
}

.language-toggle.active .language-toggle-slider {
    animation: slideToggle 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Navigation Links */
.navbar-nav .nav-link,
.navbar-nav .btn {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
    color: var(--primary-color) !important;
}

.navbar-nav .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Enhanced Buttons and Interactive Elements */
.btn-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.btn-enhanced:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    color: white;
    text-decoration: none;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--accent-color);
}

.btn-secondary:hover {
    background: #22c55e;
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Enhanced Cards */
.card {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.enhanced-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.enhanced-card:hover::before {
    transform: scaleX(1);
}

.enhanced-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Enhanced Form Controls */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.enhanced-form {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    padding: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.field-label {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.field-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-color);
}

.field-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Utility Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-elevated {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--accent-color)) 1;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    .enhanced-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .btn-enhanced {
        background: #333 !important;
    }
}

/* Mobile responsive */
@media (max-width: 991px) {
    .icon-nav {
        flex-direction: column;
        gap: 1rem;
        background: white;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }

    .nav-icon-item {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        padding: 0.75rem;
        gap: 1rem;
    }

    .nav-icon {
        margin-bottom: 0;
        font-size: 1.25rem;
    }

    .nav-icon-label {
        font-size: 0.9rem;
    }

    .nav-icon-item::after {
        display: none;
    }

    .language-toggle-container {
        margin: 1rem 0;
        justify-content: center;
    }

    .language-toggle {
        width: 90px;
        height: 40px;
    }

    .language-toggle-slider {
        width: 34px;
        height: 34px;
    }

    .language-toggle.active .language-toggle-slider {
        transform: translateX(48px);
    }
}

/* Ripple effect styles */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.nav-icon-item {
    position: relative;
    overflow: hidden;
}

@keyframes iconEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.icon-nav .nav-icon-item {
    animation: iconEnter 0.6s ease-out forwards;
    opacity: 0;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Global smooth transitions */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
}

/* Enhanced focus states */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced logout button styling to match nav icons */
.logout-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    min-width: 60px;
    border: none;
    background: none;
    cursor: pointer;
}

.logout-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.05);
}

.logout-btn .nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.logout-btn:hover .nav-icon {
    transform: scale(1.1);
    animation: slideOutRight 0.6s ease;
}

/* Login icon specific styling */
.nav-icon-item[href*="login"]:hover {
    background: rgba(16, 185, 129, 0.05);
    color: var(--accent-color);
}

.nav-icon-item[href*="login"]:hover .nav-icon {
    color: var(--accent-color);
}

/* Slide animations for login/logout */
@keyframes slideOutRight {
    0% {
        transform: translateX(0) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: translateX(5px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateX(10px) scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive navigation for mobile */
@media (max-width: 768px) {
    .icon-nav {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
        margin-top: 1rem;
    }

    .nav-icon-item {
        min-width: 50px;
        padding: 0.4rem;
    }

    .nav-icon {
        font-size: 1.3rem;
    }

    .nav-icon-label {
        font-size: 0.7rem;
    }

    .logout-btn {
        min-width: 50px;
        padding: 0.4rem;
    }

    .logout-btn .nav-icon {
        font-size: 1.3rem;
    }
}