/* Design System & Variables */
:root {
    --color-bg: #fdfbf7;
    --color-text-main: #252422;
    --color-text-muted: #5e5a54;
    --color-brand-granate: #5b111a;
    --color-brand-teja: #d4943c;
    --color-brand-crema: #f4f0e6;
    --font-display: 'Big Shoulders Display', sans-serif;
    --font-serif: 'Lora', Georgia, serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Decorative Blobs */
.background-decor {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.10;
}

.circle-1 {
    width: 45vw;
    height: 45vw;
    background-color: var(--color-brand-granate);
    top: -10vw;
    right: -5vw;
}

.circle-2 {
    width: 35vw;
    height: 35vw;
    background-color: var(--color-brand-teja);
    bottom: -5vw;
    left: -5vw;
}

/* Header */
.header {
    width: 100%;
    padding: 40px 20px 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(91, 17, 26, 0.04);
}

.header-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 60px; /* Tamaño del sello en cabecera */
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(91, 17, 26, 0.1));
    transition: var(--transition-smooth);
}

.header-logo:hover {
    transform: scale(1.05) rotate(3deg);
    filter: drop-shadow(0 6px 16px rgba(91, 17, 26, 0.2));
}

.brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--color-brand-granate);
    text-align: center;
}

/* Container & Main Layout */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px 70px 24px;
    flex: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 7.5vw, 5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--color-brand-granate);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-brand-teja);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.intro-text {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 660px;
    margin: 0 auto;
    text-align: justify;
    text-align-last: center;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(212, 148, 60, 0.06); /* Fondo teja muy suave */
    border: 1.5px solid rgba(212, 148, 60, 0.15);
    padding: 8px 18px;
    border-radius: 20px;
    margin: 25px auto 0 auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-brand-teja);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.privacy-badge:hover {
    background: rgba(212, 148, 60, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 148, 60, 0.1);
}

.badge-icon {
    color: var(--color-brand-teja);
    flex-shrink: 0;
}

/* Book Quote Section */
.quote-section {
    text-align: center;
    margin: 30px auto 40px auto;
    max-width: 600px;
    position: relative;
    padding: 10px 0;
}

.quote-section::before,
.quote-section::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background-color: rgba(91, 17, 26, 0.15);
    margin: 15px auto;
}

.book-quote {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--color-brand-granate);
    line-height: 1.5;
    font-weight: 500;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Glass Card */
.glass-card {
    background: rgba(253, 251, 247, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(91, 17, 26, 0.08);
    border-radius: 20px;
    padding: 35px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(91, 17, 26, 0.01);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(91, 17, 26, 0.18);
    box-shadow: 0 15px 35px rgba(91, 17, 26, 0.05);
}

.card-icon {
    color: var(--color-brand-granate);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 60px;
    background: rgba(91, 17, 26, 0.05);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.glass-card:hover .card-icon {
    background: rgba(91, 17, 26, 0.1);
    transform: scale(1.05);
}

.glass-card h2 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-brand-granate);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.card-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
    min-height: 80px;
    text-align: justify;
    text-align-last: center;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 13px 24px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--color-brand-granate);
    color: var(--color-brand-crema);
    box-shadow: 0 4px 15px rgba(91, 17, 26, 0.15);
}

.btn-primary:hover {
    background-color: #4c0e15;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(91, 17, 26, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-brand-granate);
    border: 1.5px solid var(--color-brand-granate);
}

.btn-secondary:hover {
    background-color: var(--color-brand-granate);
    color: var(--color-brand-crema);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(91, 17, 26, 0.15);
}

.card-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: auto; /* Empuja los botones al fondo de la tarjeta */
}

.btn-tertiary {
    background-color: transparent;
    color: var(--color-brand-teja);
    border: 1.5px solid var(--color-brand-teja);
}

.btn-tertiary:hover {
    background-color: var(--color-brand-teja);
    color: var(--color-bg);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 148, 60, 0.25);
}

/* Footer */
.footer {
    width: 100%;
    padding: 40px 20px 30px 20px;
    border-top: 1px solid rgba(91, 17, 26, 0.05);
    background: rgba(253, 251, 247, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-logo-img {
    height: 48px; /* Tamaño del sello un poco más grande */
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.footer-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.privacy-note {
    font-size: 0.75rem;
    color: #8c867e;
    max-width: 500px;
    line-height: 1.4;
}

.privacy-note p {
    margin-bottom: 5px;
}

.legal-links {
    margin-top: 8px;
}

.legal-links a {
    color: var(--color-brand-granate);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    border-bottom: 1px dashed rgba(91, 17, 26, 0.3);
    padding-bottom: 1px;
}

.legal-links a:hover {
    color: var(--color-brand-teja);
    border-bottom-color: var(--color-brand-teja);
}

/* Modal Window (Privacy & Legal) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 25, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fdfbf7;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    border: 1px solid rgba(91, 17, 26, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.close-btn:hover {
    color: var(--color-brand-granate);
}

.modal-scroll {
    overflow-y: auto;
    padding-right: 10px;
    text-align: left;
}

/* Custom Scrollbar for Modal */
.modal-scroll::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(91, 17, 26, 0.15);
    border-radius: 4px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 17, 26, 0.3);
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-brand-granate);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-align: center;
}

.legal-divider {
    border: none;
    height: 1px;
    background-color: rgba(91, 17, 26, 0.12);
    margin-bottom: 20px;
}

.modal-scroll h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-brand-teja);
    margin: 20px 0 8px 0;
    letter-spacing: 0.05em;
}

.modal-scroll p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    text-align: justify;
}

.modal-scroll ul {
    list-style-type: square;
    padding-left: 20px;
    margin-bottom: 15px;
}

.modal-scroll li {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

/* Animation on Page Load */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero, .quote-section, .glass-card {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quote-section {
    animation-delay: 0.1s;
}

.cards-grid > div:nth-child(1) {
    animation-delay: 0.18s;
}

.cards-grid > div:nth-child(2) {
    animation-delay: 0.26s;
}

/* Responsive Optimizations for Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 30px 16px 50px 16px;
    }
    
    .hero {
        margin-bottom: 20px;
    }
    
    .title {
        font-size: 2.8rem; /* Evita desbordamiento en pantallas pequeñas */
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 18px;
    }
    
    .intro-text {
        font-size: 0.95rem;
        line-height: 1.5;
        text-align: justify;
    }
    
    .privacy-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
        margin-top: 15px;
    }
    
    .quote-section {
        margin: 20px auto 30px auto;
    }
    
    .book-quote {
        font-size: 1.05rem;
    }
    
    .glass-card {
        padding: 30px 18px;
        border-radius: 16px;
    }
    
    .glass-card h2 {
        font-size: 1.55rem;
    }
    
    .card-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
        min-height: auto;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .header {
        padding: 25px 15px 20px 15px;
    }
    
    .header-logo {
        height: 50px; /* Tamaño del logo ajustado en móvil */
    }
    
    .footer-logo-img {
        height: 40px;
    }
}
