/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: 
        radial-gradient(circle at 20% 50%, rgba(11, 117, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 50, 100, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(11, 117, 175, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%);
    background-size: 100% 100%;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Add animated background elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(11, 117, 175, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(0, 50, 100, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    25% {
        transform: translateX(-10px) translateY(-5px);
        opacity: 0.8;
    }
    50% {
        transform: translateX(5px) translateY(-10px);
        opacity: 1;
    }
    75% {
        transform: translateX(-5px) translateY(5px);
        opacity: 0.9;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* unvisited link */
a:link {
    color: #FFFFFF;
}

/* visited link */
a:visited {
    color: #FFFFFF;
}

#heading {
    text-align: center;
}

p {
    text-indent: 30px;
    text-align: justify;
}

#content {
    color: #FFFFFF;
    padding-top: 50px;
    width: 100%;
    position: relative;
    z-index: 1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(11, 117, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 50, 100, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(11, 117, 175, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%);
    background-size: 100% 100%;
    background-attachment: fixed;
}

#footer {
    color: #FFFFFF;
    position: relative;
    z-index: 1;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: 
        radial-gradient(circle at 20% 50%, rgba(11, 117, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 50, 100, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(11, 117, 175, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%),
        rgba(0, 0, 0, 0.3);
    background-size: 100% 100%;
    background-attachment: fixed;
}

.l-box {
    padding: 1em;
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 5px;
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation Styles */
.navbar {
    background: 
        radial-gradient(circle at 20% 50%, rgba(11, 117, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 50, 100, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(11, 117, 175, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%),
        rgba(0, 0, 0, 0.3);
    background-size: 100% 100%;
    background-attachment: fixed;
    border-radius: 20px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.08), 
        transparent);
    transition: left 0.8s ease;
}

.navbar:hover::before {
    left: 100%;
}

/* Mobile Navigation Toggle - Hidden by default */
.nav-toggle {
    display: none;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 20px;
    margin: 0;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-item {
    flex: 0 1 auto;
    min-width: 150px;
    max-width: 180px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.nav-link::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;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.nav-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    position: relative;
    transition: transform 0.3s ease;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover .nav-icon {
    transform: rotateY(360deg);
}

.nav-content h3 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-content p {
    color: #B0D4F1;
    font-size: 12px;
    text-align: center;
    text-indent: 0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 12px;
    }
    
    .nav-item {
        min-width: 140px;
        max-width: 160px;
    }
}

/* Medium tablets */
@media (max-width: 1000px) {
    .nav-menu {
        gap: 10px;
        justify-content: center;
    }
    
    .nav-item {
        min-width: 130px;
        max-width: 150px;
    }
    
    .nav-link {
        padding: 18px 12px;
    }
    
    .nav-icon {
        width: 55px;
        height: 55px;
    }
    
    .nav-content h3 {
        font-size: 13px;
    }
    
    .nav-content p {
        font-size: 11px;
    }
}

/* Small tablets - items will wrap to multiple rows */
@media (max-width: 850px) {
    .nav-menu {
        gap: 8px;
        padding: 15px;
    }
    
    .nav-item {
        min-width: 120px;
        max-width: 140px;
        flex: 0 1 calc(25% - 8px);
    }
    
    .nav-link {
        padding: 15px 8px;
    }
    
    .nav-icon {
        width: 50px;
        height: 50px;
    }
    
    .nav-content h3 {
        font-size: 12px;
    }
}

/* Large mobile - 2 columns */
@media (max-width: 650px) {
    .nav-menu {
        gap: 10px;
        padding: 15px;
    }
    
    .nav-item {
        flex: 0 1 calc(50% - 10px);
        min-width: 140px;
        max-width: none;
    }
    
    .nav-link {
        padding: 15px 10px;
    }
}

/* Mobile phones - single column */
@media (max-width: 480px) {
    .nav-menu {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    .nav-item {
        width: 100%;
        max-width: 280px;
        flex: none;
    }
    
    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 15px;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .nav-icon {
        width: 45px;
        height: 45px;
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .nav-content {
        text-align: left;
        flex: 1;
    }
    
    .nav-content h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .nav-content p {
        font-size: 12px;
    }

    .logo {
        max-width: 200px;
    }

    .container {
        padding: 0 15px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .nav-item {
        max-width: 100%;
    }
    
    .nav-link {
        padding: 12px;
    }
    
    .nav-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .nav-content h3 {
        font-size: 13px;
    }
    
    .nav-content p {
        font-size: 11px;
    }
    
    .logo {
        max-width: 180px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 5px;
    }
    
    .nav-item {
        min-width: 130px;
        max-width: 150px;
    }
    
    .nav-link {
        padding: 15px 10px;
    }
    
    .nav-icon {
        width: 50px;
        height: 50px;
    }
    
    .nav-content h3 {
        font-size: 13px;
    }
    
    .nav-content p {
        font-size: 11px;
    }
}

/* Large screens - more spacing */
@media (min-width: 1400px) {
    .nav-menu {
        gap: 20px;
    }
    
    .nav-item {
        max-width: 200px;
    }
    
    .nav-link {
        padding: 25px 20px;
    }
    
    .nav-icon {
        width: 70px;
        height: 70px;
    }
    
    .nav-content h3 {
        font-size: 16px;
    }
    
    .nav-content p {
        font-size: 13px;
    }
}

/* Animation for smooth loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: fadeInUp 0.6s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }
.nav-item:nth-child(7) { animation-delay: 0.7s; }

/* Focus states for accessibility */
.nav-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.nav-toggle:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}