/* ====== VARIABLES ====== */
:root {
  /* Primary colors */
  --primary-color: #3a86ff;
  --primary-dark: #2667cc;
  --primary-light: #60a0ff;
  
  /* Complementary colors */
  --secondary-color: #ff7b00;
  --secondary-dark: #cc6200;
  --secondary-light: #ff9a3f;
  
  /* Split-complementary colors */
  --accent-1: #ffbe0b;
  --accent-1-dark: #cc9800;
  --accent-1-light: #ffd04f;
  
  --accent-2: #fb5607;
  --accent-2-dark: #d94600;
  --accent-2-light: #ff7a3d;
  
  /* Neutral colors */
  --dark: #1a1a2e;
  --dark-medium: #303045;
  --medium: #6f6f8f;
  --light-medium: #aeaebc;
  --light: #f8f8fc;
  
  /* Shadows and effects */
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --btn-shadow: 0 4px 12px rgba(58, 134, 255, 0.2);
  --hover-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  
  /* Typography */
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Work Sans', sans-serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 0 1.5rem;
  
  /* Border radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ====== RESET & BASE STYLES ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--dark);
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--dark-medium);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ====== UTILITY CLASSES ====== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

.section-padding {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--medium);
}

/* ====== BUTTONS ====== */
.btn,
button,
input[type="submit"] {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--light);
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--btn-shadow);
  outline: none;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  color: #fff;
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(58, 134, 255, 0.3);
}

.primary-btn {
  background-color: var(--primary-color);
  color: var(--light);
}

.primary-btn:hover {
  background-color: var(--primary-dark);
}

.secondary-btn {
  background-color: var(--secondary-color);
  color: var(--light);
}

.secondary-btn:hover {
  background-color: var(--secondary-dark);
}

.research-btn {
  background-color: var(--accent-1);
  color: var(--dark);
}

.research-btn:hover {
  background-color: var(--accent-1-dark);
  color: var(--light);
}

.resource-btn {
  background-color: var(--accent-2);
  color: var(--light);
}

.resource-btn:hover {
  background-color: var(--accent-2-dark);
}

.news-btn {
  background-color: transparent;
  color: var(--primary-color);
  box-shadow: none;
  padding: 0.6rem 0;
  position: relative;
  font-weight: 600;
}

.news-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.news-btn:hover {
  background-color: transparent;
  color: var(--primary-dark);
  box-shadow: none;
  transform: translateY(0);
}

.news-btn:hover::after {
  width: 100%;
}

/* ====== CARDS ====== */
.card {
  background-color: var(--light);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.card-image {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  max-width: 400px;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

.card-content {
  padding: 1.5rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ====== HEADER ====== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 1.8rem;
  margin-bottom: 0;
  color: var(--primary-color);
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  margin-bottom: 0;
}

.desktop-nav ul li {
  margin: 0 0 0 1.5rem;
}

.desktop-nav ul li a {
  color: var(--dark);
  font-weight: 500;
  position: relative;
}

.desktop-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.desktop-nav ul li a:hover {
  color: var(--primary-color);
}

.desktop-nav ul li a:hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark);
  border-radius: 3px;
  transition: var(--transition-normal);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--light);
  padding: 1rem 0;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav ul li {
  margin-bottom: 0;
}

.mobile-nav ul li a {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--dark);
  font-weight: 500;
}

.mobile-nav ul li a:hover {
  background-color: rgba(58, 134, 255, 0.05);
  color: var(--primary-color);
}

/* ====== HERO SECTION ====== */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 12rem 0 8rem;
  display: flex;
  align-items: center;
  text-align: center;
}

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

.hero-content h1 {
  color: var(--light);
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
  font-weight: 700;
}

.hero-content p {
  color: var(--light);
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ====== ABOUT SECTION ====== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  order: 1;
}

.about-image {
  order: 2;
  display: flex;
  justify-content: center;
}

.about-image img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
}

.about-timeline {
  margin-top: 2rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--light-medium);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.3rem;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--light);
}

