/* IAF Homepage - Modern Corporate Design */

/* Global Variables */
:root {
  --iaf-primary: #0A2946;
  --iaf-secondary: #2989BD;
  --iaf-accent: #28a745;
  --iaf-warning: #ffc107;
  --iaf-light: #f7fafc;
  --iaf-dark: #1a1a1a;
  --iaf-gradient-primary: linear-gradient(135deg, #0A2946 0%, #2989BD 100%);
  --iaf-gradient-secondary: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Base Styles */
.homepage-section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.section-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image: 
    radial-gradient(circle at 20% 80%, var(--iaf-primary) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--iaf-secondary) 0%, transparent 50%);
}

/* Section Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* About Us Section */
.about-section {
  background: var(--iaf-light);
}

.about-visual {
  position: relative;
}

.about-image-main {
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(10, 41, 70, 0.2);
  position: relative;
  z-index: 2;
}

.about-floating-card {
  position: absolute;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}

.about-card-1 {
  top: 20%;
  left: -50px;
  animation-delay: 0s;
}

.about-card-2 {
  bottom: 20%;
  right: -50px;
  animation-delay: 2s;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--iaf-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* What We Do Section */
.what-we-do-section {
  background: var(--iaf-gradient-primary);
  color: white;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--iaf-accent);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-description {
  opacity: 0.9;
  line-height: 1.6;
}

/* Strategic Plan Section */
.strategic-section {
  background: white;
}

.strategy-timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--iaf-gradient-secondary);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 4rem;
  position: relative;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  padding: 2rem;
  background: var(--iaf-light);
  border-radius: 15px;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 10%;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 10%;
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--iaf-accent);
  color: white;
  padding: 1rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
  min-width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
}

/* Standards Section */
.standards-section {
  background: var(--iaf-dark);
  color: white;
}

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.standard-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.standard-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--iaf-accent);
  border-radius: 50%;
  transform: translate(50%, -50%);
  opacity: 0.1;
}

.standard-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--iaf-accent);
}

.standard-code {
  background: var(--iaf-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.standard-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.standard-description {
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.standard-features {
  list-style: none;
  padding: 0;
}

.standard-features li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 2rem;
}

.standard-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--iaf-accent);
  font-weight: bold;
}

/* Impact Section */
.impact-section {
  background: var(--iaf-light);
}

.impact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.metric-card {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--iaf-gradient-secondary);
}

.metric-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.metric-icon {
  font-size: 3.5rem;
  color: var(--iaf-secondary);
  margin-bottom: 1.5rem;
}

.metric-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--iaf-primary);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 1.1rem;
  color: #666;
  font-weight: 600;
}

.metric-description {
  font-size: 0.9rem;
  color: #888;
  margin-top: 1rem;
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  background: var(--iaf-gradient-primary);
  color: white;
  text-align: center;
  min-height: 70vh;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.cta-description {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-btn-primary {
  background: var(--iaf-accent);
  color: white;
  border: 2px solid var(--iaf-accent);
}

.cta-btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-btn-primary:hover {
  background: #20c997;
  border-color: #20c997;
  color: white;
}

.cta-btn-secondary:hover {
  background: white;
  color: var(--iaf-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .homepage-section {
    min-height: auto;
    padding: 4rem 0;
  }
  
  .timeline-line {
    left: 2rem;
  }
  
  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
    padding-left: 4rem;
  }
  
  .timeline-content {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .timeline-year {
    left: 2rem !important;
    transform: translateX(-50%);
    min-width: 60px;
    height: 60px;
    font-size: 1rem;
  }
  
  .about-card-1,
  .about-card-2 {
    position: static;
    margin: 1rem 0;
    animation: none;
  }
  
  .cta-title {
    font-size: 2.5rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.scroll-animate-left.animated {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-right {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.scroll-animate-right.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax Effect */
.parallax-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* Custom Shapes */
.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.section-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

.section-divider .shape-fill {
  fill: var(--shape-color, #ffffff);
}

/* Loading Animation */
.loading-animation {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.loading-animation.delay-1 { animation-delay: 0.2s; }
.loading-animation.delay-2 { animation-delay: 0.4s; }
.loading-animation.delay-3 { animation-delay: 0.6s; }
.loading-animation.delay-4 { animation-delay: 0.8s; }
.loading-animation.delay-5 { animation-delay: 1s; }

/* ============================================
   SCROLL ANIMATIONS & JAVASCRIPT INTERACTIONS
   ============================================ */

/* Intersection Observer Animation Classes */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.scroll-animate-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.scroll-animate-right.animate {
  opacity: 1;
  transform: translateX(0);
}

/* Delay Classes for Staggered Animations */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Metric Circle Animation */
.metric-circle {
  position: relative;
  background: conic-gradient(
    var(--iaf-primary) 0deg,
    var(--iaf-primary) var(--percentage, 0deg),
    #e9ecef var(--percentage, 0deg),
    #e9ecef 360deg
  );
  transition: all 1.2s ease-out;
}

.metric-circle.animate {
  --percentage: calc(var(--data-percentage) * 3.6deg);
}

/* Progress Bar Animation */
.progress-fill {
  width: 0 !important;
  transition: width 1.5s ease-out;
}

.progress-fill.animate {
  width: var(--target-width, 0%) !important;
}

/* Service Card Hover Effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.service-card:hover .service-icon i {
  transform: scale(1.1);
  color: var(--iaf-secondary);
}

/* Timeline Item Animation */
.timeline-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Standards Card Animation */
.standard-card {
  transition: all 0.3s ease;
}

.standard-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.standard-card:hover .standard-icon i {
  transform: scale(1.15);
}

/* Impact Metric Animation */
.impact-metric {
  transition: all 0.3s ease;
}

.impact-metric:hover {
  transform: translateY(-5px);
}

.impact-metric:hover .metric-circle {
  transform: scale(1.05);
}

/* Floating Card Animations */
.about-floating-card {
  animation: float 6s ease-in-out infinite;
}

.about-card-1 {
  animation-delay: 0s;
}

.about-card-2 {
  animation-delay: 3s;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .scroll-animate-left {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  .scroll-animate-left.animate {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-animate-right {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  .scroll-animate-right.animate {
    opacity: 1;
    transform: translateY(0);
  }
  
}
