/* =====================================================
   RESPONSIVE DESIGN & NAVBAR MODERN
   ===================================================== */

/* NAVBAR MODERN */
.navbar-modern {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(141, 198, 63, 0.15);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-swift);
    border-bottom: 3px solid var(--primary);
}

.navbar-modern.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-medium);
}

.navbar-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: var(--space-xl);
}

.navbar-brand {
    flex-shrink: 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary);
    transition: var(--transition-soft);
}

.brand-link:hover {
    transform: scale(1.05);
}

.navbar-brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Navigation Menu */
.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 10px 12px;
    position: relative;
    transition: var(--transition-swift);
    color: var(--accent);
    border-radius: var(--radius-soft);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition-swift);
}

.nav-link:hover::after,
.nav-item:hover > .nav-link::after {
    width: 100%;
}

.nav-link.dropdown-toggle i {
    font-size: 12px;
    transition: var(--transition-swift);
}

.nav-item:hover .nav-link.dropdown-toggle i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-strong);
    border-radius: var(--radius-medium);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-soft);
    z-index: var(--z-dropdown);
    padding: 12px 0;
    margin-top: 12px;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    transition: all var(--transition-swift);
    text-decoration: none;
    font-size: 0.95rem;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.dropdown-item:hover {
    background: rgba(8, 139, 194, 0.08);
    color: var(--primary);
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: var(--medium-gray);
    margin: 8px 0;
}

/* Auth Section */
.navbar-auth {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-large);
    cursor: pointer;
    transition: var(--transition-soft);
}

.user-profile-trigger:hover {
    background: var(--light-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.text-danger {
    color: #dc2626;
}

.text-danger:hover {
    color: #b91c1c;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-swift);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: var(--z-fixed);
    box-shadow: 0 10px 30px rgba(8, 139, 194, 0.3);
    transition: all var(--transition-soft);
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(8, 139, 194, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* LOADING SCREEN */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #008BC2 0%, #78B52F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    animation: fadeOut 0.5s ease-out 2s forwards;
}

.loader-container {
    text-align: center;
    color: var(--white);
}

.loader-rings {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.ring-1 {
    animation-delay: 0s;
}

.ring-2 {
    animation-delay: 0.5s;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.ring-3 {
    animation-delay: 1s;
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
}

.loader-text h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--white);
}

.loader-text p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dots span {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: typing-dots 1.5s infinite;
}

.dots span:nth-child(2) {
    animation-delay: 0.3s;
}

.dots span:nth-child(3) {
    animation-delay: 0.6s;
}

/* FOOTER MODERN */
.modern-footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 60px var(--space-xl) 30px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-brand {
    margin-bottom: 20px;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 16px;
    filter: none;
}

.footer-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-soft);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-item i {
    color: var(--secondary);
    margin-top: 4px;
    flex-shrink: 0;
}

.contact-item a,
.contact-item span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transition: var(--transition-soft);
}

.contact-item a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-soft);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 8px 0;
}

.footer-bottom a {
    color: var(--secondary);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--secondary-light);
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet & Small Devices */
@media (max-width: 1024px) {
    .navbar-container {
        gap: var(--space-md);
    }

    .nav-menu {
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Medium Devices */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 var(--space-lg);
    }

    .nav-menu-wrapper {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        box-shadow: var(--shadow-strong);
        padding: 20px 0;
        max-height: 0;
        overflow: hidden;
        transition: all var(--transition-soft);
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-item {
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-link {
        padding: 12px var(--space-xl);
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        box-shadow: none;
        background: var(--light-gray);
        transform: none;
        overflow: hidden;
        transition: all var(--transition-soft);
    }

    .nav-item.open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 400px;
    }

    .dropdown-item {
        padding: 10px var(--space-xl) 10px calc(var(--space-xl) + 20px);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .navbar-wrapper {
        padding: 0 var(--space-lg);
    }

    .navbar-brand-logo {
        height: 40px;
    }

    .navbar-auth {
        gap: var(--space-sm);
    }

    .auth-buttons {
        gap: 8px;
        flex-direction: column;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .section {
        padding: 40px var(--space-lg);
    }

    .footer-logo {
        height: 40px;
    }

    .footer-bottom {
        font-size: 0.85rem;
    }
}
