/**
 * Student Sahayak - Header & Footer Stylesheet
 *
 * This file contains all styles for the site-wide headers (homepage and inner pages),
 * the slide-in menu, the overlay, and the main site footer.
 */

/* =================================================================== */
/* 1. HOMEPAGE HEADER (.site-header-homepage)
/* =================================================================== */

.site-header-homepage {
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header-homepage .navbar-top-level {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  height: 70px;
}
.site-header-homepage .logo {
  font-size: 1.5rem; 
  font-weight: bold; 
  color: #00796b; 
  text-decoration: none;
}
.site-header-homepage .mobile-search-container {
  display: flex; 
  background-color: #ffffff; 
  padding: 0.75rem 0; 
  border-top: 1px solid #f0f0f0;
}
.site-header-homepage .mobile-search-container .container {
    display: flex; 
    gap: 0.5rem; 
    align-items: center;
}
.site-header-homepage .mobile-search-container input {
    width: 100%; 
    padding: 0.75rem 1rem; 
    border: 1px solid #ddd; 
    border-radius: 8px;
    font-size: 1rem; 
    background-color: #f0f2f5; 
    flex-grow: 1;
}
.site-header-homepage .mobile-search-container button {
    padding: 0 1.25rem; 
    border: none; 
    background-color: #00796b; 
    color: white;
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 1rem; 
    flex-shrink: 0;
}
.site-header-homepage .hamburger {
  display: block; 
  cursor: pointer; 
  font-size: 1.5rem; 
  color: #00796b;
}
.site-header-homepage .desktop-nav,
.site-header-homepage .search-container-desktop {
  display: none;
}

/* =================================================================== */
/* 2. INNER PAGE HEADER (.site-header-inner)
/* =================================================================== */

.site-header-inner {
    background-color: #ffffff;
    position: static;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    z-index: 1000;
}
.site-header-inner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.site-header-inner .logo {
  font-size: 1.5rem; 
  font-weight: bold; 
  color: #00796b; 
  text-decoration: none;
}
.site-header-inner .header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-header-inner .hamburger {
  display: block; 
  cursor: pointer; 
  font-size: 1.5rem; 
  color: #00796b;
}
.desktop-nav-inner {
    display: none; /* Hidden on mobile */
    gap: 2rem;
}
.desktop-nav-inner a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}
.desktop-nav-inner a::after {
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: 0;
    left: 0; 
    background-color: #00796b; 
    transition: width 0.3s ease;
}
.desktop-nav-inner a:hover::after {
    width: 100%;
}
.search-container-inner {
    position: relative;
    display: flex;
    align-items: center;
}
.search-container-inner input {
    width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    transition: width 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.4s; /* Added opacity transition */
    opacity: 0;
    /* DEBUG FIX: Ensure input is not clickable when hidden */
    pointer-events: none; 
}
.search-container-inner.active input {
    width: 250px;
    padding-right: 2.5rem; /* Space for the icon inside */
    opacity: 1;
    pointer-events: auto; /* Make it clickable when visible */
}
.search-icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    transition: color 0.3s;
}
.search-icon-btn:hover {
    color: #00796b;
}
.search-container-inner.active .search-icon-btn {
    position: absolute;
    right: 10px;
    color: #888;
}

/* DEBUG FIX: Hide the desktop search container entirely on mobile */
@media (max-width: 991px) {
    .search-container-inner {
        display: none;
    }
}


/* =================================================================== */
/* 3. SUB-NAVIGATION BAR (Homepage Only)
/* =================================================================== */

