/* ==================== 1. Reset y Variables ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-principal: #2D3A4B; /* azul profundo */
  --color-secundario: #F5F1E9; /* beige cálido */
  --color-acento: #D87C5C; /* terracota */
  --color-texto-claro: #FFFFFF;
  --color-texto-oscuro: #333333;

  --fuente-principal: 'Montserrat', sans-serif;
  --fuente-secundaria: 'Lato', sans-serif;
}

/* ==================== Global ==================== */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--fuente-secundaria);
  line-height: 1.6;
  color: var(--color-texto-oscuro);
  background-color: var(--color-secundario);
  opacity: 0; transform: translateY(10px);
  animation: fadeInBody 0.8s ease-out forwards;
  transition: background-color 0.5s, color 0.5s;
}
@keyframes fadeInBody { to { opacity: 1; transform: translateY(0); } }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2 { font-family: var(--fuente-principal); font-weight: 700; color: var(--color-principal); }

/* ==================== Header ==================== */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 5%; background-color: var(--color-secundario);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(6px); box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.4s;
}
.logo img { height: 70px; transition: height 0.3s; }
@media (min-width: 768px) { .logo img { height: 90px; } }

.main-nav a { margin-left: 1.5rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.3rem; transition: color 0.3s; }
.main-nav a:hover { color: var(--color-acento); }

/* Toggle Dark Mode */
.theme-switch { position: relative; display: inline-block; width: 50px; height: 26px; margin-left: 1.5rem; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc; transition: 0.4s; border-radius: 50px;
}
.slider::before {
  position: absolute; content: ""; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background-color: white;
  transition: 0.4s; border-radius: 50%;
}
.theme-switch input:checked + .slider { background-color: var(--color-acento); }
.theme-switch input:checked + .slider::before { transform: translateX(24px); }

