/* =========================================
   SRDCF - Sourish De Cosmopolitan Foundation
   Production-Ready Unified Stylesheet
   ========================================= */

/* =========================================
   1. CSS VARIABLES & BRAND IDENTITY
   ========================================= */

:root {
  /* Brand Colors */
  --brand-brown: #642c08;
  --brand-darkblue: #000c7b;
  --brand-blue: #27a4e9;
  --brand-green: #65b500;
  --brand-orange: #f7941d;
  --brand-yellow: #ffde59;
  --footer-bg: #000000;
  --white: #ffffff;
  --light-gray: #f9f9f9;
  
  /* Typography */
  --font-logo: 'Playfair Display', serif;
  --font-heading: 'Tiro Bangla', serif;
  --font-nav: 'Radley', serif;
  --font-body: 'Times New Roman', serif;
  
  /* Spacing System */
  --margin-desktop: 137px;
  --gap-standard: 90px;
  --gap-story: 93.5px;
  --gap-cards: 140px;
}

/* =========================================
   2. CORE RESET & BASE STYLES
   ========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--brand-brown);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   3. UTILITY CLASSES
   ========================================= */

.mt-90 { margin-top: var(--gap-standard); }
.mt-93 { margin-top: var(--gap-story); }
.mt-140 { margin-top: var(--gap-cards); }
.mb-90 { margin-bottom: var(--gap-standard); }
.mb-140 { margin-bottom: var(--gap-cards); }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* =========================================
   4. HEADER SECTION (DESKTOP)
   ========================================= */

header {
  background: url('../images/header-bg.svg') no-repeat center center;
  background-size: cover;
  padding: 25px var(--margin-desktop) 10px;
  text-align: center;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer; /* Logo is clickable */
  transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-img {
  height: 100px;
  width: auto;
  margin-bottom: 10px;
}

.brand-text-group {
  text-align: center;
}

.brand-line {
  font-family: var(--font-logo);
  font-size: 22.2px;
  color: var(--brand-brown);
  text-transform: uppercase;
  display: block;
  line-height: 1.2;
}

.legal-subtext {
  font-family: var(--font-logo);
  font-size: 8.5px;
  color: var(--brand-brown);
  display: block;
  margin-top: 5px;
  white-space: nowrap;
}

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  background: transparent;
  border: none;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--brand-brown);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* =========================================
   5. NAVIGATION (STICKY)
   ========================================= */

nav {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 80px;
}

nav ul li a {
  text-decoration: none;
  font-family: var(--font-nav);
  font-size: 18px;
  color: var(--brand-brown);
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--brand-orange);
}

/* =========================================
   6. REVEAL ANIMATIONS (THE FIX)
   ========================================= */
/* This creates the "Coming Towards Me" 3D effect */
.reveal {
    opacity: 0;
    transform: perspective(1000px) translate3d(0, 40px, -50px); /* Starts lower and pushed back */
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: perspective(1000px) translate3d(0, 0, 0); /* Returns to natural position */
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================
   7. HERO SECTION (SWIPEABLE CAROUSEL)
   ========================================= */

.hero-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  padding: 0 var(--margin-desktop);
  display: flex;
  align-items: center;
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  cursor: pointer; /* Indicates clickable carousel */
  user-select: none;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: -1;
}

.hero-content {
  text-align: left;
  color: var(--white);
  max-width: 650px;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* =========================================
   8. OUR STORY SECTION (STATIC IMAGE)
   ========================================= */

.story-section {
  padding: 0 var(--margin-desktop);
}

.story-heading {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: var(--gap-story);
}

.story-image-container {
  width: 100%;
  margin-bottom: var(--gap-story);
  border-radius: 30px;
  overflow: hidden;
}

.story-image-container img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 30px;
}

.story-body {
  text-align: center;
  max-width: 100%;
  font-size: 1.1rem;
  line-height: 1.8;
}

.story-body p {
  margin-bottom: 20px;
}

/* =========================================
   9. METRICS SECTION (ANIMATED COUNTERS)
   ========================================= */

.metrics-section {
  background-color: var(--brand-darkblue);
  padding: 60px var(--margin-desktop);
  color: var(--white);
}

