/* ============================================================
   Día de la Madre — Countdown Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Nunito:wght@400;600;800&display=swap');

/* ---- Variables ---- */
:root {
    --dmc-rose:       #e8547a;
    --dmc-rose-light: #f9a8c0;
    --dmc-rose-dark:  #c0395e;
    --dmc-blush:      #fde8ee;
    --dmc-cream:      #fff8f9;
    --dmc-gold:       #e8a838;
    --dmc-text:       #3a1a28;
    --dmc-text-soft:  #8a5870;
    --dmc-white:      #ffffff;
    --dmc-shadow:     0 20px 60px rgba(232,84,122,.25);
    --dmc-radius:     24px;
}

/* ---- Wrapper ---- */
.dmc-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    padding: 40px 16px;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    background:
        radial-gradient(ellipse at 20% 10%, #fde0eb 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, #fbc8da 0%, transparent 55%),
        linear-gradient(145deg, #fff0f5 0%, #fce4ef 60%, #ffd6e7 100%);
}

/* ---- Floating Petals ---- */
.dmc-petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.dmc-petal {
    position: absolute;
    font-size: clamp(14px, 2vw, 22px);
    opacity: 0;
    animation: dmc-fall linear infinite;
    will-change: transform, opacity;
}

/* Each petal gets randomised positions & timings */
.dmc-petal--1  { left:  4%; animation-duration: 7s;  animation-delay: 0s;    font-size:18px; }
.dmc-petal--2  { left: 10%; animation-duration: 9s;  animation-delay: 1.2s;  font-size:14px; }
.dmc-petal--3  { left: 18%; animation-duration: 6s;  animation-delay: 3.5s;  font-size:22px; }
.dmc-petal--4  { left: 25%; animation-duration: 8s;  animation-delay: 0.8s;  font-size:16px; }
.dmc-petal--5  { left: 33%; animation-duration:10s;  animation-delay: 2.1s;  font-size:20px; }
.dmc-petal--6  { left: 42%; animation-duration: 7s;  animation-delay: 4.4s;  font-size:14px; }
.dmc-petal--7  { left: 50%; animation-duration: 9s;  animation-delay: 0.3s;  font-size:18px; }
.dmc-petal--8  { left: 58%; animation-duration: 6s;  animation-delay: 5.7s;  font-size:22px; }
.dmc-petal--9  { left: 65%; animation-duration: 8s;  animation-delay: 1.9s;  font-size:16px; }
.dmc-petal--10 { left: 72%; animation-duration: 7s;  animation-delay: 3.0s;  font-size:20px; }
.dmc-petal--11 { left: 80%; animation-duration:11s;  animation-delay: 0.6s;  font-size:14px; }
.dmc-petal--12 { left: 88%; animation-duration: 9s;  animation-delay: 2.8s;  font-size:18px; }
.dmc-petal--13 { left: 94%; animation-duration: 6s;  animation-delay: 4.1s;  font-size:22px; }
.dmc-petal--14 { left:  7%; animation-duration:12s;  animation-delay: 6.0s;  font-size:16px; }
.dmc-petal--15 { left: 20%; animation-duration: 8s;  animation-delay: 7.3s;  font-size:14px; }
.dmc-petal--16 { left: 46%; animation-duration: 7s;  animation-delay: 8.1s;  font-size:20px; }
.dmc-petal--17 { left: 62%; animation-duration:10s;  animation-delay: 2.5s;  font-size:18px; }
.dmc-petal--18 { left: 76%; animation-duration: 9s;  animation-delay: 9.0s;  font-size:16px; }

@keyframes dmc-fall {
    0%   { transform: translateY(-40px) rotate(0deg)   scale(1);   opacity: 0; }
    10%  { opacity: .9; }
    80%  { opacity: .7; }
    100% { transform: translateY(calc(100vh + 60px)) rotate(720deg) scale(.6); opacity: 0; }
}

/* ---- Floating Hearts ---- */
.dmc-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.dmc-heart {
    position: absolute;
    bottom: -30px;
    font-size: 14px;
    opacity: 0;
    animation: dmc-rise ease-in infinite;
    will-change: transform, opacity;
}

.dmc-heart--1  { left:  8%; animation-duration: 6s;  animation-delay:  1s;  font-size:12px; }
.dmc-heart--2  { left: 20%; animation-duration: 8s;  animation-delay:  3s;  font-size:16px; }
.dmc-heart--3  { left: 35%; animation-duration: 7s;  animation-delay:  0s;  font-size:10px; }
.dmc-heart--4  { left: 50%; animation-duration: 9s;  animation-delay:  5s;  font-size:14px; }
.dmc-heart--5  { left: 63%; animation-duration: 6s;  animation-delay:  2s;  font-size:18px; }
.dmc-heart--6  { left: 75%; animation-duration: 8s;  animation-delay:  7s;  font-size:12px; }
.dmc-heart--7  { left: 88%; animation-duration: 7s;  animation-delay:  4s;  font-size:16px; }
.dmc-heart--8  { left: 14%; animation-duration:10s;  animation-delay:  9s;  font-size:10px; }
.dmc-heart--9  { left: 45%; animation-duration: 6s;  animation-delay:  6s;  font-size:14px; }
.dmc-heart--10 { left: 92%; animation-duration: 8s;  animation-delay:  1.5s;font-size:12px; }

@keyframes dmc-rise {
    0%   { transform: translateY(0)      scale(1)   rotate(-10deg); opacity: 0; }
    15%  { opacity: .8; }
    80%  { opacity: .5; }
    100% { transform: translateY(-380px) scale(0.4) rotate(15deg);  opacity: 0; }
}

/* ---- Card ---- */
.dmc-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid rgba(232,84,122,.2);
    border-radius: var(--dmc-radius);
    box-shadow: var(--dmc-shadow), 0 2px 0 rgba(255,255,255,.9) inset;
    padding: 40px 36px 32px;
    max-width: 640px;
    width: 100%;
    text-align: center;
    animation: dmc-card-in .8s cubic-bezier(.22,1,.36,1) both;
}

