:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --dark-bg: #212529;
  --dark-text: #e9ecef;
  --header-height: 70px;
  --footer-height: 200px;
  --transition: all 0.3s ease;
}

/* Tema oscuro */
[data-theme="dark"] {
  --primary-color: #2980b9;
  --secondary-color: #27ae60;
  --accent-color: #c0392b;
  --text-color: #e9ecef;
  --light-bg: #343a40;
  --dark-bg: #121416;
  --dark-text: #e9ecef;
}

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

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
  line-height: 1.6;
  transition: var(--transition);
  overflow-x: hidden;
}

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

/* Header */
header {
  background-color: var(--primary-color);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

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

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

.logo img {
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

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

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

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

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

/* Utilidades */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 48px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--secondary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

#clock {
  font-size: 1rem;
  margin-left: 15px;
  color: white;
  font-weight: 500;
}

/* Main Content */
main {
  padding-top: calc(var(--header-height) + 40px);
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  transition: var(--transition);
}

.hero {
  text-align: center;
  padding: 60px 0;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  margin-bottom: 40px;
  border-radius: 10px;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

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

/* Posts */
.posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.post-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  background-color: white;
}

[data-theme="dark"] .post-card {
  background-color: var(--dark-bg);
}

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

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

.post-content {
  padding: 20px;
}

.post-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.post-content p {
  margin-bottom: 15px;
  color: var(--text-color);
}

.read-more {
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: var(--transition);
}

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

/* Página de Post Individual */
.single-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .single-post {
  background-color: var(--dark-bg);
}

.single-post img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
}

.single-post h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.post-meta {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: #666;
}

[data-theme="dark"] .post-meta {
  color: #aaa;
}

.post-meta span {
  margin-right: 20px;
  display: flex;
  align-items: center;
}

.post-meta svg {
  margin-right: 5px;
}

.single-post-content {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 30px;
  color: var(--text-color);
}

.post-tags {
  margin-top: 20px;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  background-color: #f1f1f1;
  color: #333;
  border-radius: 20px;
  margin-right: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  transition: var(--transition);
}

[data-theme="dark"] .tag {
  background-color: #444;
  color: #ddd;
}

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

/* About Page */
.about-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .about-section {
  background-color: var(--dark-bg);
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.about-section p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
}

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

.team-member {
  text-align: center;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid var(--primary-color);
}

.team-member h3 {
  margin-bottom: 5px;
  color: var(--text-color);
}

.team-member p {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-links a {
  color: var(--primary-color);
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--secondary-color);
}

/* Contact Page */
.contact-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .contact-section {
  background-color: var(--dark-bg);
}

.contact-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.contact-info {
  margin-bottom: 30px;
}

.contact-info div {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-info svg {
  margin-right: 10px;
  color: var(--primary-color);
}

.contact-form {
  margin-top: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-color);
  background-color: white;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background-color: #333;
  border-color: #555;
  color: white;
}

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

.submit-button {
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

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

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  padding: 40px 0;
  margin-top: 60px;
  height: var(--footer-height);
}

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

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #aaa;
  text-decoration: none;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #444;
  margin-top: 30px;
}

.social-footer {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.social-footer a {
  color: #aaa;
  margin: 0 10px;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-footer a:hover {
  color: white;
}

/* Cookies Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background-color: #fff;
  color: #333;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s ease;
}

.cookie-banner.active {
  transform: translateY(0);
  opacity: 1;
}

[data-theme="dark"] .cookie-banner {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

.cookie-content {
  flex: 1;
}

.cookie-content h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.cookie-content p {
  font-size: 0.9rem;
}

.cookie-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

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

.cookie-buttons button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

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

.accept-all:hover {
  background-color: var(--secondary-color);
}

.customize, .reject {
  background-color: #f1f1f1;
  color: #333;
}

[data-theme="dark"] .customize,
[data-theme="dark"] .reject {
  background-color: #444;
  color: #ddd;
}

.customize:hover, 
.reject:hover {
  background-color: #ddd;
}

[data-theme="dark"] .customize:hover,
[data-theme="dark"] .reject:hover {
  background-color: #555;
}

/* Thank You Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-50px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .modal-content {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

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

.modal h2 {
  margin-bottom: 15px;
  color: var(--text-color);
}

.modal p {
  margin-bottom: 20px;
  color: var(--text-color);
}

.modal button {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    padding: 10px 0;
  }
  
  header {
    height: auto;
    position: relative;
  }
  
  nav ul {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav ul li {
    margin: 5px 10px;
  }
  
  main {
    padding-top: 40px;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .posts-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-content {
    margin-bottom: 15px;
  }
  
  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-buttons button {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 20px;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .post-card img {
    height: 150px;
  }
  
  .post-content h3 {
    font-size: 1.2rem;
  }
  
  .single-post h2 {
    font-size: 1.8rem;
  }
  
  .about-section h2,
  .contact-section h2 {
    font-size: 1.8rem;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 90%;
  }
}
