:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f9f9f9;
  --header-bg: #fff;
  --footer-bg: #2c3e50;
  --card-bg: #fff;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --font-main: 'Roboto', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

/* Tema oscuro */
[data-theme="dark"] {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --text-color: #f0f0f0;
  --bg-color: #222;
  --header-bg: #1a1a1a;
  --footer-bg: #111;
  --card-bg: #333;
  --border-color: #444;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header y Navegación */
header {
  background-color: var(--header-bg);
  box-shadow: 0 2px 10px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

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

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

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  color: var(--text-color);
  font-size: 1.2rem;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  background-color: white;
  color: var(--primary-color);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Timer */
.countdown-container {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px var(--shadow-color);
  text-align: center;
  transition: background-color 0.3s ease;
}

.countdown-title {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

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

.countdown-number {
  font-size: 2rem;
  font-weight: bold;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

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

.post-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

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

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.post-excerpt {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  opacity: 0.9;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  transition: color 0.3s ease;
}

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

/* Artículo individual */
.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
}

.article-meta .date {
  margin-right: 1.5rem;
}

.article-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-family: var(--font-heading);
  margin: 2rem 0 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.article-tag {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.share-button {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.share-button:hover {
  background-color: var(--primary-color);
  color: white;
}

.related-posts {
  margin-top: 3rem;
}

.related-posts h3 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
}

/* Página Sobre Nosotros */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.about-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.team-section {
  margin-top: 4rem;
}

.team-section h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 3rem;
}

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

.team-member {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px var(--shadow-color);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

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

.team-member-info {
  padding: 1.5rem;
}

.team-member h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

.team-member p {
  margin-bottom: 1rem;
  color: var(--text-color);
  opacity: 0.9;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Página de contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: background-color 0.3s ease;
}

.contact-info h2 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-icon {
  margin-right: 1rem;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.contact-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.contact-form {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: background-color 0.3s ease;
}

.contact-form h2 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

.submit-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Cookie consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  padding: 1rem;
  box-shadow: 0 -2px 10px var(--shadow-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  transition: transform 0.5s ease, background-color 0.3s ease;
  transform: translateY(100%);
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-text {
  flex: 1;
  padding-right: 1rem;
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.accept-cookies {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

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

.reject-cookies {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

/* Modal para confirmación de formulario */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.modal-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-main);
  font-weight: 500;
  margin-top: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-button:hover {
  background-color: var(--secondary-color);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
  transition: background-color 0.3s ease;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-column h3 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

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

.footer-column p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  text-decoration: none;
  color: white;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

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

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.5rem 1rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Responsive */
@media (max-width: 992px) {
  .navbar {
    padding: 1rem 2%;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .about-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    box-shadow: 0 5px 10px var(--shadow-color);
    transform: translateY(-150%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    z-index: 50;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links li {
    margin: 0.8rem 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .countdown {
    flex-wrap: wrap;
  }
  
  .cookie-consent {
    flex-direction: column;
    padding: 1rem;
  }
  
  .cookie-text {
    margin-bottom: 1rem;
    padding-right: 0;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.2rem;
  }
  
  .logo img {
    height: 40px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
}