.metrics-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.metric-item {
  text-align: center;
  flex: 1;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.metric-item span:last-child {
  font-size: 1.1rem;
}

/* =========================================
   10. PROGRAM BANDS (HORIZONTAL LAYOUT)
   ========================================= */

.programs-stack,
.cards-stack,
.join-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-cards);
}

.program-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: calc(100% - (var(--margin-desktop) * 2));
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  color: var(--white);
  transition: box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Base shadow */
}

/* SHADOW HOVER EFFECT */
.program-band:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.band-orange { background-color: var(--brand-orange); }
.band-green { background-color: var(--brand-green); }
.band-blue { background-color: var(--brand-blue); }

.program-img {
  width: 40%;
  height: 350px;
  object-fit: cover;
  padding: 30px 0 30px 30px; /* Equal spacing: top, bottom, left */
  border-radius: 25px;
}

.program-content {
  width: 60%;
  padding: 40px 60px 40px 30px; /* Right padding larger, left padding matches image */
  display: flex;             /* Added to allow centering content */
  flex-direction: column;    /* Stack title, text, and button */
  align-items: center;       /* Centers everything horizontally */
  text-align: center;        /* Centers the Heading */
}

.program-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 20px;
}

.program-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;       /* Makes text edges straight */
  text-align-last: center;   /* Optional: Centers the very last line of the paragraph */
}

/* =========================================
   11. JOIN US BANDS (CENTERED, NO IMAGE)
   ========================================= */

.join-band {
  background-color: var(--brand-yellow);
  color: var(--brand-brown);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: calc(100% - (var(--margin-desktop) * 2));
  margin: 0 auto;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* SHADOW HOVER EFFECT */
.join-band:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.join-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.join-body {
  max-width: 800px;
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: justify;       /* Makes text edges straight */
  text-align-last: center;   /* Centers the last line to maintain the 'centered' feel */
}

/* =========================================
   12. BUTTONS & INTERACTIONS
   ========================================= */

.btn-cta {
  padding: 12px 35px;
  border-radius: 30px;
  font-family: var(--font-nav);
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
}

.btn-white {
  background: var(--white);
  color: var(--brand-brown);
}

.btn-blue {
  background: var(--brand-darkblue);
  color: var(--white);
}

/* Contextual hover effects */
.band-orange .btn-white:hover {
  background: #d67b13;
  color: white;
}

.band-green .btn-white:hover {
  background: #4e8c00;
  color: white;
}

.band-blue .btn-white:hover {
  background: #1b7bb3;
  color: white;
}

.btn-blue:hover {
  background: #000850;
}

.btn-white:hover,
.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =========================================
   13. CONTACT FORM
   ========================================= */

.contact-container {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding: 0 var(--margin-desktop);
}

.contact-info {
  flex: 1;
}

.contact-form-wrapper {
  flex: 1;
  background: var(--light-gray);
  padding: 40px;
  border-radius: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  margin-bottom: 5px;
  font-weight: bold;
}

.form-input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
}

/* =========================================
   14. FOOTER
   ========================================= */

footer {
  background: var(--footer-bg);
  color: var(--white);
  padding: 60px var(--margin-desktop) 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 120px;
  margin-bottom: 40px;
}

.quick-links-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.footer-col h3 {
  font-family: var(--font-heading);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--brand-orange);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.3s ease;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
}

.social-icons a:hover {
  background: var(--brand-orange);
  transform: scale(1.1);
}

/* =========================================
   15. CONTENT PAGES (PROGRAM DIVISIONS)
   ========================================= */

.content-page {
  padding: 0 var(--margin-desktop);
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 20px;
}

.page-header p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.7;
}

.content-section {
  margin-bottom: 60px;
}

.content-section h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--brand-brown);
}

.content-section h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--brand-brown);
}

.content-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.content-section ul {
  list-style: none;
  padding: 0;
}