@keyframes dmc-card-in {
    from { opacity: 0; transform: translateY(30px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ---- Header ---- */
.dmc-header {
    margin-bottom: 28px;
}

.dmc-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #f9c5d5 0%, #f07da0 100%);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(232,84,122,.35);
    margin-bottom: 16px;
    animation: dmc-pulse 2.5s ease-in-out infinite;
}

@keyframes dmc-pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0  8px 24px rgba(232,84,122,.35); }
    50%       { transform: scale(1.07); box-shadow: 0 12px 32px rgba(232,84,122,.50); }
}

.dmc-icon {
    font-size: 34px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}

.dmc-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 700;
    color: var(--dmc-rose-dark);
    margin: 0 0 6px;
    letter-spacing: -.5px;
    line-height: 1.1;
}

.dmc-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    color: var(--dmc-text-soft);
    margin: 0;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
}

.dmc-year {
    color: var(--dmc-rose);
}

/* ---- Countdown Units ---- */
.dmc-countdown {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dmc-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dmc-flip {
    position: relative;
    width: clamp(64px, 14vw, 90px);
    height: clamp(70px, 16vw, 100px);
    background: linear-gradient(180deg, #fff 0%, #fde8ee 50%, #fff 100%);
    border: 1.5px solid rgba(232,84,122,.2);
    border-radius: 14px;
    box-shadow:
        0 6px 20px rgba(232,84,122,.15),
        0 1px 0 rgba(255,255,255,.9) inset,
        0 -1px 0 rgba(0,0,0,.05) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fold line */
.dmc-flip::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: rgba(232,84,122,.18);
}

.dmc-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 7vw, 50px);
    font-weight: 700;
    color: var(--dmc-rose-dark);
    line-height: 1;
    transition: transform .15s ease, opacity .15s ease;
    display: block;
}

.dmc-number.dmc-flip-anim {
    animation: dmc-flip-num .3s cubic-bezier(.4,0,.2,1);
}

@keyframes dmc-flip-num {
    0%   { transform: translateY(-6px) scaleY(.8); opacity: .4; }
    50%  { transform: translateY(4px)  scaleY(1.05); opacity: 1; }
    100% { transform: translateY(0)    scaleY(1); opacity: 1; }
}

.dmc-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dmc-text-soft);
}

/* Separator */
.dmc-sep {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 700;
    color: var(--dmc-rose-light);
    margin-top: 10px;
    animation: dmc-blink 1s step-end infinite;
    line-height: 1;
    align-self: flex-start;
    padding-top: clamp(18px, 4vw, 26px);
}

@keyframes dmc-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .2; }
}

/* ---- Message ---- */
.dmc-message {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(15px, 3vw, 18px);
    color: var(--dmc-text-soft);
    margin: 0 0 20px;
    min-height: 28px;
    transition: opacity .5s;
}

