/* Hero Section with Split Layout */
.hero-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: white;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* Left Side - Text Content */
.hero-text {
  flex: 1;
  padding: 1rem;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.hero-text h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  margin: 0 0 1.5rem 0;
  opacity: 0.9;
  line-height: 1.3;
}

.hero-description {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.2;
  opacity: 0.9;
  margin: 0;
  max-width: 500px;
}

/* Right Side - Video */
.hero-video {
  flex: 1;
  padding: 1rem;
}

/* YouTube Video Container */
.youtube-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  cursor: default; /* Let iframe handle cursor */
}

.youtube-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
  pointer-events: auto; /* Enable iframe interactions */
}

/* Removed invisible overlay - let YouTube controls work normally */

#about-title {
  margin-top: 4rem;
}

.about-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.about-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f8f9fa;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.about-content {
  padding: 1.5rem;
  background: var(--muted);
}

.about-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: var(--primary);
}

.about-content p {
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

/* Row 1 & 3: Image Left, Text Right */
.about-row:nth-child(2),
/* Biography is 2nd child after section-header */
.about-row:nth-child(4) {
  /* Vision is 4th child */
  flex-direction: column;
}

/* Row 2 & 4: Text Left, Image Right */
.about-row:nth-child(3),
/* Political Journey is 3rd child */
.about-row:nth-child(5) {
  /* Achievements is 5th child */
  flex-direction: column-reverse;
}

/* Mobile Hero Adjustments */
@media (max-width: 767px) {
  .hero-section {
    padding: 1.5rem 0;
    overflow: visible;
  }
  
  .hero-content {
    gap: 1.5rem;
    width: 100%;
    flex-direction: column;
  }
  
  .hero-text {
    text-align: center;
    padding: 0.5rem;
    width: 100%;
    order: 1;
  }
  
  .hero-text h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-text h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .hero-video {
    padding: 0;
    width: 100%;
    max-width: 100%;
    order: 2;
    margin: 0 1rem;
  }
  
  .youtube-container {
    min-height: 220px; /* Larger minimum height on mobile */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.1); /* Fallback background */
  }
  
  .youtube-container iframe {
    border-radius: 12px;
  }
}

/* Desktop Layout */
@media (min-width: 768px) {
  /* Hero Section Split Layout */
  .hero-content {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    min-height: 600px;
  }
  
  .hero-text {
    flex: 0.8;
    width: 40%;
    padding: 1.5rem;
  }
  
  .hero-video {
    flex: 1.2;
    width: 60%;
    padding: 1rem;
    max-width: 700px; /* Maximum width for very large screens */
  }
  
  .hero-text {
    text-align: left;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .hero-text h2 {
    font-size: 1.5rem;
  }

  /* About rows - FORCE Alternating Pattern */
  /* ALL rows become horizontal */
  .about-row {
    flex-direction: row;
    min-height: 350px;
    margin-bottom: 3rem;
  }

  /* Row 1 & 3: Image Left, Text Right */
  .about-row:nth-child(2),
  /* Biography is 2nd child after section-header */
  .about-row:nth-child(4) {
    /* Vision is 4th child */
    flex-direction: row-reverse;
  }

  /* Row 2 & 4: Text Left, Image Right - keep default row direction */
  .about-row:nth-child(3),
  .about-row:nth-child(5) {
    flex-direction: row;
  }

  .about-image {
    flex: 1;
    height: auto;
    min-height: 350px;
  }

  .about-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .about-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .about-content p {
    font-size: 1.05rem;
    line-height: 1.7;
  }
}

#journey-title {
  margin-bottom: 3rem;
}

/* Animation Classes */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Legacy reveal for other elements */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Journey Timeline Section */
.journey-section {
  background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.timeline-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Central Timeline Line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, 
    var(--primary) 0%, 
    #3b82f6 25%, 
    #6366f1 50%, 
    #8b5cf6 75%, 
    var(--primary) 100%);
  transform: translateX(-50%);
  z-index: 1;
  border-radius: 2px;
}

.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary);
}