.timeline-content h4 {
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

/* ====== SERVICES SECTION ====== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.services-grid .card-image {
  height: 200px;
}

/* ====== PORTFOLIO SECTION ====== */
.portfolio {
  background-color: var(--light);
}

.portfolio-carousel {
  position: relative;
  margin: 0 -1.5rem;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  padding: 2rem 4rem;
}

.carousel-track {
  display: flex;
  transition: var(--transition-normal);
}

.carousel-item {
  flex: 0 0 100%;
  padding: 0 1.5rem;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--light);
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.carousel-control.prev {
  left: 1rem;
}

.carousel-control.next {
  right: 1rem;
}

/* ====== RESEARCH SECTION ====== */
.research {
  background-color: var(--light);
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.research-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background-color: var(--light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition-normal);
}

.research-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.research-image {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

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

.research-content {
  padding: 2rem;
}

.research-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.research-content p {
  margin-bottom: 1.5rem;
}

/* ====== RESOURCES SECTION ====== */
.resources {
  background-color: var(--light);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.resources-grid .card-image {
  height: 200px;
}

/* ====== TESTIMONIALS SECTION ====== */
.testimonials {
  background-color: var(--light);
}

.testimonial-card {
  text-align: center;
  padding: 2rem;
}

.testimonial-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  box-shadow: var(--card-shadow);
}

.testimonial-text {
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--dark-medium);
  position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
  content: '"';
  color: var(--primary-light);
  font-size: 3rem;
  line-height: 0;
  vertical-align: -20px;
}

.testimonial-author h4 {
  margin-bottom: 0.2rem;
  color: var(--primary-color);
}

.testimonial-author p {
  margin-bottom: 0;
  color: var(--medium);
  font-size: 0.9rem;
}

/* ====== NEWS SECTION ====== */
.news {
  background-color: var(--light);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.news-grid .card-image {
  height: 200px;
}

.news-date {
  color: var(--medium);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-grid .card-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  transition: var(--transition-normal);
}

.news-grid .card:hover .card-content h3 {
  color: var(--primary-color);
}

/* ====== CONTACT SECTION ====== */
.contact {
  background-color: var(--light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.contact-info {
  background-color: var(--light);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-item h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.contact-item p {
  margin-bottom: 0;
}

.contact-map {
  margin-top: 2rem;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.contact-form-container {
  background-color: var(--light);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
}

.contact-form-container h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-align: center;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--light-medium);
  border-radius: var(--border-radius-md);
  font-family: var(--body-font);
  font-size: 1rem;
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.1);
}

textarea {
  resize: vertical;
}

.form-group:nth-child(5),
.form-group:nth-child(6),
.form-group:nth-child(7) {
  grid-column: 1 / -1;
}

.submit-btn {
  justify-self: start;
  grid-column: 1 / -1;
  margin-top: 1rem;
}

/* ====== FOOTER ====== */
.footer {
  background-color: var(--dark);
  color: var(--light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-about h3,
.footer-links h3,
.footer-contact h3,
.footer-social h3 {
  color: var(--light);
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
}

.footer-about h3::after,
.footer-links h3::after,
.footer-contact h3::after,
.footer-social h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
}

.footer-about p {
  color: var(--light-medium);
  margin-bottom: 0;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links ul li a {
  color: var(--light-medium);
  transition: var(--transition-fast);
  display: inline-block;
  position: relative;
}

.footer-links ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.footer-links ul li a:hover {
  color: var(--primary-color);
}

.footer-links ul li a:hover::after {
  width: 100%;
}

.footer-contact p {
  color: var(--light-medium);
  margin-bottom: 0.8rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-links a {
  color: var(--light-medium);
  transition: var(--transition-fast);
  font-weight: 500;
  display: inline-block;
  position: relative;
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.social-links a:hover {
  color: var(--primary-color);
}

.social-links a:hover::after {
  width: 100%;
}

.footer-bottom {
  margin-top: 3rem;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: var(--light-medium);
  margin-bottom: 0;
}

/* ====== SUCCESS PAGE ====== */
.success-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.success-container {
  max-width: 600px;
}

.success-icon {
  color: var(--primary-color);
  font-size: 5rem;
  margin-bottom: 2rem;
}

.success-buttons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ====== PRIVACY & TERMS PAGES ====== */
.page-content {
  padding-top: 100px;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.page-content p,
.page-content ul {
  margin-bottom: 1rem;
}

/* ====== MEDIA QUERIES ====== */
@media (max-width: 1200px) {
  h1 {
    font-size: 2.8rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 992px) {
  .hero {
    padding: 10rem 0 6rem;
  }
  
  .about-content,
  .research-item,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-image {
    order: 1;
  }
  
  .about-text {
    order: 2;
  }
  
  .research-image {
    height: 300px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .section-padding {
    padding: 4rem 0;
  }
  
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-nav.active {
    display: block;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero {
    padding: 8rem 0 5rem;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  .testimonial-image {
    width: 100px;
    height: 100px;
  }
}

/* Animation for morphing */
@keyframes morphing {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.about-image img,
.testimonial-image img {
  animation: morphing 8s ease-in-out infinite;
}

/* Mobile menu animations */
.mobile-menu-toggle.active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:last-child {
  transform: rotate(-45deg) translate(7px, -7px);
}