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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Open Sans', sans-serif;
  color: #2c2c2c;
  line-height: 1.6;
  background: #fff;
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

/* ===== VARIABLES ===== */
:root {
  --navy: #1B2A4A;
  --navy-light: #243660;
  --blue: #2c5f8a;
  --teal: #1a7a8a;
  --gold: #c8952a;
  --light-bg: #f5f7fa;
  --text: #2c2c2c;
  --text-light: #666;
  --white: #ffffff;
  --nav-h: 70px;
}

/* ===== LAYOUT HELPERS ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--light-bg);
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy);
  text-align: center;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 14px auto 40px;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(27, 42, 74, 0.95);
  backdrop-filter: blur(6px);
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 48px; }

nav { display: flex; align-items: center; }

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.85);
  padding: 8px 12px;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  background-image: url('https://static.wixstatic.com/media/9504aa_ae03044d23df46438f3e9fd776947134~mv2.jpg/v1/fill/w_1920,h_828,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/9504aa_ae03044d23df46438f3e9fd776947134~mv2.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,20,40,0.55) 0%, rgba(10,20,40,0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-logo {
  max-width: 320px;
  margin: 0 auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.6));
}

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

.service-card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-text {
  padding: 20px 22px 24px;
}

.service-text h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.service-text p,
.service-text ul {
  font-size: 0.95rem;
  color: var(--text);
  text-align: justify;
  line-height: 1.7;
}

.service-text ul {
  list-style: disc;
  padding-left: 18px;
}

.service-text ul li { margin-bottom: 6px; }

/* ===== NOSOTROS ===== */
.nosotros-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.nosotros-text .section-title { text-align: left; }
.nosotros-text .section-divider { margin-left: 0; }

.nosotros-text p {
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  text-align: justify;
}

.nosotros-img img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  object-fit: cover;
  max-height: 500px;
}

/* ===== STATS BANNER ===== */
.stats-banner {
  background: var(--navy);
  padding: 56px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.25);
}

/* ===== TEAM ===== */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
}

.team-card {
  width: 320px;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
  transition: transform 0.25s, box-shadow 0.25s;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.team-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.team-info {
  padding: 16px 20px 20px;
}

.team-role {
  font-size: 0.88rem;
  color: var(--text-light);
}

.team-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-img img {
  width: 100%;
  aspect-ratio: 1 / 0.94;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-img img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ===== CONTACT ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info .section-title { text-align: left; }
.contact-info .section-divider { margin-left: 0; }

.contact-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.contact-info p {
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 6px;
}

.contact-details {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--light-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 4px 4px 0;
}

.contact-details h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.contact-details p { margin-bottom: 8px; }

.contact-details a {
  color: var(--blue);
  transition: color 0.2s;
}

.contact-details a:hover { color: var(--teal); }

/* ===== CONTACT FORM ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.required { color: #c0392b; }

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid #d0d8e4;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.12);
}

.btn-submit {
  align-self: flex-start;
  padding: 12px 36px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.btn-submit:active { transform: translateY(0); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.88rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nosotros-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nosotros-img { order: -1; }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stat-divider { display: none; }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }

  .section-title { font-size: 1.7rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--navy);
    padding: 12px 0;
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 12px 24px;
    border-radius: 0;
  }

  .nav-toggle { display: block; }

  .hero-logo { max-width: 220px; }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row { grid-template-columns: 1fr; }

  .services-grid { grid-template-columns: 1fr; }

  .team-card { width: 100%; max-width: 360px; }
}
