/* Header.css */

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

body {
    font-family: Aptos, "Segoe UI", sans-serif;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-center {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Fix IIT Kanpur logo positioning */
.iit-logo {
    width: 50px;
    height: 50px;
    margin: 0; /* Remove any default margins */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.logo-title a,
.logo-subtitle a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    /* A common modern radius */
    border-radius: 6px; 
    /* Important for the transition/effect */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    white-space: nowrap; 
}

.nav-links a:hover {
    /* Use a light, transparent background color for a soft look */
    background: rgba(var(--primary-blue-rgb, 33, 150, 243), 0.15); 
    color: var(--primary-blue);
    /* Remove the vertical shift */
    transform: none; 
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}


.floating-btn {
    position: fixed;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
    color: white;
    font-weight: 600;
}


.up-down-nav {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.up-down-nav button {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #000;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.up-down-nav button:hover {
  background: rgba(33, 150, 243, 0.6);
  border-color: rgba(33, 150, 243, 0.8);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.up-down-nav button:active {
  transform: scale(0.95);
}

.up-down-nav button svg {
  width: 24px;
  height: 24px;
}

.up-down-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Orange accent on down button */
.up-down-nav button#nav-down-btn:hover {
  background: rgba(255, 152, 0, 0.6);
  border-color: rgba(255, 152, 0, 0.8);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .up-down-nav {
    right: 15px;
    gap: 8px;
  }
  
  .up-down-nav button {
    width: 45px;
    height: 45px;
  }
}

/* ===========================
Desktop: 901px and above
=========================== */
@media (min-width: 910px) {
    .nav-links {
        gap: 1.2rem;
    }

    .nav-links a {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }

    .logo-title {
        font-size: 1.4rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }

    .logo-icon,
    .iit-logo {
        width: 45px;
        height: 45px;
    }
}

/* ===========================
Tablet & small desktop: 481px - 900px
=========================== */
@media (max-width: 909px) {
    /* Collapse nav into mobile menu */
    .nav-links {
        display: none;
    }

    .nav-center {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1000;
    }

    .nav-center .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;   /* center horizontally */
        justify-content: center;
        width: 100%;
        padding: 1rem 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0 0 15px 15px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    }

    .nav-center .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links li {
        margin: 0 0;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem 1rem;
        text-align: center;
        border-radius: 8px;
    }

    /* Menu toggle & spacing */
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1100;
    }

    .nav-right {
        position: absolute;
        right: 60px;  /* spacing from hamburger */
        top: 50%;
        transform: translateY(-50%);
    }

    .logo-title {
        font-size: 1.2rem;
    }

    .logo-icon,
    .iit-logo {
        width: 40px;
        height: 40px;
    }
}

/* ===========================
Mobile: up to 480px
=========================== */
@media (max-width: 480px) {

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

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

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

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
