/* Reset for Specific Elements */
html, div, section, h1, h2, h3, p, a, img {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* About Section */
.about-section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 2rem auto;
  background: linear-gradient(-45deg, var(--background-dark), var(--primary-color), #3b5998, var(--accent-color));
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}



/* Heading */
.about-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeIn 1s ease-out;
}

/* Intro Text */
.intro-text {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

/* Button Group */
.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* Button Styles */
.btn-primary, .btn-secondary {
  padding: 0.8rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color);
}

.btn-primary:hover {
  background: var(--accent-color);
  color: var(--background-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

/* Story Flow */
.story-flow {
  display: grid;
  gap: 2rem;
  padding: 1rem 0;
}

/* Story Item */
.story-item {
  display: flex;
  flex-direction: row; /* Default for desktop: image and text side-by-side */
  align-items: center;
  gap: 1.5rem;
  background: rgba(18, 92, 195, 0.1);
  padding: 1.5rem;
  border-radius: 10px;
  animation: flowIn 0.8s ease forwards;
  opacity: 0;
}

.story-item:nth-child(odd) {
  flex-direction: row;
  transform: translateX(-30px);
}

.story-item:nth-child(even) {
  flex-direction: row-reverse;
  transform: translateX(30px);
}

.story-item:nth-child(1) { animation-delay: 0.2s; }
.story-item:nth-child(2) { animation-delay: 0.4s; }
.story-item:nth-child(3) { animation-delay: 0.6s; }
.story-item:nth-child(4) { animation-delay: 0.8s; }
.story-item:nth-child(5) { animation-delay: 1s; }

.story-item:hover .story-image {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Story Image */
.story-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  max-height: 150px;
  object-fit: cover; /* Ensure image fills space without distortion */
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block; /* Prevent margin issues */
}

/* Story Content */
.story-content {
  flex: 1;
}

.story-content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.story-content p,
.story-content ul {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.story-content ul {
  padding-left: 1.5rem;
  list-style: none;
}

.story-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.story-content ul li::before {
  content: '➔';
  position: absolute;
  left: 0;
  color: #000000;
  font-size: 1.1rem;
}

/* Animations */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes flowIn {
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-section {
    padding: 2rem 0.5rem;
    margin: 1rem auto;
  }

  .about-section h2 {
    font-size: 2rem;
  }

  .intro-text {
    font-size: 1rem;
    max-width: 90%;
  }

  .button-group {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-primary, .btn-secondary {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .story-item,
  .story-item:nth-child(even),
  .story-item:nth-child(odd) {
    flex-direction: column; /* Stack image above text on mobile */
    transform: translateX(0); /* Remove slide animation */
    text-align: center;
    align-items: center; /* Center content */
  }

  .story-image {
    max-width: 100%; /* Full width on smaller screens */
    max-height: 120px; /* Smaller for mobile */
    width: 100%; /* Ensure image takes full container width */
  }

  .story-content h3 {
    font-size: 1.5rem;
  }

  .story-content p,
  .story-content ul {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .about-section {
    padding: 1.5rem 0.5rem;
  }

  .story-item {
    padding: 1rem;
    gap: 1rem;
  }

  .story-image {
    max-height: 100px; /* Further reduced for small phones */
    width: 100%; /* Full width */
    object-fit: cover; /* Maintain aspect ratio */
  }

  .story-item:hover .story-image {
    transform: none; /* Prevent sliding on mobile */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Maintain hover effect */
  }
}

/* Prevent horizontal overflow */
body, html {
  overflow-x: hidden;
}

/* Contact Section */
.contact-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 80px auto;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 122, 0.1));
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: fadeIn 1.5s ease-out;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  background-image: url('https://images.unsplash.com/photo-1516321310764-8a238815b3a6?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
  background-size: cover;
  background-position: center;
  background-blend-mode: soft-light;
}

/* Contact Subsection */
.contact-subsection {
  text-align: center;
  padding: 0 20px;
}

.contact-subsection h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color:  rgba(41, 70, 126, 0.664);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.contact-subsection h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color:  rgba(41, 70, 126, 0.664);
  margin: 2rem 0 1rem;
}

.contact-subsection p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  color: #000000;
  line-height: 1.7;
}


/* Contact Form */
.contact-form-container {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid  rgba(41, 70, 126, 0.664);
  color: #ffffff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.3s ease, background 0.3s ease;
  font-family: 'Segoe UI', sans-serif;
}

.form-control:focus {
  border-color:  rgba(41, 70, 126, 0.664);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.form-control.textarea {
  resize: vertical;
  min-height: 140px;
}

.form-control + label {
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  font-size: 1rem;
  color: #000000;
  opacity: 0.7;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
  top: -0.8rem;
  left: 0.8rem;
  font-size: 0.85rem;
  color:  rgba(41, 70, 126, 0.664);
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 0 5px;
  border-radius: 4px;
}

.btn {
  background: transparent;
  border: 2px solid #00d4ff;
  color: #00d4ff;
  padding: 0.8rem 2.5rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  align-self: center;
  font-family: 'Segoe UI', sans-serif;
}

.btn:hover {
  background-color: #00d4ff;
  color: #1a1a1a;
  transform: translateY(-2px);
}

/* Form Message */
.form-message {
  margin-top: 1rem;
  font-size: 1rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  background: rgba(0, 255, 128, 0.2);
  color: #00ff80;
}

.form-message.error {
  background: rgba(255, 0, 0, 0.2);
  color: #ff4d4d;
}

/* Section Icon */
.section-icon {
  display: block;
  max-width: 100px;
  margin: 0 auto 20px;
  animation: fadeIn 1.2s ease-in-out;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-section {
    padding: 40px 15px;
    margin: 50px auto;
  }

  .contact-subsection h1 {
    font-size: 2.2rem;
  }

  .contact-subsection h2 {
    font-size: 1.5rem;
  }

  .contact-subsection p {
    font-size: 1rem;
  }

  .contact-form-container {
    padding: 20px;
  }

  .form-control {
    font-size: 0.95rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.7rem 2rem;
  }

  .social-links img {
    width: 32px;
    height: 32px;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .about-contact-section {
    padding: 40px 15px;
    margin: 50px auto;
  }

  .about-subsection h1,
  .contact-subsection h2 {
    font-size: 2rem;
  }

  .about-subsection h2 {
    font-size: 1.4rem;
  }

  .form-control {
    font-size: 0.95rem;
  }

  .btn {
    font-size: 0.9rem;
  }

  .icon {
    width: 24px;
  }
}