.sub-navbar { display: none; }
.site-header-homepage .sub-navbar {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}
.site-header-homepage .sub-navbar ul {
    list-style: none; 
    display: flex; 
    justify-content: center;
    flex-wrap: wrap; 
    gap: 1.5rem; 
    padding: 0.75rem 0;
}
.site-header-homepage .sub-navbar a {
    text-decoration: none; 
    color: #333; 
    font-weight: 500;
    padding: 0.5rem 0; 
    position: relative; 
    transition: color 0.3s;
}
.site-header-homepage .sub-navbar a::after {
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: 0;
    left: 50%; 
    transform: translateX(-50%); 
    background-color: #00796b;
    transition: width 0.3s ease;
}
.site-header-homepage .sub-navbar a:hover { color: #00796b; }
.site-header-homepage .sub-navbar a:hover::after { width: 100%; }

/* =================================================================== */
/* 4. SLIDE-IN MENU & OVERLAY
/* =================================================================== */
#menu-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5); z-index: 1001;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}
#menu-overlay.active { opacity: 1; pointer-events: auto; }
.nav-links {
  position: fixed; top: 0; left: 0; height: 100%; width: 280px; max-width: 80%;
  background-color: #ffffff; box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 1002;
  list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform 0.3s ease-in-out;
}
.nav-links.active { transform: translateX(0); }
.menu-header {
  background-color: #00796b; color: #ffffff; padding: 1.25rem 1.5rem;
  font-size: 1.1rem; font-weight: bold; display: flex; align-items: center; gap: 1rem;
}
.menu-header .fa-user-circle { font-size: 1.5rem; }
.nav-links li a {
  display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.5rem;
  text-decoration: none; color: #333; font-weight: 500; transition: background-color 0.2s ease;
}
.nav-links li a:hover { background-color: #f5f5f5; }
.nav-links li a i { font-size: 1.1rem; width: 20px; text-align: center; color: #555; }
.close-menu-btn {
  position: absolute; top: 15px; right: 15px; font-size: 1.5rem; color: #ffffff;
  opacity: 0.8; cursor: pointer; transition: opacity 0.3s; list-style-type: none;
}
.close-menu-btn:hover { opacity: 1; }
.separator { height: 1px; background-color: #eeeeee; margin: 0.5rem 0; }
.menu-footer {
  margin-top: auto; padding: 1.5rem; text-align: center;
  font-size: 0.9rem; color: #888; border-top: 1px solid #eeeeee;
}
.mobile-menu-search {
    padding: 1rem 1.5rem; display: flex; gap: 0.5rem; border-bottom: 1px solid #eee;
}
.mobile-menu-search input {
    width: 100%; padding: 0.6rem; border: 1px solid #ccc; border-radius: 5px;
}
.mobile-menu-search button {
    border: none; background-color: #00796b; color: white;
    padding: 0 0.8rem; border-radius: 5px;
}
main.blur-effect, footer.blur-effect {
  filter: blur(5px); pointer-events: none; user-select: none;
  transition: filter 0.3s ease-in-out;
}

/* =================================================================== */
/* 5. OFFICIAL FOOTER STYLES
/* =================================================================== */
.site-footer {
    background-color: #263238; color: #cfd8dc;
    padding: 3rem 1rem; font-size: 0.95rem;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; margin-bottom: 3rem;
}
.footer-column h4 {
    color: #ffffff; font-size: 1.1rem; margin-bottom: 1.5rem; position: relative;
}
.footer-column h4::after {
    content: ''; position: absolute; left: 0; bottom: -8px;
    width: 40px; height: 2px; background-color: #00796b;
}
.footer-column p { line-height: 1.7; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column ul a {
    color: #cfd8dc; text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}
.footer-column ul a:hover { color: #ffffff; padding-left: 5px; }
.social-links { display: flex; gap: 1rem; }
.social-links a { font-size: 1.2rem; color: #cfd8dc; transition: color 0.3s, transform 0.3s; }
.social-links a:hover { color: #ffffff; transform: translateY(-3px); }
.footer-bottom {
    text-align: center; border-top: 1px solid #37474f;
    padding-top: 2rem; color: #90a4ae;
}
.footer-bottom p { margin: 0; }

/* =================================================================== */
/* 6. MEDIA QUERIES (DESKTOP STYLES)
/* =================================================================== */

@media (min-width: 992px) {
  
  /* --- HOMEPAGE Header --- */
  .site-header-homepage { position: sticky; }
  .site-header-homepage .navbar-top-level {
     box-shadow: none;
     height: auto; 
     padding-top: 0.75rem; 
     padding-bottom: 0.75rem;
  }
  .site-header-homepage .hamburger, .site-header-homepage .mobile-search-container { display: none; }
  .site-header-homepage .desktop-nav, .site-header-homepage .search-container-desktop, .site-header-homepage .sub-navbar { display: block; }
  .site-header-homepage .desktop-nav, .site-header-homepage .search-container-desktop { display: flex; }
  
  /* --- INNER PAGE Header --- */
  .site-header-inner .hamburger { display: none; }
  .site-header-inner .desktop-nav-inner { display: flex; }
  .site-header-inner .search-container-inner { display: flex; }

  /* --- Shared Desktop Styles for HOMEPAGE Nav --- */
  .desktop-nav {
    display: flex; list-style: none; gap: 2.5rem; align-items: center; margin: 0; padding: 0;
  }
  .desktop-nav a {
    color: #333; text-decoration: none; font-weight: 500; position: relative;
    padding-bottom: 5px; transition: color 0.3s ease;
  }
  .desktop-nav a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%;
    transform: translateX(-50%); background-color: #00796b; transition: width 0.3s ease;
  }
  .desktop-nav a:hover { color: #00796b; }
  .desktop-nav a:hover::after { width: 100%; }
  .search-container-desktop {
    align-items: center; background-color: #f0f2f5; border-radius: 20px;
    padding: 5px 5px 5px 15px;
  }
  .search-container-desktop input {
    border: none; outline: none; background: transparent; width: 220px;
    font-size: 0.9rem; transition: width 0.4s ease-in-out;
  }
  .search-container-desktop input:focus { width: 280px; }
  .search-container-desktop button {
    background: #00796b; border: none; color: white; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; display: flex; justify-content: center;
    align-items: center; transition: background-color 0.3s;
  }
  .search-container-desktop button:hover { background: #005a4f; }
}

