:root {
    /* Paleta original estrictamente mantenida */
    --cp-green: #7A9B2F;
    --cp-green-dark: #5F781F;
    --cp-blue: #5E8FC8;
    --cp-blue-deep: #2F5E8E;
    --cp-bg: #F6F4EF;
    --cp-white: #FFFFFF;
    --cp-text: #2B2B2B;
    --cp-muted: #6F6F6F;
    --cp-line: #D9E0D3;
    
    /* Sombras y radios refinados para un look más moderno y etéreo */
    --cp-shadow: 0 24px 48px -12px rgba(47, 94, 142, 0.05), 0 8px 16px -8px rgba(47, 94, 142, 0.03), 0 0 1px rgba(47, 94, 142, 0.1);
    --cp-shadow-hover: 0 32px 64px -16px rgba(47, 94, 142, 0.1), 0 16px 32px -12px rgba(47, 94, 142, 0.06), 0 0 1px rgba(47, 94, 142, 0.15);
    --cp-radius: 24px;
    --cp-radius-sm: 16px;
    --cp-max: 1200px;
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--cp-text);
    background-color: var(--cp-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Cardo', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cp-blue-deep);
}

.container {
    max-width: var(--cp-max);
    margin: 0 auto;
    padding: 0 32px;
}

.section-padding {
    padding: 120px 0;
}

/* Tipografía y elementos de marca refinados */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 600;
    color: var(--cp-green);
    margin-bottom: 24px;
}

.eyebrow::after {
    content: "";
    height: 1px;
    width: 32px;
    background-color: var(--cp-green);
    opacity: 0.5;
}

/* Botones modernizados y fluidos */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.5s var(--ease-spring);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
    letter-spacing: 0.03em;
}

.btn-primary {
    background-color: var(--cp-blue-deep);
    color: var(--cp-white);
    box-shadow: 0 10px 24px rgba(47, 94, 142, 0.12);
}

.btn-primary:hover {
    background-color: var(--cp-blue);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(47, 94, 142, 0.2);
}

.btn-outline {
    border-color: var(--cp-line);
    color: var(--cp-blue-deep);
    background: var(--cp-white);
}

.btn-outline:hover {
    border-color: var(--cp-blue);
    color: var(--cp-blue);
    background: var(--cp-white);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(47, 94, 142, 0.06);
}

/* Sistema de Animaciones */
.reveal {
    opacity: 0;
    transition: all 1.4s var(--ease-spring);
}
.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1) !important;
}
.fade-up { transform: translateY(30px); }
.fade-in { transform: scale(0.98); }

/* 1. HERO - Diseño de superposición tipo revista */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background-color: var(--cp-bg);
    padding: 100px 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    right: 48px;
    top: 48px;
    bottom: 48px;
    width: calc(52% - 48px);
    background: url('https://camposdepaz.com/wp-content/uploads/2026/04/Tanatorio-79-de-82-scaled.jpg') center/cover no-repeat;
    border-radius: var(--cp-radius);
    z-index: 1;
    box-shadow: var(--cp-shadow);
    transition: transform 10s ease-out;
}

