:root {
    /* Valentine's Day Palette */
    --color-primary: #ff4d6d;
    /* Vibrant Pink/Red */
    --color-primary-dark: #c9184a;
    --color-primary-light: #ff8fa3;
    --color-secondary: #ffb3c1;
    --color-accent: #ff0054;

    /* Soft backgrounds */
    --color-valentine-bg: #fff0f3;
    --color-valentine-white: #ffffff;

    /* Theme fonts */
    --font-romantic: 'Dancing Script', cursive;
}

/* Base Overrides */
body {
    background-color: var(--color-valentine-bg);
}

.valentine-theme {
    background-image: radial-gradient(var(--color-secondary) 0.5px, transparent 0.5px), radial-gradient(var(--color-secondary) 0.5px, var(--color-valentine-bg) 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.bg-light {
    background-color: rgba(255, 240, 243, 0.8);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--color-secondary);
    border-bottom: 1px solid var(--color-secondary);
}

/* Button Valentine Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease-out;
}

.btn-primary:hover::after {
    transform: scale(1);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.6);
    transform: translateY(-2px);
}

.btn-cta-hero {
    background: linear-gradient(135deg, #ff4d6d 0%, #ff0054 100%);
    box-shadow: 0 8px 30px rgba(255, 0, 84, 0.4);
    color: white !important;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.05);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.05);
    }

    60% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.btn-cta-hero:hover {
    box-shadow: 0 12px 40px rgba(255, 0, 84, 0.6);
    animation: none;
    transform: translateY(-3px) scale(1.02);
}

/* Hero Section Enhancements */
.hero-overlay {
    background: linear-gradient(135deg, rgba(201, 24, 74, 0.85) 0%, rgba(133, 11, 44, 0.9) 100%);
}

.hero-main-title {
    font-family: var(--font-headings);
    color: var(--color-valentine-white);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Falling Hearts Animation */
.valentine-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    /* Siempre encima pero sin bloquear clicks */
    overflow: hidden;
}

.heart {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    transform: rotate(45deg);
    opacity: 0.2;
    animation: fall linear infinite;
    filter: drop-shadow(0 0 5px rgba(255, 77, 109, 0.5));
    will-change: transform, opacity;
    pointer-events: none;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
}

.heart::before {
    top: -50%;
    left: 0;
}

.heart::after {
    top: 0;
    left: -50%;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(45deg);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(110vh) rotate(405deg);
        opacity: 0;
    }
}

/* Navigation Overrides */
.header-main.scrolled {
    background-color: rgba(255, 240, 243, 0.9) !important;
    backdrop-filter: blur(15px) !important;
}

.header-main.scrolled .nav-link:hover,
.header-main.scrolled .nav-link.active {
    color: var(--color-primary) !important;
}

.header-main.scrolled .nav-link::after {
    background-color: var(--color-primary) !important;
}

.header-main.scrolled .logo-text {
    color: var(--color-primary) !important;
}

/* Valentine Special Badge */
.valentine-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    transform: rotate(5deg);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 0, 84, 0.3);
    border: 2px solid white;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: rotate(5deg) translateY(0);
    }

    50% {
        transform: rotate(5deg) translateY(-5px);
    }
}

/* Cards & Sections */
.service-card,
.feature-item,
.review-card,
.partner-card,
.blog-card {
    border: 1px solid var(--color-secondary) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.service-card:hover,
.feature-item:hover,
.review-card:hover,
.partner-card:hover,
.blog-card:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 15px 35px rgba(255, 77, 109, 0.15) !important;
    transform: translateY(-10px);
}

.section-tag {
    font-family: var(--font-romantic);
    font-size: 1.2rem;
    text-transform: none;
    letter-spacing: 0;
    padding: 10px 25px;
    color: var(--color-primary-dark);
    background: rgba(255, 77, 109, 0.1);
    box-shadow: inset 0 0 10px rgba(255, 77, 109, 0.05);
}

.section-title {
    position: relative;
    display: inline-block;
}

/* Adding a heart to section titles */
.section-header .section-title::before {
    content: '❤️';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    opacity: 0.6;
}

.section-header .section-title::after {
    height: 3px !important;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent) !important;
    width: 100% !important;
    max-width: 200px;
}

/* Botón corazón San Valentín (flotante) */
.valentine-heart-btn {
    position: fixed;
    bottom: 100px;
    left: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 77, 109, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.valentine-heart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(255, 77, 109, 0.6);
}

.valentine-heart-btn:focus {
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
}

/* Subir el botón corazón cuando el banner de cookies está visible */
#cookie-banner.show ~ .valentine-heart-btn,
body:has(#cookie-banner.show) .valentine-heart-btn {
    bottom: 150px;
}

@media (max-width: 768px) {
    #cookie-banner.show ~ .valentine-heart-btn,
    body:has(#cookie-banner.show) .valentine-heart-btn {
        bottom: 130px;
    }
}

@media (max-width: 480px) {
    #cookie-banner.show ~ .valentine-heart-btn,
    body:has(#cookie-banner.show) .valentine-heart-btn {
        bottom: 120px;
    }
}

/* Modal del cartel San Valentín */
.valentine-cartel-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.valentine-cartel-modal[data-open="true"] {
    opacity: 1;
    visibility: visible;
}

.valentine-cartel-modal[data-open="true"] .valentine-cartel-content {
    transform: scale(1);
}

.valentine-cartel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.valentine-cartel-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.valentine-cartel-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.valentine-cartel-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #333;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, color 0.2s;
}

.valentine-cartel-close:hover {
    background: var(--color-primary);
    color: white;
}

/* ---------- Móvil: botón corazón y modal ---------- */
@media (max-width: 768px) {
    .valentine-heart-btn {
        width: 48px;
        height: 48px;
        bottom: 90px;
        left: 16px;
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .valentine-heart-btn {
        width: 44px;
        height: 44px;
        bottom: 85px;
        left: 12px;
        font-size: 1.2rem;
    }
}

/* Modal en móvil: menos padding, botón cerrar visible */
@media (max-width: 768px) {
    .valentine-cartel-modal {
        padding: 12px;
        align-items: center;
    }

    .valentine-cartel-content {
        max-width: 100%;
        max-height: 88vh;
    }

    .valentine-cartel-content img {
        max-height: 85vh;
        border-radius: 8px;
    }

    /* Cerrar encima de la imagen en móvil para no salirse de pantalla */
    .valentine-cartel-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        background: rgba(0, 0, 0, 0.6);
        color: white;
    }

    .valentine-cartel-close:hover {
        background: var(--color-primary);
        color: white;
    }
}

@media (max-width: 480px) {
    .valentine-cartel-modal {
        padding: 8px;
    }

    .valentine-cartel-content img {
        max-height: 82vh;
    }

    .valentine-cartel-close {
        top: 6px;
        right: 6px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}