/* ==================== Hero ==================== */
.hero-section {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  min-height: 80vh; padding: 0 5%;
}
.hero-title { font-size: clamp(2rem,5vw,4rem); margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.25rem; margin-bottom: 2rem; color: #555; }
.cta-button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background-color: var(--color-acento); color: var(--color-texto-claro);
  padding: 0.75rem 2rem; border-radius: 50px; font-weight: 600;
  transition: all 0.3s;
}
.cta-button:hover { background-color: #c26a51; transform: translateY(-3px); }

/* ==================== Proyectos ==================== */
.projects-section {
  display: flex; flex-direction: column; gap: 2rem; padding: 2rem 5%; text-align: center;
}
.project-card {
  background-color: #fff; padding: 2rem 1.5rem; border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.5s, color 0.5s;
  opacity: 0; transform: translateY(20px);
  animation: fadeInCard 0.8s ease-out forwards;
}
.project-card:nth-child(1) { animation-delay: 0.3s; }
.project-card:nth-child(2) { animation-delay: 0.5s; }
.project-card:nth-child(3) { animation-delay: 0.7s; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 8px 16px rgba(0,0,0,0.12); }
.project-card h2 { margin: 1rem 0 0.5rem; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.project-card p { font-size: 1rem; margin-bottom: 1rem; }
.project-link { font-weight: 700; color: var(--color-acento); display: inline-flex; align-items: center; gap: 0.3rem; }
@keyframes fadeInCard { to { opacity: 1; transform: translateY(0); } }

/* ==================== Filosofía ==================== */
.philosophy-section { padding: 4rem 5%; text-align: center; font-style: italic; font-size: 1.2rem; color: #555; }

/* ==================== Footer ==================== */
.site-footer { text-align: center; padding: 2rem 5%; background-color: var(--color-principal); color: var(--color-texto-claro); }
.social-links a { margin: 0 0.5rem; font-size: 1.2rem; transition: color 0.3s, transform 0.3s; }
.social-links a:hover { color: var(--color-acento); transform: scale(1.15); }

/* ==================== WhatsApp ==================== */
.whatsapp-float {
  position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px;
  display: flex; justify-content: center; align-items: center;
  font-size: 30px; border-radius: 50%; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  background-color: #25d366; color: #fff; z-index: 1000;
  transition: transform 0.3s, background-color 0.5s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ==================== Media Queries ==================== */
@media (min-width: 768px) { .projects-section { flex-direction: row; } .project-card { flex: 1; } }

/* ==================== Dark Mode ==================== */
body.dark-mode {
    background-color: #1B1B1B;
    color: #FFFFFF;
}
body.dark-mode .site-header { background-color: #222; }
body.dark-mode .project-card { background-color: #2A2A2A; color: #CCCCCC; }
body.dark-mode .philosophy-section { color: #AAAAAA; }
body.dark-mode .site-footer { background-color: #111; color: #FFFFFF; }
body.dark-mode .main-nav a { color: #FFFFFF; }
body.dark-mode .main-nav a:hover { color: #5DADE2; }
body.dark-mode .cta-button { background-color: #5DADE2; color: #FFFFFF; }
body.dark-mode .cta-button:hover { background-color: #3498DB; }
body.dark-mode .project-link { color: #5DADE2; }
body.dark-mode .whatsapp-float { background-color: #128C7E; }

/* ==================== Corrección Hero Dark Mode ==================== */
body.dark-mode .hero-title { color: #5DADE2; } /* azul claro */
body.dark-mode .hero-subtitle { color: #CCCCCC; } /* gris claro */
body.dark-mode h2 {
  color: #5DADE2; /* O el azul cielo de tu preferencia, por ejemplo #87CEEB */
} /* <--- Corregido: Cierre de la regla h2 */


/* ==================== Estilos para la página de Invitaciones ==================== */

/* Ajuste para el encabezado de las páginas internas */
.small-hero {
    min-height: 50vh;
    padding: 0 5%;
}

/* Sección de tipos de servicios */
.services-types-section {
    padding: 2rem 5%;
}

.service-block {
    background-color: var(--color-texto-claro);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
}

.service-block h2 { /* Añadido: Dark Mode para títulos de servicio */
  color: var(--color-principal);
}

body.dark-mode .service-block { /* Dark Mode para bloques de servicio */
    background-color: #2A2A2A;
}

body.dark-mode .service-block h2 {
  color: #5DADE2;
}

.service-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.service-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Estilo para botones secundarios */
.secondary-cta {
    background-color: transparent;
    border: 2px solid var(--color-acento);
    color: var(--color-acento);
}

.secondary-cta:hover {
    background-color: var(--color-acento);
    color: var(--color-texto-claro);
}

/* Cuadrícula de paquetes */
.package-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.package-card {
    background-color: var(--color-secundario);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: inset 0 0 0 2px var(--color-secundario);
    transition: transform 0.3s, box-shadow 0.3s;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 2px var(--color-principal);
}

.package-card.featured {
    background-color: var(--color-principal);
    color: var(--color-texto-claro);
    box-shadow: inset 0 0 0 2px var(--color-principal);
}

.package-card.featured h3, .package-card.featured li {
    color: var(--color-texto-claro);
}

.package-card h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.package-card ul {
    list-style-type: none;
    margin-top: 1rem;
}

.package-card li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.package-card li::before {
    content: "✓";
    color: var(--color-acento);
    margin-right: 0.5rem;
}

/* Estilo de precios */
.package-price {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--fuente-principal);
}

.package-price .regular-price {
    font-size: 1rem;
    color: #888;
    text-decoration: line-through;
    display: block;
    font-weight: 400;
}

.package-card.featured .package-price, .package-card.featured .package-price .regular-price {
    color: var(--color-texto-claro);
}

.guarantee-text {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
    font-size: 0.9rem;
    color: #666;
}

/* Sección de demos y souvenirs */
.demos-section, .souvenirs-cta-section {
    text-align: center;
    padding: 2rem 5%;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.demos-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.demo-card {
    display: block;
    background-color: var(--color-texto-claro);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.demo-card img {
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.souvenirs-cta-section {
    padding: 4rem 5%;
}

/* ==================== Media Queries para la página de Invitaciones ==================== */

@media (min-width: 768px) {
    .cta-group {
        flex-direction: row;
        justify-content: center;
    }
    
    .package-grid {
        flex-direction: row;
        gap: 2rem;
    }
    
    .package-card {
        flex: 1;
    }
}