.hero:hover .hero-bg {
    transform: scale(1.02);
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-text-box {
    max-width: 520px;
    padding: 40px 0;
}

.hero h1 {
    font-size: clamp(42px, 5vw, 68px);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    font-weight: 400;
}

.hero p {
    font-size: 18px;
    color: var(--cp-muted);
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 2. INTRO */
.intro {
    text-align: center;
    background: var(--cp-white);
    border-radius: 48px;
    margin: 0 32px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.01);
    border: 1px solid rgba(217, 224, 211, 0.3); /* Usa var(--cp-line) con opacidad */
}

.intro h2 {
    font-size: clamp(28px, 3.5vw, 42px);
    margin-bottom: 28px;
    max-width: 700px;
    margin-inline: auto;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.intro-text {
    max-width: 680px;
    margin: 0 auto;
    font-size: 17px;
    color: var(--cp-muted);
    font-weight: 300;
    line-height: 1.85;
}

.intro-text p:not(:last-child) { margin-bottom: 24px; }

/* 3. LISTADO CAPILLAS - Estilo Tarjeta Elegante */
.chapels-grid {
    display: grid;
    gap: 96px; /* Espaciado generoso entre tarjetas */
}

.chapel-card {
    background: var(--cp-white);
    border-radius: var(--cp-radius);
    padding: 56px;
    box-shadow: var(--cp-shadow);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas: 
        "media content"
        "details details";
    gap: 56px;
    align-items: center;
    transition: box-shadow 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
    border: 1px solid rgba(217, 224, 211, 0.4);
}

.chapel-card:hover {
    box-shadow: var(--cp-shadow-hover);
    transform: translateY(-4px);
}

/* Ritmo editorial - Alternancia en Desktop */
@media (min-width: 1025px) {
    .chapel-card:nth-child(even) {
        grid-template-columns: 1fr 1.2fr;
        grid-template-areas: 
            "content media"
            "details details";
    }
    .chapel-card:nth-child(even) .chapel-content {
        padding-right: 48px;
        padding-left: 0;
    }
}

.chapel-media {
    grid-area: media;
    position: relative;
    border-radius: var(--cp-radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 10px 30px rgba(47, 94, 142, 0.03);
}

.chapel-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s var(--ease-spring);
}

.chapel-card:hover .chapel-media img {
    transform: scale(1.06);
}

.chapel-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chapel-content h3 {
    font-size: 32px;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.chapel-content p {
    color: var(--cp-muted);
    margin-bottom: 32px;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
}

/* 4. GALLERY MODERN */
.chapel-details {
    grid-area: details;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 0.7s var(--ease-spring), opacity 0.5s ease, padding 0.7s var(--ease-spring), visibility 0.7s;
    border-top: 1px solid transparent;
}

.chapel-details.active {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    padding-top: 48px;
    border-top-color: var(--cp-line);
}

.details-inner {
    overflow: hidden;
    min-height: 0; /* Necesario para que funcione la transición de CSS Grid */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cp-blue-deep);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after { opacity: 0.15; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s var(--ease-spring);
}

.gallery-item:hover img {
    transform: scale(1.12);
}

/* 5. INFO FICHA */
.info-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    background: var(--cp-bg);
    padding: 32px 40px;
    border-radius: var(--cp-radius-sm);
    border: 1px solid rgba(217, 224, 211, 0.5);
}

.info-item {
    border-left: 2px solid var(--cp-green);
    padding-left: 20px;
}

.info-item h4 {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cp-green-dark);
    margin-bottom: 6px;
    font-weight: 600;
}

.info-item p {
    font-size: 14px;
    font-weight: 500;
    color: var(--cp-text);
    line-height: 1.5;
}

/* 6. FEATURES - Confort y Glassmorphism */
.features-section {
    background: linear-gradient(145deg, var(--cp-blue-deep), #22466A);
    border-radius: 48px;
    margin: 0 32px;
    padding: 120px 0;
    box-shadow: 0 20px 50px rgba(47, 94, 142, 0.15);
}

.features-header {
    text-align: center;
    margin-bottom: 72px;
}

.features-header h2 {
    color: var(--cp-white);
    font-size: clamp(32px, 4vw, 42px);
    letter-spacing: -0.01em;
    font-weight: 400;
}

.features-header .eyebrow {
    justify-content: center;
    color: var(--cp-green);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    padding: 48px 40px;
    border-radius: var(--cp-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.5s var(--ease-spring), background 0.5s ease, border-color 0.5s ease;
}

.feature-box:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
}

.feature-icon-circle {
    width: 44px;
    height: 44px;
    background: var(--cp-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 8px 16px rgba(122, 155, 47, 0.3);
}

.feature-box h3 {
    color: var(--cp-white);
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 400;
}

/* 7. BLOQUE EMOCIONAL */
.emotional-section {
    text-align: center;
    padding: 140px 0 100px;
}

.emotional-section h2 {
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 28px;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.emotional-section p {
    max-width: 740px;
    margin: 0 auto;
    font-size: 19px;
    font-weight: 300;
    color: var(--cp-muted);
    line-height: 1.85;
}

/* 8. CTA FINAL */
.cta-section {
    padding-bottom: 120px;
}

.cta-container {
    background: var(--cp-white);
    padding: 72px;
    border-radius: 36px;
    box-shadow: var(--cp-shadow);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: center;
    border: 1px solid rgba(217, 224, 211, 0.4);
}

.cta-container h2 { 
    font-size: clamp(36px, 4.5vw, 48px); 
    margin-bottom: 24px; 
    letter-spacing: -0.01em;
    font-weight: 400;
}

.cta-container p { 
    font-size: 17px; 
    color: var(--cp-muted); 
    margin-bottom: 40px; 
    font-weight: 300;
    line-height: 1.7;
}

.cta-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-pill {
    display: flex;
    flex-direction: column;
    background: var(--cp-bg);
    padding: 20px 28px;
    border-radius: var(--cp-radius-sm);
    text-decoration: none;
    transition: all 0.4s var(--ease-spring);
    border: 1px solid transparent;
}

.contact-pill:hover {
    background: var(--cp-white);
    border-color: var(--cp-blue);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(47, 94, 142, 0.05);
}

.contact-pill span { 
    font-size: 10px; 
    color: var(--cp-green-dark); 
    font-weight: 600; 
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.contact-pill a { 
    font-size: 18px; 
    color: var(--cp-blue-deep); 
    text-decoration: none; 
    font-weight: 600; 
    font-family: 'Cardo', serif;
}

/* 9. BANNER DE VELACIÓN INICIAL (CP-HERO) */
.cp-container {
    max-width: var(--cp-max);
    margin: 0 auto;
    padding: 0 32px;
}

.cp-hero {
    min-height: 65vh;
    display: flex;
    align-items: center;
    position: relative;
    background:
        linear-gradient(180deg, rgba(19, 42, 66, 0.75), rgba(19, 42, 66, 0.55)),
        url('../../img/banners/banner-camposanto.jpg') center/cover no-repeat;
    color: #fff;
    padding: 100px 0;
    overflow: hidden;
}

.cp-hero-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.cp-hero-title {
    font-family: 'Cardo', serif;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.15;
    margin: 0 0 24px;
    color: #fff;
    font-weight: 400;
}

.cp-hero-text {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .9);
    margin: 0 auto 40px;
    max-width: 620px;
    font-weight: 300;
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.5s var(--ease-spring);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 14px;
    letter-spacing: 0.03em;
}

/* ANIMACION PULSAR CONTINUA (Más sofisticada) */
@keyframes cp-pulse-continuous {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(122, 155, 47, 0.6);
    }
    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 12px rgba(122, 155, 47, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(122, 155, 47, 0);
    }
}

.cp-btn-pulse-green {
    background: var(--cp-green) !important;
    color: #fff !important;
    border-color: transparent !important;
    animation: cp-pulse-continuous 2.5s infinite ease-in-out;
    box-shadow: 0 8px 24px rgba(122, 155, 47, .3);
}

.cp-btn-pulse-green:hover {
    background: var(--cp-green-dark) !important;
    transform: translateY(-4px) scale(1.02);
    animation-play-state: paused; /* Se pausa al hacer hover para control del usuario */
}

/* ANIMATIONS */
.cp-fade { 
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity .8s ease, transform .8s var(--ease-spring); 
}
.cp-fade.in-view { 
    opacity: 1; 
    transform: translateY(0); 
}

/* Responsive Design Refinado */
@media (max-width: 1024px) {
    .hero { padding: 120px 0 60px; flex-direction: column; text-align: center; }
    .hero-bg { position: relative; width: 100%; height: 360px; right: auto; top: auto; bottom: auto; margin-top: 48px; }
    .hero-text-box { margin: 0 auto; padding: 20px 0; }
    .hero-btns { justify-content: center; }
    .eyebrow { justify-content: center; }
    
    .chapel-card { grid-template-columns: 1fr; grid-template-areas: "media" "content" "details"; gap: 32px; padding: 32px; }
    .chapel-media { aspect-ratio: 16/9; }
    .chapel-content { align-items: center; text-align: center; }
    
    .features-grid { grid-template-columns: 1fr; gap: 24px; }
    .features-section { border-radius: 32px; margin: 0 16px; padding: 80px 0; }
    .intro { margin: 0 16px; border-radius: 32px; }
    
    .cta-container { grid-template-columns: 1fr; padding: 48px 32px; text-align: center; gap: 48px; }
    .contact-pill:hover { transform: translateY(-4px); }
}

@media (max-width: 768px) {
    .container { padding: 0 24px; }
    .section-padding { padding: 80px 0; }
    .hero { padding: 100px 0 40px; }
    .btn { width: 100%; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .info-sheet { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
    .feature-box { padding: 32px 24px; }
    .cp-container { padding: 0 24px; }
    .cp-hero { min-height: 55vh; padding: 80px 0; }
    .cp-btn { width: 100%; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-fade { opacity: 1 !important; transform: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .gallery-item img, .chapel-media img { transition: none !important; transform: none !important; }
}
