/* Variables globales */
:root {
  --primary-color: #1e88e5;
  --secondary-color: #26a69a;
  --accent-color: #f57c00;
  --dark-color: #263238;
  --light-color: #eceff1;
  --text-color: #37474f;
  --white-color: #ffffff;
  --success-color: #4caf50;
  --error-color: #e53935;
  --border-color: #cfd8dc;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Lato', sans-serif;
  --navbar-height: 80px;
}

/* Importación de fuentes (opcional: puedes enlazarlas en el head del documento HTML) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

a:hover {
  color: var(--accent-color);
}

ul {
  list-style: none;
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Encabezado y navegación */
header {
  background-color: var(--white-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
}

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

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 15px;
}

.logo-container h1 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--dark-color);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 8px 0;
  position: relative;
}

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

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.nav-links li a.active {
  color: var(--primary-color);
}

/* Sección Hero */
.hero, .blog-hero, .about-hero, .contact-hero {
  background: linear-gradient(to right, rgba(30, 136, 229, 0.8), rgba(38, 166, 154, 0.8)), url(images/6.jpg);
  background-size: cover;
  background-position: center;
  color: var(--white-color);
  padding: 100px 0;
  text-align: center;
}

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

.hero h2, .blog-hero h2, .about-hero h2, .contact-hero h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p, .blog-hero p, .about-hero p, .contact-hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

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

.btn-primary:hover {
  background-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-secondary:hover {
  background-color: #00897b;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-accept {
  background-color: var(--success-color);
  color: var(--white-color);
}

.btn-accept:hover {
  background-color: #43a047;
}

.btn-customize, .btn-reject {
  background-color: transparent;
  color: var(--dark-color);
  border: 1px solid var(--border-color);
}

.btn-customize:hover, .btn-reject:hover {
  background-color: var(--light-color);
}

/* Secciones */
section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 50px;
  color: var(--dark-color);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  margin: 15px auto 0;
}

/* Tarjetas de Posts */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.post-card {
  background: var(--white-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

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

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

.post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-content h3 {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #78909c;
  margin-bottom: 10px;
}

.post-content p {
  margin-bottom: 15px;
  flex-grow: 1;
}

.read-more {
  align-self: flex-start;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  position: relative;
  padding-right: 20px;
}

.read-more::after {
  content: '→';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition);
}

.read-more:hover::after {
  right: -5px;
}

.cta-center {
  text-align: center;
  margin-top: 20px;
}

/* Sección de Llamado a la Acción (CTA) */
.cta-section {
  background-color: var(--light-color);
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding: 70px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.footer-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 15px;
}

.footer-logo h3 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.footer-logo p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-links h4, .footer-contact h4, .footer-social h4 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-links h4::after, .footer-contact h4::after, .footer-social h4::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  position: absolute;
  bottom: -8px;
  left: 0;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links ul a:hover {
  opacity: 1;
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-contact p {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.footer-contact i {
  margin-right: 10px;
  font-size: 1.2rem;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white-color);
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-links {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.legal-links a {
  color: var(--white-color);
  opacity: 0.7;
  font-size: 0.9rem;
  transition: var(--transition);
}

.legal-links a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom p {
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Banner de Cookies */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--white-color);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  padding: 15px 0;
  display: block;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.cookie-content p {
  margin-bottom: 15px;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.cookie-content a {
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Página de Blog */
.blog-posts {
  background-color: #f5f5f5;
}

/* Página Sobre Nosotros */
.about-mission {
  background-color: var(--white-color);
}

.mission-content {
  max-width: 600px;
}

.mission-content h2 {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.mission-content p {
  margin-bottom: 15px;
}

.about-mission .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.mission-image {
  flex: 1;
}

.mission-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* Valores */
.about-values {
  background-color: #f5f5f5;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.value-card {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.value-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.value-card h3 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color);
}

/* Equipo */
.team-section {
  background-color: var(--white-color);
}

.team-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}

.team-card {
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
}

.team-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: var(--box-shadow);
}

.team-card h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--dark-color);
}

.team-card p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.team-card p:nth-child(3) {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Página de Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.contact-info {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  padding: 30px;
}

.contact-info h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--dark-color);
}

.info-item {
  display: flex;
  margin-bottom: 20px;
}

.info-icon {
  margin-right: 15px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-color);
}

.info-text h4 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--dark-color);
}

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(30, 136, 229, 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.contact-form-container {
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
}

.contact-form-container h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--dark-color);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
}

.checkbox-group input {
  width: auto;
  margin-right: 10px;
  margin-top: 5px;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
}

.map-section {
  background-color: #f5f5f5;
}

.map-section h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--dark-color);
  text-align: center;
}

.map-container {
  height: 400px;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.map-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal de agradecimiento */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: var(--white-color);
  margin: 15% auto;
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 500px;
  text-align: center;
  position: relative;
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal h3 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.modal p {
  margin-bottom: 20px;
}

.modal .btn {
  margin-top: 10px;
}

/* Botón de comprobar ortografía */
.orthography-check {
  margin-top: 20px;
}

/* Estilos responsivos */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .about-mission .container {
    flex-direction: column;
  }

  .mission-content, .mission-image {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .hero h2, .blog-hero h2, .about-hero h2, .contact-hero h2, .cta-section h2 {
    font-size: 2rem;
  }

  .hero p, .blog-hero p, .about-hero p, .contact-hero p, .cta-section p {
    font-size: 1rem;
  }

  .post-grid, .values-grid, .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

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

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .cookie-content {
    flex-direction: column;
  }

  .cookie-buttons {
    flex-wrap: wrap;
  }
}

@media screen and (max-width: 576px) {
  header .container {
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  header {
    height: auto;
  }

  .logo-container {
    margin-bottom: 15px;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links li a {
    font-size: 0.8rem;
    padding: 5px 0;
  }

  section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }

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

  .footer-logo, .footer-links, .footer-contact, .footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .social-icons {
    justify-content: center;
  }

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

  .info-icon {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .legal-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Iconos adicionales (para el footer) */
.icon-location:before {
  content: "📍";
}

.icon-phone:before {
  content: "📞";
}

.icon-email:before {
  content: "✉️";
}