.content-section ul li {
  margin-bottom: 15px;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* =========================================
   16. MOBILE RESPONSIVENESS
   ========================================= */

@media (max-width: 768px) {
  :root {
    --margin-desktop: 20px;
    --gap-standard: 60px;
    --gap-cards: 60px;
    --gap-story: 50px;
  }

  /* MOBILE HEADER ROW LAYOUT */
  header {
    padding: 15px 20px;
  }

  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo-container {
    flex-direction: row;
    margin-bottom: 0;
  }

  .logo-img {
    height: 50px;
    margin-bottom: 0;
    margin-right: 12px;
  }

  .brand-text-group {
    text-align: left;
  }

  .brand-line {
    font-size: 14px;
    line-height: 1.1;
  }

  .legal-subtext.desktop-only {
    display: none;
  }

  /* MOBILE MENU BUTTON */
  .mobile-menu-btn {
    display: flex;
  }

  /* MOBILE NAVIGATION DROPDOWN */
  nav {
    padding: 0;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #eee;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
  }

  nav ul li a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }

  /* MOBILE HERO SECTION - Image Visible, Text Left-Aligned */
.hero-section {
    padding: 0;
    margin-top: 0 !important; /* Forces removal of any top gap */
    height: auto; 
    min-height: auto;
    display: flex;
    flex-direction: column; /* Stacks image top, text bottom */
    background: transparent;
  }

.hero-carousel {
    position: relative; /* Moves it out of absolute positioning */
    width: 100%;
    margin-top: 0;
    /* This ensures the 'box' matches the image height exactly */
    aspect-ratio: 16 / 9; 
    z-index: 1;
  }

.hero-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 20px 20px 30px; /* Reduced top padding */
    margin-top: -5px; /* Tiny overlap to ensure no white line visible */
    text-align: center;
    background: var(--white); /* Text sits on the clean white page background */
    z-index: 2;
  }

  .hero-content .btn-white {
    background: var(--brand-darkblue);
    color: var(--white);
    border: none;
  }

  .hero-overlay {
    /* We remove the dark overlay so the illustration stays bright */
    display: none; 
  }

.hero-title {
    font-size: 1.8rem;
    color: var(--brand-darkblue);
    margin-bottom: 15px;
  }

.hero-text {
    font-size: 1rem;
    color: var(--brand-brown);
    margin-bottom: 20px;
    line-height: 1.5;
    br { display: none; } /* Removes desktop line breaks for better mobile flow */
  }

  /* Ensure hero image is visible on mobile */
.hero-slide {
    background-size: 100% 100%; /* Forces image to fill the aspect-ratio box */
    background-position: center;
  }

  /* MOBILE STORY SECTION */
  .story-heading {
    font-size: 2rem;
  }

  .story-image-container img {
    height: 300px;
  }

  /* MOBILE METRICS */
  .metrics-section {
    padding: 40px 20px;
  }

  .metrics-grid {
    flex-direction: column;
    gap: 30px;
  }

  .metric-number {
    font-size: 2.5rem;
  }

  /* MOBILE PROGRAM BANDS */
  .program-band {
    flex-direction: column;
    max-width: 100%;
  }

  .program-img {
    width: 100%;
    height: 250px;
    padding: 20px; /* Balanced spacing on mobile */
  }

  .program-content {
    width: 100%;
    padding: 30px 20px;
    text-align: center;
  }

  .program-title {
    font-size: 1.6rem;
  }

  /* MOBILE JOIN BANDS */
  .join-band {
    padding: 40px 20px;
    max-width: 100%;
  }

  .join-title {
    font-size: 1.8rem;
  }

  /* MOBILE CONTACT FORM */
  .contact-container {
    flex-direction: column;
    padding: 0 20px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }

  /* MOBILE FOOTER - Two Column Quick Links */
  footer {
    padding: 40px 20px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-links-container {
    grid-template-columns: 1fr 1fr; /* Keep two columns on mobile */
  }

  /* MOBILE CONTENT PAGES */
  .page-header h1 {
    font-size: 2.2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .content-section h2 {
    font-size: 1.8rem;
  }
}

/* =========================================
   17. ACCESSIBILITY ENHANCEMENTS
   ========================================= */

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-darkblue);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
}

.skip-link:focus {
  top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    border: 2px solid var(--brand-brown);
  }
}

/* Print styles */
@media print {
  header,
  nav,
  footer,
  .btn-cta {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}