:root {
  --primary: #007f7f; /* Teal */
  --accent: #ff7300; /* Orange */
  --dark: #1a1a1a;
  --gray: #444444;
  --light-gray: #f8f9fa;
  --white: #ffffff;
}

/* Global Styles */ 
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--gray);
  line-height: 1.6;
  background-color: var(--white);
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll on small screens */
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}


/* Header & Navigation */
header {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: relative;
}

.logo img {
  height: 110px;           /* Slightly reduced for better balance */
  width: auto;
  max-width: 180px;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: nowrap;       /* Prevent wrapping by default */
}

.nav-links a {
  font-weight: 600;
  color: var(--dark);
  transition: color 0.3s;
  font-size: 15px;
  white-space: nowrap;     /* Prevent text from breaking into two lines */
}

.nav-links a:hover {
  color: var(--primary);
}

/* Dropdown */
.nav-item {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* ==================== RESPONSIVE NAV ==================== */

/* Large screens - keep as is */
@media (min-width: 1200px) {
  .nav-links {
    gap: 28px;
  }
}

/* Medium screens - reduce spacing & font size */
@media (max-width: 1199px) and (min-width: 992px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    font-size: 14.5px;
  }
}

/* Small laptops / large tablets - hide some links or show hamburger */
@media (max-width: 991px) {
  .nav-links {
    display: none;                    /* Hide main nav on smaller screens */
    position: fixed;
    top: 85px;                        /* Below header */
    left: 0;
    width: 100%;
    height: calc(100vh - 85px);
    background: var(--white);
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  /* Show mobile toggle */
  .mobile-menu-toggle {
    display: block;
  }

  /* Adjust logo size on mobile */
  .logo img {
    height: 80px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .nav-links {
    padding-top: 30px;
    gap: 24px;
  }
}

/* Pulse Animation for Upcoming Events Navlink */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.6; }
}

.pulse {
  animation: pulse 1.5s infinite;
}

/* ==================== DROPDOWN MENU ==================== */
.nav-item {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.arrow {
  font-size: 0.85em;
  transition: transform 0.3s ease;
}

/* Desktop Hover */
@media (min-width: 992px) {
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 8px;
  }
  
  .nav-item:hover .arrow {
    transform: rotate(180deg);
  }
}

/* Dropdown Menu - Hidden by default */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 780px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 1500;
  padding: 40px 30px;
  margin-top: 10px;
  pointer-events: none;           /* Prevents interaction when hidden */
}

/* Active state */
.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  margin-top: 8px;
  pointer-events: auto;
}

/* Dropdown Content */
.dropdown-content {
  display: flex;
  gap: 60px;
}

.dropdown-column {
  flex: 1;
}

.dropdown-column h4 {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.dropdown-column a {
  display: block;
  padding: 10px 0;
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
}

.dropdown-column a:hover {
  color: var(--primary);
  padding-left: 8px;
}

/* Promotional Card */
.dropdown-promo {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  width: 260px;
  text-align: center;
  align-self: flex-start;
}

/* ==================== MOBILE FIX ==================== */
@media (max-width: 991px) {

  .dropdown-toggle {
    gap: 4px;
    align-items: center;
    justify-content: center;
  }

  .dropdown-menu {
    position: static;           /* Important */
    transform: none;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 25px 20px;
    margin-top: 10px;           /* Reduced gap */
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
  }

  .dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    max-height: 800px;          /* Enough for content */
    margin-top: 15px;
  }

  .dropdown-content {
    flex-direction: column;
    gap: 30px;
  }

  .dropdown-promo {
    width: 100%;
  }
}

/* Promotional Card */
.dropdown-promo {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  width: 260px;
  text-align: center;
  align-self: flex-start;
}

.dropdown-promo img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 16px;
}

.dropdown-promo h5 {
  color: var(--primary);
  margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 992px) {
  .dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    padding: 20px;
    margin-top: 10px;
  }
  
  .dropdown-content {
    flex-direction: column;
    gap: 30px;
  }
}

