/* navbar.css - Header & Footer Styles for Rameswaram Nagara Viduthi Trust */

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Trust Colors - Professional & Trustworthy */
  --primary-color: #1e40af; /* Deep Blue - Trust & Stability */
  --secondary-color: #0f766e; /* Teal - Growth & Prosperity */
  --accent-color: #ea580c; /* Orange - Energy & Warmth */
  --gold-color: #d97706; /* Gold - Excellence & Value */
  
  /* Neutral Colors */
  --dark: #1f2937;
  --gray: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  --gradient-accent: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
  --gradient-hero: linear-gradient(135deg, #1e40af 0%, #0f766e 50%, #ea580c 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  padding-top: 80px;
  background: var(--light-gray);
}

body.nav-open {
  overflow: hidden;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: all var(--transition-normal);
}

header.scrolled {
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 1);
}

/* ===== HEADER CONTAINER ===== */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all var(--transition-normal);
  z-index: 1001;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-image {
  height: 70px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  background: var(--white);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.logo:hover .logo-image {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.logo:hover .logo-image img {
  transform: scale(1.08);
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  position: relative;
  padding: 0;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: all var(--transition-normal);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
  background: var(--accent-color);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
  background: var(--accent-color);
}

/* ===== NAVIGATION ===== */
.main-nav {
  display: flex;
  z-index: 1000;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Hover effect background */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
  border-radius: 50px;
  z-index: -1;
}

.nav-link:hover::before {
  opacity: 0.1;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Active state */
.nav-link.active {
  color: var(--white);
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.nav-link.active::before {
  display: none;
}

/* Icon styling */
.nav-link i {
  font-size: 1rem;
  transition: transform var(--transition-normal);
}

.nav-link:hover i {
  transform: scale(1.15);
}

/* Active link icon animation */
.nav-link.active i {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: var(--white);
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

/* Decorative top border */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
  background-size: 200% auto;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-text {
  text-align: center;
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  /* HEADER MOBILE */
  .header-container {
    padding: 0.6rem 1rem;
  }

  .logo-image {
    height: 50px;
  }

  /* MOBILE TOGGLE */
  .mobile-toggle {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  /* MOBILE NAVIGATION */
  .main-nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem 1rem;
    transition: left var(--transition-normal);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .main-nav.active {
    left: 0;
  }

  /* Mobile menu header */
  .main-nav::before {
    content: 'Rameswaram Nagara Viduthi Trust';
    display: block;
    width: calc(100% + 2rem);
    padding: 1.2rem 1rem;
    margin: -1.5rem -1rem 1.5rem -1rem;
    background: var(--gradient-hero);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
  }

  /* NAV LIST MOBILE */
  .nav-list {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 1rem 1.25rem;
    justify-content: flex-start;
    border: 2px solid rgba(30, 64, 175, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    width: 100%;
  }

  .nav-link i {
    font-size: 1.2rem;
    min-width: 30px;
    color: var(--primary-color);
  }

  .nav-link span {
    flex: 1;
    text-align: left;
  }

  .nav-link:hover,
  .nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateX(5px);
  }

  .nav-link:hover i,
  .nav-link.active i {
    color: var(--white);
  }

  /* Footer mobile */
  .footer-content {
    padding: 0 1rem;
  }

  .footer-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 65px;
  }

  .header-container {
    padding: 0.5rem 0.75rem;
  }

  .logo-image {
    height: 45px;
  }

  .mobile-toggle {
    width: 28px;
    height: 24px;
  }

  .main-nav {
    top: 65px;
    height: calc(100vh - 65px);
    padding: 1.25rem 0.75rem;
  }

  .main-nav::before {
    padding: 1rem 0.75rem;
    margin: -1.25rem -0.75rem 1.25rem -0.75rem;
    font-size: 1rem;
  }

  .nav-link {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .nav-link i {
    font-size: 1.1rem;
    min-width: 28px;
  }

  .footer-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .logo-image {
    height: 40px;
  }

  .main-nav::before {
    font-size: 0.9rem;
  }

  .nav-link {
    padding: 0.8rem 0.9rem;
    font-size: 0.9rem;
  }
}