/* --- Variables & Reset --- */
:root {
  --primary-color: #1a3d9b;
  /* Deep Teal - Trust */
  --secondary-color: #4db6ac;
  /* Seafoam - Health */
  --accent-color: #ff8a65;
  /* Soft Coral - Humanity */
  --bg-light: #f4f9f9;
  /* Very Light Teal background */
  --text-dark: #1a3d9b;
  --text-light: #ffffff;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #fff;
}

/* --- Layout Components --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navigation --- */
header {
  background: #fff;
  height: 80px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
  font-size: 1.0rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 75px;
  margin-right: 10px;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  margin-left: 25px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

nav a:hover {
  color: var(--secondary-color);
}

.nav-cta {
  background: var(--primary-color);
  color: var(--text-light) !important;
  padding: 10px 20px;
  border-radius: 50px;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 30px;
  color: #555;
}

.btn-main,
.btn {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 15px 35px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(77, 182, 172, 0.3);
  transition: var(--transition);
}

.btn-main:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(77, 182, 172, 0.4);
}

/* --- Services Grid --- */
.services {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  padding: 40px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 15px;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  margin-left: 0;
  /* Margin handled by gap now */
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 768px) {

  body,
  html {
    overflow-x: hidden;
    width: 100%;
  }

  header {
    height: auto;
    padding: 15px 0;
  }

  header .container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logo {
    margin-bottom: 5px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  nav {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  #lang-toggle {
    margin-left: 0;
    margin-top: 5px;
  }

  .about-wrapper {
    flex-direction: column;
    gap: 30px;
    padding: 40px 0;
    text-align: center;
  }

  .about-text,
  .about-image {
    min-width: 100%;
  }

  .modal-content {
    width: 95%;
    overflow-y: auto;
    /*
    background-color: #fff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    height: 90vh;
    margin: 5vh auto;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    */
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 20px;
  }

  .footer-brand p {
    margin: 15px auto;
  }

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

  .team-grid {
    grid-template-columns: 1fr;
    /* Single column on mobile */
    gap: 20px;
  }
}

/* --- Team Grid Styles --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.team-card {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 15px;
  border: 1px solid #eee;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-color: var(--secondary-color);
}

.staff-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--bg-light);
}

.staff-name {
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.staff-role {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Contact Section Styles --- */
.contact-section {
  padding: 100px 20px;
}

.contact-grid {
  display: grid;
  gap: 60px;
  align-items: start;
}

.info-item {
  margin-bottom: 25px;
}

.info-item strong {
  display: block;
  color: var(--primary-color);
  margin-bottom: 5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* Hours Table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  grid-template-columns: 1fr;
  max-width: 400px;
}

.hours-table td {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--primary-color);
}

/* Form Styling */
.contact-form-container {
  background: var(--bg-light);
  padding: 40px;
  border-radius: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--secondary-color);
  border-color: transparent;
}

/* --- Modal Background --- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

/* --- Modal Box --- */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  height: 90vh;
  margin: 5vh auto;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--primary-color);
}

.modal-text {
  margin: 20px 0;
  line-height: 1.8;
  color: #555;
  text-align: center;
}

.staff-photo-modal {
  border-radius: 50%;
  margin-bottom: 20px;
  border: 3px solid var(--bg-light);
  max-width: 90%;
  max-height: calc(100vh - 500px);
}

.privacy-note {
  font-size: 0.75rem;
  text-align: center;
  margin-top: 15px;
  color: #888;
}

.main-footer {
  background: var(--primary-color);
  color: white;
  padding: 60px 0 20px;
  margin-top: 80px;
  width: 100%;
  position: relative;
  left: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  margin-top: 15px;
  opacity: 0.8;
  max-width: 250px;
}

.footer-links h4,
.footer-social h4 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  padding-left: 5px;
}

.social-icons a {
  color: white;
  text-decoration: none;
  margin-right: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
}

.footer-bottom {
  text-align: center;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.6;
}

.dev-credit {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.dev-credit a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  transition: var(--transition);
}

.dev-credit a:hover {
  color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
}

/* Hide elements with translation data until the script runs */
[data-en] {
  visibility: hidden;
}

/* Show them once the script (or CSS) adds a 'loaded' or lang class */
.lang-en [data-en],
.lang-es [data-en] {
  visibility: visible;
}

#lang-toggle {
  background: none;
  border: 1px solid #ddd;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 5px;
  margin-left: 15px;

  /* Internal button stability */
  min-width: 145px;
  display: inline-flex;
  justify-content: center;
  align-items: center;

  font-family: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: var(--transition);
}

#lang-toggle:hover {
  border-color: var(--secondary-color);
  background-color: var(--bg-light);
}

.about-wrapper {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 60px 0;
}

.about-text,
.about-image {
  flex: 1;
  min-width: 300px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: block;
}