/* ============================================= */
/* Variables de color y tipografía */
:root {
  --primary: #005f73;
  --primary-dark: #003f4a;
  --accent: #ee9b00;
  --accent-dark: #ca7f00;
  --background: #f5f5f5;
  --background-alt: #e8f1f2;
  --text: #333;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --btn-bg: #ee9b00;
  --btn-hover: #ca7f00;
  --input-border: #ccc;
  --input-focus: #005f73;
  --font-family: 'Poppins', sans-serif;
}

/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============================================= */
/* Header */
header {
  background-color: var(--primary);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  box-shadow: 0 2px 4px var(--card-shadow);
  transition: transform 0.3s;
}
.logo-wrapper:hover {
  transform: rotate(10deg);
}
.logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo h1 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
}
nav ul {
  display: flex;
  list-style: none;
}
nav li {
  margin-left: 24px;
}
nav a {
  color: #fff;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.3s;
}
nav a:hover {
  color: var(--accent);
}
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  color: #fff;
  cursor: pointer;
}

/* ============================================= */
/* Hero */
.hero {
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  background: linear-gradient(
    rgba(0, 95, 115, 0.6),
    rgba(0, 95, 115, 0.8)
  );
}
.hero-content {
  position: relative;
  color: #fff;
  text-align: center;
  z-index: 2;
  padding: 0 20px;
  max-width: 700px;
}
.hero-content h2 {
  font-size: 2.6rem;
  margin-bottom: 12px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 24px;
}
.hero-content .btn {
  display: inline-block;
  background-color: var(--btn-bg);
  color: #fff;
  padding: 14px 32px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.hero-content .btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-3px);
}

/* ============================================= */
/* Secciones y fondos alternos */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.section:nth-of-type(even) {
  background-color: var(--background-alt);
}
.section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 36px;
  position: relative;
}
.section-title::after {
  content: '';
  width: 100px;
  height: 4px;
  background-color: var(--accent);
  display: block;
  margin: 12px auto 0;
  border-radius: 2px;
}
/* Ajuste para texto de Nosotros */
#nosotros .section-content p {
  margin-bottom: 40px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ============================================= */
/* Grid de Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 8px var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s, box-shadow 0.4s;
  opacity: 0;
}
.card[data-aos] {
  opacity: 1;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px var(--card-shadow);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-content h4 {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 12px;
}
.card-content h4 i {
  margin-right: 10px;
  color: var(--accent);
  font-size: 1.3rem;
}
.card-content p {
  flex: 1;
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.card-content ul {
  font-size: 0.9rem;
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 16px;
}

/* ============================================= */
/* Formulario de contacto */
#contacto .section-content input,
#contacto .section-content textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#contacto .section-content input:focus,
#contacto .section-content textarea:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 6px rgba(0, 95, 115, 0.4);
  outline: none;
}
/* Botón Enviar en formulario */
#contacto .section-content button.btn {
  width: 100%;
  text-align: center;
  padding: 12px 0;
}

/* ============================================= */
/* Footer */
footer {
  background-color: var(--primary);
  color: #fff;
  text-align: center;
  padding: 24px 20px;
  margin-top: 40px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-social {
  margin-top: 16px;
}
.footer-social a {
  margin: 0 10px;
  color: #fff;
  font-size: 1.4rem;
  transition: color 0.3s;
}
.footer-social a:hover {
  color: var(--accent);
}

/* ============================================= */
/* Responsive */
@media (max-width: 992px) {
  .hero-content h2 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
}
@media (max-width: 768px) {
  .hero {
    height: 50vh;
  }
  .hero-overlay {
    height: 50vh;
  }
  .hero-content {
    padding: 0 15px;
  }
  .hero-content h2 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
  header {
    padding: 10px;
  }
  nav ul {
    flex-direction: column;
    background: var(--primary);
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    display: none;
  }
  nav.active ul {
    display: flex;
  }
  nav li {
    margin: 12px 0;
    text-align: center;
  }
  .menu-toggle {
    display: block;
  }
}
@media (max-width: 480px) {
  .section {
    padding: 60px 10px;
  }
  .card img {
    height: 160px;
  }
  .card-content h4 {
    font-size: 1rem;
  }
  .card-content p {
    font-size: 0.9rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  #contacto .section-content input,
  #contacto .section-content textarea {
    font-size: 0.9rem;
    padding: 12px;
  }
}
