/* Base y variables */
:root {
  --primary-color: #0e6ba8;
  --primary-dark: #004c7d;
  --primary-light: #4a9ed3;
  --secondary-color: #ff7e00;
  --secondary-dark: #cc6500;
  --secondary-light: #ffa040;
  --text-color: #333333;
  --text-light: #666666;
  --background-color: #ffffff;
  --background-alt: #f5f9fc;
  --border-color: #e0e0e0;
  --success-color: #4CAF50;
  --error-color: #f44336;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Reset y estilos generales */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-color);
}

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

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

a:hover {
  color: var(--primary-dark);
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Header y navegación */
header {
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

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

.logo img {
  max-height: 60px;
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  font-weight: 600;
  color: var(--text-color);
  position: relative;
  padding-bottom: 0.5rem;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-color);
}

nav ul li a.active::after,
nav ul li a:hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.font-size-control {
  display: flex;
  align-items: center;
}

.font-size-control button {
  background: none;
  border: none;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.font-size-control button:hover {
  background-color: var(--background-alt);
  color: var(--primary-color);
}

/* Hero section */
.hero {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

/* Page header (para páginas internas) */
.page-header {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

/* Main content y layout */
main {
  padding: 3rem 0;
}

.blog-posts {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

main.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  main.container {
    grid-template-columns: 1fr;
  }
}

/* Post previews */
.post-preview {
  display: flex;
  flex-direction: column;
  background-color: var(--background-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.post-preview:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.post-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

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

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

.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: auto;
  position: relative;
}

.read-more::after {
  content: '→';
  margin-left: 0.5rem;
  transition: var(--transition);
}

.read-more:hover::after {
  margin-left: 0.75rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background-color: var(--background-alt);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.widget h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

/* Formulario de quejas */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(14, 107, 168, 0.2);
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

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

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

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

/* Lista de categorías */
.categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.categories a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-color);
  transition: var(--transition);
}

.categories a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.categories a::before {
  content: '→';
  margin-right: 0.5rem;
  color: var(--primary-color);
  opacity: 0;
  transition: var(--transition);
}

.categories a:hover::before {
  opacity: 1;
  margin-right: 0.75rem;
}

/* Footer */
footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

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

.footer-col p, .footer-col address p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: #ffffff;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 992px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.cookie-content {
  text-align: center;
}

.cookie-content p {
  margin-bottom: 1.25rem;
}

.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-cookie {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

#accept-cookies {
  background-color: var(--primary-color);
  color: white;
}

#accept-cookies:hover {
  background-color: var(--primary-dark);
}

#customize-cookies {
  background-color: var(--background-alt);
  color: var(--text-color);
}

#customize-cookies:hover {
  background-color: var(--border-color);
}

#reject-cookies {
  background-color: var(--error-color);
  color: white;
}

#reject-cookies:hover {
  background-color: #d32f2f;
}

.cookie-link {
  font-size: 0.875rem;
  color: var(--text-light);
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: auto;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background-color: var(--background-color);
  margin: 2rem auto;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.close-modal {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.thank-you-content {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  color: var(--success-color);
  margin-bottom: 1rem;
}

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

.about-content {
  padding-right: 2rem;
}

.about-image img {
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

.team-section, .values-section {
  margin-bottom: 4rem;
}

.team-section h2, .values-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.team-section h2::after, .values-section h2::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
}

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

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

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

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

.team-member h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.team-member p:first-of-type {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.team-member p:nth-of-type(2) {
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
}

.team-member .social-links {
  justify-content: center;
  margin-bottom: 1.5rem;
}

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

.value-item {
  background-color: var(--background-alt);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.value-item:hover {
  transform: translateY(-5px);
  background-color: var(--primary-color);
  color: white;
}

.value-item:hover h3 {
  color: white;
}

.value-icon {
  margin: 0 auto 1.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(14, 107, 168, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

.value-item:hover .value-icon {
  background-color: white;
}

@media (max-width: 768px) {
  .about-intro {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    padding-right: 0;
    order: 2;
  }
  
  .about-image {
    order: 1;
  }
}

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

.contact-form-container, .contact-info-container {
  background-color: var(--background-alt);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--box-shadow);
}

.contact-info {
  margin-bottom: 2rem;
}

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

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

.info-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-container input {
  width: auto;
  margin-right: 0.5rem;
}

.map-section {
  margin-bottom: 3rem;
}

.map-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

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

.location-map {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.social-connect {
  margin-bottom: 2rem;
}

.social-connect h3 {
  margin-bottom: 1rem;
}

.complaint-section {
  padding: 1.5rem;
  background-color: var(--background-color);
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.complaint-section h3 {
  margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

/* Responsive design */
@media (max-width: 992px) {
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .post-preview {
    flex-direction: column;
  }
  
  .post-image {
    height: 200px;
  }
  
  header .container {
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  nav ul {
    justify-content: center;
  }
  
  nav ul li {
    margin: 0 1rem;
  }
  
  .font-size-control {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .btn-cookie {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