/* ---- Expired State ---- */
.dmc-expired {
    padding: 20px;
    animation: dmc-card-in .6s ease both;
}

.dmc-expired-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: dmc-pulse 2s ease-in-out infinite;
}

.dmc-expired-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 700;
    color: var(--dmc-rose-dark);
    margin: 0;
    line-height: 1.5;
}

/* ---- Footer ---- */
.dmc-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px dashed rgba(232,84,122,.25);
    margin-top: 4px;
}

.dmc-gift-icon {
    font-size: 18px;
    animation: dmc-sway 3s ease-in-out infinite;
}

.dmc-gift-icon:last-child {
    animation-direction: reverse;
}

@keyframes dmc-sway {
    0%, 100% { transform: rotate(-8deg); }
    50%       { transform: rotate(8deg); }
}

.dmc-gift-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--dmc-text-soft);
    letter-spacing: .3px;
}

/* ---- CTA Button ---- */
.dmc-cta-wrap {
    margin: 8px 0 22px;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Halo exterior pulsante */
.dmc-cta-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 60px;
    background: linear-gradient(135deg, #f9a8c0, #e8547a, #c0395e, #e8a838, #f9a8c0);
    background-size: 300% 300%;
    animation: dmc-halo-spin 3s linear infinite, dmc-halo-pulse 2s ease-in-out infinite;
    filter: blur(8px);
    opacity: .75;
    z-index: 0;
}

@keyframes dmc-halo-spin {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@keyframes dmc-halo-pulse {
    0%, 100% { opacity: .65; transform: scale(1); }
    50%       { opacity: .90; transform: scale(1.04); }
}

.dmc-cta-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 32px;

    /* Degradado dorado-rosa que rota */
    background: linear-gradient(270deg, #e8547a, #c0395e, #d4006a, #e8547a);
    background-size: 400% 400%;
    animation: dmc-btn-gradient 4s ease infinite;

    color: #fff !important;
    font-family: 'Nunito', sans-serif;
    font-size: clamp(15px, 2.8vw, 17px);
    font-weight: 900;
    letter-spacing: .6px;
    text-decoration: none !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.25);
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,.35);
    box-shadow:
        0 8px 28px rgba(192,57,94,.55),
        0 2px 0 rgba(255,255,255,.25) inset,
        0 -2px 0 rgba(0,0,0,.10) inset;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.22,1,.36,1),
                box-shadow .2s cubic-bezier(.22,1,.36,1);
    overflow: hidden;
    white-space: nowrap;
}

@keyframes dmc-btn-gradient {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

/* Barrido de brillo continuo */
.dmc-cta-btn::after {
    content: '';
    position: absolute;
    top: -10%; left: -60%;
    width: 40%;
    height: 120%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.45) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: dmc-btn-shine 2.8s ease-in-out infinite;
}

@keyframes dmc-btn-shine {
    0%   { left: -60%; opacity: 0; }
    15%  { opacity: 1; }
    50%  { left: 130%; opacity: 0; }
    100% { left: 130%; opacity: 0; }
}

/* Rebote de entrada */
.dmc-cta-btn {
    animation: dmc-btn-gradient 4s ease infinite,
               dmc-btn-bounce 3.5s cubic-bezier(.28,.84,.42,1) 1s infinite;
}

@keyframes dmc-btn-bounce {
    0%, 100% { transform: translateY(0)   scale(1); }
    45%       { transform: translateY(-6px) scale(1.03); }
    65%       { transform: translateY(-2px) scale(1.01); }
}

.dmc-cta-btn:hover {
    animation: dmc-btn-gradient 4s ease infinite; /* pausa el bounce en hover */
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 18px 44px rgba(192,57,94,.65),
        0 2px 0 rgba(255,255,255,.30) inset;
}

.dmc-cta-btn:active {
    transform: translateY(0) scale(.97);
    box-shadow: 0 4px 16px rgba(192,57,94,.40);
}

.dmc-cta-icon {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.2));
    display: inline-block;
    animation: dmc-icon-wiggle 2s ease-in-out infinite;
}

.dmc-cta-icon:last-child {
    animation-direction: reverse;
    animation-delay: .5s;
}

@keyframes dmc-icon-wiggle {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50%       { transform: rotate(10deg)  scale(1.15); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .dmc-card {
        padding: 28px 18px 24px;
    }
    .dmc-countdown {
        gap: 6px;
    }
    .dmc-sep {
        display: none;
    }
}