.nav-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.btn-nav {
  background-color: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

.btn-nav:hover {
  background-color: #006666;
  color: var(--white);
  cursor: pointer;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--dark);
}

/* =============================================
   CONTAINER & LAYOUT
============================================= */
.registration-page {
  padding: 100px 0 120px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* =============================================
   TYPOGRAPHY
============================================= */
h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary, #007f7f);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.2;
}

.lead {
  font-size: 1.25rem;
  color: var(--gray, #444444);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* =============================================
   FORM STYLING
============================================= */
.registration-form {
  background: white;
  padding: 48px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 127, 127, 0.08);
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--dark);
  font-size: 1.05rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary, #007f7f);
  box-shadow: 0 0 0 4px rgba(0, 127, 127, 0.12);
  background: white;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: normal;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary, #007f7f);
  cursor: pointer;
}

/* Consent field - special styling */
.consent label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
}

.consent input[type="checkbox"] {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

/* Required asterisk */
.required {
  color: #e63946;
  font-weight: 600;
}

/* Submit button */
.btn-primary.btn-large {
  width: 100%;
  padding: 18px;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 10px;
  background: var(--accent, #ff7300);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(255, 115, 0, 0.25);
}

.btn-primary.btn-large:hover {
  background: #e66a00;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 115, 0, 0.35);
}

/* Alerts */
.alert {
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 32px;
  font-weight: 600;
  text-align: center;
  font-size: 1.1rem;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #b8e0b8;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c2c7;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
  .registration-page {
    padding: 80px 0 100px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .lead {
    font-size: 1.15rem;
  }

  .registration-form {
    padding: 36px 24px;
  }

  .btn-primary.btn-large {
    padding: 16px;
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .registration-form {
    padding: 28px 20px;
  }
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: #ccc;
  padding-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo img {
  width: 190px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.footer-about p {
  font-size: 16px;
  line-height: 1.7;
  margin: 20px 0 30px;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-4px);
}

.footer-links h4 {
  color: white;
  font-size: 20px;
  margin-bottom: 24px;
  font-weight: 700;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #ccc;
  font-size: 16px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links i {
  color: var(--primary);
  margin-right: 10px;
  width: 20px;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 30px 0;
  text-align: center;
  font-size: 15px;
  color: #aaa;
}

.footer-bottom a {
  color: #ccc;
  margin: 0 10px;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .footer-about p {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .footer {
    padding-top: 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links ul {
    display: inline-block;
    text-align: left;
  }
}

/* Responsive Breakpoints */

/* Large Tablets & Small Laptops */
@media (min-width: 768px) {
  .buttons {
    flex-direction: row;
    justify-content: center;
  }

  .btn-primary,
  .btn-secondary {
    width: auto;
  }

  .purpose-grid,
  .impact-grid,
  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktops */
@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .hero-content {
    max-width: 600px;
  }

  .buttons {
    justify-content: flex-start;
  }

  .purpose-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .impact-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .audience-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat-primary {
    top: 40px;
    right: 20px;
  }

  .stat-accent {
    bottom: 80px;
    left: 40px;
  }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 40px;
    gap: 24px;
    transition: left 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links a {
    font-size: 18px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .subheadline {
    font-size: 17px;
  }

  .stat-badge {
    padding: 12px 14px;
    min-width: 120px;
  }

  .stat-icon {
    font-size: 24px;
  }

  .stat-number {
    font-size: 24px;
  }

  /* Adjust badge positions for small screens */
  .stat-primary {
    top: 16px;
    right: 16px;
  }

  .stat-accent {
    bottom: 16px;
    left: 16px;
  }
}

/* Extra Small Phones */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 32px;
  }

  .badge {
    font-size: 13px;
    padding: 7px 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .audience-card img {
    height: 180px;
  }

  .audience-content {
    padding: 24px;
  }

  .audience-content h3 {
    font-size: 22px;
  }

  #donate-cta h2 {
    font-size: 32px;
  }
}

/* Very Small Phones (e.g., iPhone SE) */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 28px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-large,
  .btn-donate {
    padding: 14px 20px;
    font-size: 16px;
  }
}
