/* ===================================================== */
/* NAVIGATION STYLES - Used across all pages
/* ===================================================== */

/* Base styles needed for navigation */
html {
    overflow-x: hidden;
    height: auto;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    position: relative;
    background-color: #000000;
    overflow-x: hidden;
    min-height: 100vh;
}


body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('../images/background.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    transform: scale(1.05);
    z-index: -1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

/* ===================================================== */
/* NAVBAR - Tech Style with Teal-Navy Gradient */
/* ===================================================== */
.top-navbar {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 0;
    background: transparent;
    z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    pointer-events: none;
}

.navbar-logo {
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    pointer-events: auto;
}

.navbar-logo-img {
    height: 147px;
    width: 147px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 rgba(255, 140, 0, 0);
    transition: transform 0.05s ease, box-shadow 0.5s ease, opacity 1s ease-in-out;
    transform-origin: top left;
    opacity: 0;
}


.navbar-logo-img:hover {
    animation: buildFire 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.navbar-logo-img:not(:hover):not(.shrinking) {
    animation: dieDown 4s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.navbar-logo-img.shrinking:not(:hover) {
    animation: dieDown 2s cubic-bezier(0.4, 0, 0.6, 1) forwards !important;
}

.navbar-logo-img.shrinking:hover {
    animation: buildFire 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Small logo for non-index pages */
.navbar-logo-img-small {
    height: 80px;
    width: 80px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar-logo-img-small:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 139, 139, 0.4);
}

@keyframes buildFire {
    0% {
        box-shadow:
            0 0 2px rgba(255, 200, 0, 0.1),
            0 0 4px rgba(255, 140, 0, 0.05);
    }
    20% {
        box-shadow:
            0 0 8px rgba(255, 200, 0, 0.3),
            0 0 16px rgba(255, 140, 0, 0.2),
            0 0 24px rgba(255, 69, 0, 0.1);
    }
    40% {
        box-shadow:
            0 0 16px rgba(255, 200, 0, 0.5),
            0 0 32px rgba(255, 140, 0, 0.4),
            0 0 48px rgba(255, 69, 0, 0.3),
            0 0 64px rgba(255, 0, 0, 0.2);
    }
    60% {
        box-shadow:
            0 0 24px rgba(255, 200, 0, 0.6),
            0 0 48px rgba(255, 140, 0, 0.5),
            0 0 72px rgba(255, 69, 0, 0.4),
            0 0 96px rgba(255, 0, 0, 0.3),
            0 0 120px rgba(255, 50, 0, 0.2);
    }
    80% {
        box-shadow:
            0 0 32px rgba(255, 220, 0, 0.7),
            0 0 64px rgba(255, 180, 0, 0.6),
            0 0 96px rgba(255, 100, 0, 0.5),
            0 0 128px rgba(255, 50, 0, 0.4),
            0 0 160px rgba(255, 0, 0, 0.3);
    }
    100% {
        box-shadow:
            0 0 40px rgba(255, 255, 0, 0.8),
            0 0 80px rgba(255, 200, 0, 0.7),
            0 0 120px rgba(255, 140, 0, 0.6),
            0 0 160px rgba(255, 69, 0, 0.5),
            0 0 200px rgba(255, 0, 0, 0.4);
        animation: realFlames 2s ease-in-out infinite;
    }
}

@keyframes dieDown {
    0% {
        box-shadow:
            0 0 40px rgba(255, 255, 0, 0.8),
            0 0 80px rgba(255, 200, 0, 0.7),
            0 0 120px rgba(255, 140, 0, 0.6),
            0 0 160px rgba(255, 69, 0, 0.5),
            0 0 200px rgba(255, 0, 0, 0.4);
    }
    15% {
        box-shadow:
            0 0 35px rgba(255, 220, 0, 0.7),
            0 0 70px rgba(255, 180, 0, 0.6),
            0 0 105px rgba(255, 100, 0, 0.5),
            0 0 140px rgba(255, 50, 0, 0.4),
            0 0 175px rgba(255, 0, 0, 0.3);
    }
    30% {
        box-shadow:
            0 0 30px rgba(255, 200, 0, 0.6),
            0 0 60px rgba(255, 140, 0, 0.5),
            0 0 90px rgba(255, 69, 0, 0.4),
            0 0 120px rgba(255, 0, 0, 0.3),
            0 0 150px rgba(255, 50, 0, 0.2);
    }
    45% {
        box-shadow:
            0 0 24px rgba(255, 180, 0, 0.5),
            0 0 48px rgba(255, 120, 0, 0.4),
            0 0 72px rgba(255, 60, 0, 0.3),
            0 0 96px rgba(255, 0, 0, 0.2),
            0 0 120px rgba(255, 30, 0, 0.1);
    }
    60% {
        box-shadow:
            0 0 18px rgba(255, 160, 0, 0.4),
            0 0 36px rgba(255, 100, 0, 0.3),
            0 0 54px rgba(255, 50, 0, 0.2),
            0 0 72px rgba(255, 0, 0, 0.1);
    }
    75% {
        box-shadow:
            0 0 12px rgba(255, 140, 0, 0.3),
            0 0 24px rgba(255, 80, 0, 0.2),
            0 0 36px rgba(255, 40, 0, 0.1);
    }
    90% {
        box-shadow:
            0 0 6px rgba(255, 120, 0, 0.2),
            0 0 12px rgba(255, 60, 0, 0.1);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 140, 0, 0);
    }
}

@keyframes realFlames {
    0% {
        box-shadow:
            0 0 40px rgba(255, 255, 0, 0.8),
            0 0 80px rgba(255, 200, 0, 0.7),
            0 0 120px rgba(255, 140, 0, 0.6),
            0 0 160px rgba(255, 69, 0, 0.5),
            0 0 200px rgba(255, 0, 0, 0.4);
    }
    25% {
        box-shadow:
            0 0 45px rgba(255, 255, 0, 0.85),
            0 0 90px rgba(255, 210, 0, 0.75),
            0 0 135px rgba(255, 150, 0, 0.65),
            0 0 180px rgba(255, 80, 0, 0.55),
            0 0 225px rgba(255, 30, 0, 0.45);
    }
    50% {
        box-shadow:
            0 0 50px rgba(255, 255, 0, 0.9),
            0 0 100px rgba(255, 220, 0, 0.8),
            0 0 150px rgba(255, 160, 0, 0.7),
            0 0 200px rgba(255, 90, 0, 0.6),
            0 0 250px rgba(255, 40, 0, 0.5);
    }
    75% {
        box-shadow:
            0 0 43px rgba(255, 255, 0, 0.83),
            0 0 86px rgba(255, 190, 0, 0.73),
            0 0 129px rgba(255, 130, 0, 0.63),
            0 0 172px rgba(255, 70, 0, 0.53),
            0 0 215px rgba(255, 20, 0, 0.43);
    }
    100% {
        box-shadow:
            0 0 40px rgba(255, 255, 0, 0.8),
            0 0 80px rgba(255, 200, 0, 0.7),
            0 0 120px rgba(255, 140, 0, 0.6),
            0 0 160px rgba(255, 69, 0, 0.5),
            0 0 200px rgba(255, 0, 0, 0.4);
    }
}

.desktop-nav-links {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    z-index: 101;
    gap: 0px; /* Removes gap between parallelograms */
    pointer-events: auto;
}

.desktop-nav-links a {
    font-family: 'Kaushan Script', cursive;
    position: relative;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 10px 25px 10px 20px;
    background: linear-gradient(135deg, #008B8B 0%, #1E3A8A 50%, #0F172A 100%);
    clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 139, 139, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Black-teal styling for Home button on non-index pages */
.desktop-nav-links a.home-button {
    background: linear-gradient(135deg, #000000 0%, #008B8B 50%, #1E3A8A 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.desktop-nav-links a.home-button:hover {
    background: linear-gradient(135deg, #1A1A1A 0%, #00A0A0 50%, #2C5282 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(0, 139, 139, 0.3),
                0 0 40px rgba(30, 58, 138, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Animated border glow effect */
.desktop-nav-links a::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s linear infinite;
}

.desktop-nav-links a::after {
    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.6s ease;
    z-index: 1;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Hover effects with tech-style animations */
.desktop-nav-links a:hover {
    transform: translateX(6px) translateY(-2px);
    color: #E0F2F1;
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.4),
                0 0 20px rgba(0, 169, 169, 0.3),
                0 0 40px rgba(30, 58, 138, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #00A0A0 0%, #2C5282 50%, #1A365D 100%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5),
                 0 0 15px rgba(255, 255, 255, 0.4);
}

.desktop-nav-links a:hover::before {
    opacity: 1;
    animation: borderGlow 1s linear infinite;
}

.desktop-nav-links a:hover::after {
    left: 100%;
}

/* Active state styling */
.desktop-nav-links a:active {
    transform: scale(1.05) translateY(-1px);
    transition: all 0.1s ease;
}

.nav-button { background: none; border: none; cursor: pointer; padding: 0; pointer-events: auto; }
.hamburger-line { width: 25px; height: 3px; background-color: #008B8B; margin: 5px 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.hamburger-line:nth-child(1) { transform-origin: left center; }
.hamburger-line:nth-child(2) { transform-origin: left center; }

/* ===================================================== */
/* MOBILE MENU */
/* ===================================================== */
.mobile-menu {
    position: fixed; top: 0; right: 0;
    width: 85%; max-width: 400px; height: 100vh;
    background: linear-gradient(135deg,
        rgba(0, 139, 139, 0.95) 0%,
        rgba(30, 58, 138, 0.95) 50%,
        rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3),
                inset 0 0 60px rgba(255, 255, 255, 0.05);
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110;
    padding: 80px 30px 40px;
    overflow-y: hidden;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 70%);
    pointer-events: none;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    margin-bottom: -2px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open ul li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.open ul li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open ul li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open ul li:nth-child(3) { transition-delay: 0.3s; }

.mobile-menu ul li a {
    font-family: 'Kaushan Script', cursive;
    color: #FFFFFF;
    font-size: 1.8rem;
    font-weight: 400;
    text-decoration: none;
    display: block;
    padding: 20px 40px 20px 30px;
    background: linear-gradient(135deg,
        rgba(0, 139, 139, 0.8) 0%,
        rgba(30, 58, 138, 0.6) 50%,
        rgba(15, 23, 42, 0.8) 100%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
    border-right: 3px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu ul li a::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.6s ease;
    z-index: 1;
}

.mobile-menu ul li a:hover {
    background: linear-gradient(135deg,
        rgba(0, 169, 169, 0.9) 0%,
        rgba(44, 82, 130, 0.7) 50%,
        rgba(26, 54, 93, 0.9) 100%);
    transform: translateX(8px) translateY(-2px);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
                 0 0 20px rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.4),
                inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.mobile-menu ul li a:hover::before {
    left: 100%;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: #FFFFFF;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    color: #E0F2F1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4),
                0 0 25px rgba(255, 255, 255, 0.3);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4),
                 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ===================================================== */
/* MEDIA QUERIES */
/* ===================================================== */
@media (min-width: 768px) {
    .nav-button { display: none; }
    .desktop-nav-links { display: flex; }
    .mobile-menu { display: none !important; }
}

@media (max-width: 767px) {
    .desktop-nav-links { display: none; }
    #main-content-wrapper { padding-top: 80px; padding-bottom: 50px; }

    /* Mobile scroll performance optimizations */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Enable text selection for content areas */
    p, h1, h2, h3, h4, h5, h6, li, td, th {
        -webkit-user-select: text;
        user-select: text;
    }

    /* Reduce blur effects on mobile for performance */
    .mobile-menu {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(135deg,
            rgba(0, 139, 139, 0.98) 0%,
            rgba(30, 58, 138, 0.98) 50%,
            rgba(15, 23, 42, 0.98) 100%);
    }

    /* Hardware acceleration for smoother scrolling */
    .fade-up-element {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000;
    }
}

/* ===================================================== */
/* NEXT PAGE BUTTON */
/* ===================================================== */
.next-page-button {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg,
        rgba(0, 139, 139, 0.9) 0%,
        rgba(30, 58, 138, 0.9) 50%,
        rgba(15, 23, 42, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 95;
    text-decoration: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(0, 139, 139, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.next-page-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s linear infinite;
}

.next-page-button .arrow-icon {
    width: 0;
    height: 0;
    border-left: 18px solid rgba(255, 255, 255, 0.9);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 3px;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.next-page-button:hover {
    transform: scale(1.15) translateX(-3px);
    background: linear-gradient(135deg,
        rgba(0, 169, 169, 0.95) 0%,
        rgba(44, 82, 130, 0.95) 50%,
        rgba(26, 54, 93, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(0, 169, 169, 0.4),
                0 0 50px rgba(30, 58, 138, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.next-page-button:hover::before {
    opacity: 1;
    animation: borderGlow 1s linear infinite;
}

.next-page-button:hover .arrow-icon {
    margin-left: 6px;
    border-left-width: 24px;
    border-top-width: 14px;
    border-bottom-width: 14px;
}

.next-page-button:active {
    transform: scale(1.05) translateX(-1px);
    transition: all 0.1s ease;
}

.next-page-button.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

@media (max-width: 767px) {
    .next-page-button {
        bottom: 80px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .next-page-button .arrow-icon {
        border-left-width: 14px;
        border-top-width: 10px;
        border-bottom-width: 10px;
    }

    .next-page-button:hover .arrow-icon {
        border-left-width: 18px;
        border-top-width: 12px;
        border-bottom-width: 12px;
    }
}

/* ===================================================== */
/* FOOTER STYLES */
/* ===================================================== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    background: linear-gradient(90deg,
        #2d2d2d 0%,
        #808080 25%,
        #a8a8a8 50%,
        #808080 75%,
        #2d2d2d 100%);
    background-size: 200% 100%;
    animation: gradientWave 6s linear infinite;
    border-top: 1px solid rgba(192, 192, 192, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 100%, 0 100%);
    display: inline-block;
}

.footer-content {
    font-family: 'Quantico', sans-serif;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
    font-weight: 400;
    color: #e0e0e0;
    text-align: left;
    padding: 6px 40px 6px 20px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    .site-footer {
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 0 100%);
    }
    .footer-content {
        text-align: center;
        padding: 5px 25px 5px 15px;
        font-size: 0.7rem;
    }
}

/* Ensure footer is visible on all pages */
body {
    padding-bottom: 50px !important;
}

/* Add bottom padding to main content wrappers */
#main-content-wrapper,
.main-content-wrapper {
    padding-bottom: 80px !important;
}