.timeline-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px white, 0 0 0 8px var(--primary);
}

/* Timeline Items */
.timeline-item {
  position: relative;
  display: flex;
  margin-bottom: 4rem;
  gap: 6rem;
  align-items: center;
}

/* Timeline Dots */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 4px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--primary);
  transition: all 0.3s ease;
}

.timeline-item.visible .timeline-dot {
  animation: pulseTimeline 2s infinite;
}

@keyframes pulseTimeline {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 4px var(--primary);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3);
  }
}

/* Timeline Content */
.timeline-content {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  border-left: 4px solid var(--primary);
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -15px;
  width: 0;
  height: 0;
  border: 15px solid transparent;
  border-left-color: white;
  transform: translateY(-50%);
}

.timeline-item-reverse .timeline-content {
  border-left: none;
  border-right: 4px solid var(--primary);
}

.timeline-item-reverse .timeline-content::before {
  right: auto;
  left: -15px;
  border-left-color: transparent;
  border-right-color: white;
}

.timeline-year {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: var(--foreground);
  font-weight: 600;
}

.timeline-content p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

/* Timeline Images */
.timeline-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.timeline-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* YouTube container within timeline images */
.timeline-image .youtube-container {
  border-radius: 0; /* Override border-radius since parent has it */
  box-shadow: none; /* Remove duplicate shadow since parent has it */
  height: 300px; /* Match img height */
  padding-bottom: 0; /* Override aspect ratio padding */
}

.timeline-image .youtube-container iframe {
  height: 100%;
}

.timeline-item:hover .timeline-image img {
  transform: scale(1.05);
}

/* Mobile Styles */
@media (max-width: 767px) {
  .timeline-line {
    display: none;
  }

  .timeline-item {
    flex-direction: column;
    margin-bottom: 3rem;
    gap: 1rem;
  }

  .timeline-item-reverse {
    flex-direction: column;
  }

  .timeline-dot {
    left: 30px;
    top: 20px;
    width: 16px;
    height: 16px;
  }

  .timeline-content {
    width: 100%;
    padding: 1.5rem;
    margin-left: 0;
  }

  .timeline-content::before {
    top: 20px;
    right: auto;
    left: -15px;
    border-left-color: transparent;
    border-right-color: white;
  }

  .timeline-item-reverse .timeline-content::before {
    left: -15px;
    border-left-color: transparent;
    border-right-color: white;
  }

  .timeline-image {
    width: 100%;
    order: 2;
  }

  .timeline-image img {
    height: 200px;
  }

  .timeline-content h3 {
    font-size: 1.25rem;
  }
}

/* Desktop Styles */
@media (min-width: 768px) {
  .timeline-item {
    padding: 0 2rem;
  }

  /* Left-aligned items (odd items) */
  .timeline-item:not(.timeline-item-reverse) {
    justify-content: flex-end;
  }

  .timeline-item:not(.timeline-item-reverse) .timeline-image {
    order: 1;
  }

  .timeline-item:not(.timeline-item-reverse) .timeline-content {
    order: 2;
    margin-left: 5rem;
  }

  /* Right-aligned items (even items) */
  .timeline-item-reverse {
    justify-content: flex-start;
  }

  .timeline-item-reverse .timeline-content {
    order: 1;
    margin-right: 5rem;
  }

  .timeline-item-reverse .timeline-image {
    order: 2;
  }
}

/* Large Desktop Styles */
@media (min-width: 1024px) {
  .timeline-content {
    padding: 2.5rem;
  }

  .timeline-content h3 {
    font-size: 1.75rem;
  }

  .timeline-image img {
    height: 250px;
  }
}

/* Section styling */
section {
  padding: 3rem 0;
  scroll-margin-top: 80px;
}

@media (min-width: 900px) {
  section {
    padding: 4rem 0;
    scroll-margin-top: 80px;
  }
}

.section-header {
  margin-bottom: 4rem;
}

.section-header h2 {
  margin: 0 0 .25rem 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.lead {
  color: #374151;
  max-width: 65ch;
}