/* ==========================
   ROOT VARIABLES
========================== */
:root {
  --primary: #2a7da2;
  --secondary: #5ec6c2;
  --accent: #f4f9fc;
  --dark: #0f2d40;
  --text: #333;
  --white: #fff;
  --shadow: 0 5px 15px rgba(0,0,0,0.08);
  --radius: 15px;
  --transition: 0.3s ease;
}

/* ==========================
   GLOBAL STYLES
========================== */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--accent);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ==========================
   BUTTONS
========================== */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--secondary);
  color: var(--dark);
}

.btn-primary:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* ==========================
   NAVBAR
========================== */
.site-header {
  background: var(--primary);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--white);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--white);
  cursor: pointer;
}

/* Mobile Navbar */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    width: 220px;
    padding: 20px;
    display: none;
    border-radius: 0 0 0 var(--radius);
    box-shadow: var(--shadow);
    animation: slideDown 0.3s ease;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================
   HERO SECTION
========================== */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeSlide 36s infinite;
}

.carousel-slide:nth-child(1) { animation-delay: 0s; }
.carousel-slide:nth-child(2) { animation-delay: 6s; }
.carousel-slide:nth-child(3) { animation-delay: 12s; }
.carousel-slide:nth-child(4) { animation-delay: 18s; }
.carousel-slide:nth-child(5) { animation-delay: 24s; }
.carousel-slide:nth-child(6) { animation-delay: 30s; }

@keyframes fadeSlide {
  0%, 20%, 100% { opacity: 0; }
  5%, 15% { opacity: 1; }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.25));
}

.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  max-width: 700px;
  padding: 2rem;
  z-index: 2;
  animation: fadeUp 1.5s ease;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================
   FEATURES SECTION
========================== */
.features-section {
  padding: 80px 20px;
  background: var(--accent);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 30px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 35px 25px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 15px;
}

.feature-card h3 {
  color: var(--dark);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

/* ==========================
   TEAM SECTION
========================== */
.team-section {
  padding: 80px 20px;
  background: var(--white);
  text-align: center;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 30px;
  margin-top: 40px;
}

.team-member {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.team-member:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.team-member img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--white);
  margin-bottom: 15px;
}

.team-member h3 {
  margin-bottom: 5px;
  color: var(--dark);
}

.team-member p {
  color: var(--text);
  font-size: 0.95rem;
}

/* ==========================
   MODALS
========================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--white);
  margin: 5% auto;
  padding: 30px 25px;
  border-radius: var(--radius);
  max-width: 650px;
  width: 90%;
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp 0.4s ease;
  position: relative;
}

.modal-content img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 4px solid var(--primary);
}

.modal-content h2 {
  margin: 10px 0;
  font-size: 1.6rem;
  color: var(--primary);
}

.modal-content p {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.modal-content strong {
  color: var(--dark);
}

.close {
  color: var(--dark);
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--secondary);
}

/* Modal navigation arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 38px;
  font-weight: bold;
  color: var(--primary);
  cursor: pointer;
  padding: 10px;
  user-select: none;
  transition: var(--transition);
}

.modal-nav:hover {
  color: var(--secondary);
}

.modal-nav.prev { left: 15px; }
.modal-nav.next { right: 15px; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================
   CTA SECTION
========================== */
.cta-section {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 70px 20px;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

/* ==========================
   AUTH FORMS
========================== */
.form-section {
  max-width: 420px;
  margin: 60px auto;
  background: var(--white);
  padding: 35px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.form-section h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.auth-form label {
  font-weight: 500;
}

.auth-form input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.btn-submit {
  background: var(--primary);
  color: var(--white);
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--secondary);
  color: var(--dark);
}

/* ==========================
   FOOTER
========================== */
footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 35px 20px;
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
  font-size: 0.9rem;
}

footer .social-links {
  margin-top: 10px;
}

footer .social-links a {
  color: var(--secondary);
  margin: 0 10px;
  font-size: 1.2rem;
}

footer .social-links a:hover {
  color: var(--white);
}

/* ==========================
   ANIMATIONS
========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .features-grid, 
  .team-grid {
    gap: 20px;
  }
  .modal-nav { font-size: 30px; }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .hero-content p {
    font-size: 0.9rem;
  }
  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
  }
  .modal-content { padding: 20px; }
  .modal-content img {
    width: 120px;
    height: 120px;
  }
}
