/* Variables globales */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --text-color: #333;
  --white: #ffffff;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --font-size-default: 16px;
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
  font-size: var(--font-size-default);
}

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

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.logo img {
  width: 50px;
  height: auto;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: var(--white);
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 4px;
  transition: var(--transition);
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/1.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  padding: 100px 0;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
  animation: fadeInUp 1s ease;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Secciones principales */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

/* Grid de posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.post-card {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

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

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

.post-content {
  padding: 20px;
}

.post-date {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 10px;
  display: block;
}

.post-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.post-excerpt {
  color: #666;
  margin-bottom: 20px;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
}

.read-more:hover {
  color: var(--accent-color);
}

/* Página de post individual */
.post-header {
  text-align: center;
  margin-bottom: 40px;
}

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.post-meta {
  color: #666;
  margin-bottom: 20px;
}

.post-featured-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  margin-bottom: 30px;
  border-radius: 10px;
}

.post-content-full {
  line-height: 1.8;
}

.post-content-full p {
  margin-bottom: 20px;
}

.post-content-full h2,
.post-content-full h3 {
  margin-top: 30px;
  margin-bottom: 15px;
}

.post-content-full ul,
.post-content-full ol {
  margin-left: 20px;
  margin-bottom: 20px;
}

.post-content-full blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: #666;
}

/* Estadísticas */
.stats-container {
  background-color: var(--dark-color);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-item {
  padding: 20px;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.stat-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Página Sobre Nosotros */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.team-member {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-10px);
}

.team-img {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

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

.team-info {
  padding: 20px;
}

.team-info h3 {
  margin-bottom: 5px;
}

.team-info p:first-of-type {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.social-icons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background-color: var(--light-color);
  color: var(--dark-color);
  border-radius: 50%;
  transition: var(--transition);
}

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

/* Página de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

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

.info-item {
  margin-bottom: 25px;
  display: flex;
  align-items: flex-start;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 15px;
  min-width: 30px;
}

.info-details h4 {
  margin-bottom: 5px;
}

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

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

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

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  background-color: var(--primary-color);
  width: 100%;
}

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

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

.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-links a {
  color: #ccc;
  transition: var(--transition);
}

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

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

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

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

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  font-size: 0.9rem;
}

.footer-bottom-links {
  text-align: center;
  margin-top: 15px;
}

.footer-bottom-links a {
  color: #ccc;
  margin: 0 10px;
}

/* Modal de Cookie */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--dark-color);
  color: var(--white);
  padding: 15px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
  max-width: 80%;
}

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

.cookie-btn {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

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

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

.btn-reject {
  background-color: #ddd;
  color: var(--text-color);
}

/* Modal de Gracias */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 500px;
  width: 90%;
  transform: translateY(50px);
  transition: all 0.5s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-icon {
  font-size: 4rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.modal h3 {
  margin-bottom: 15px;
  color: var(--dark-color);
}

.modal p {
  margin-bottom: 25px;
  color: #666;
}

.close-modal {
  display: inline-block;
  padding: 10px 25px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  background-color: var(--dark-color);
}

/* Botón de cambio de tamaño de fuente */
.font-size-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 99;
  transition: var(--transition);
  border: none;
}

.font-size-btn:hover {
  background-color: var(--accent-color);
}

/* Animaciones */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries */
@media screen and (max-width: 768px) {
  .header-container {
    flex-direction: column;
  }

  nav {
    margin-top: 20px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 10px 0;
  }

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

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

@media screen and (max-width: 576px) {
  .header-container {
    flex-direction: row;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    padding: 20px;
    margin-top: 0;
  }

  nav.active {
    display: block;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .cookie-content {
    max-width: 100%;
    margin-bottom: 15px;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: space-between;
  }
}
