/* ============================================
   DINASTÍA SEGUROS WIDGET - v1.2.0
   Paleta Maillo's Diamond Dynasty
   Fondo gris blanco, tarjetas premium, botones rojos
   ============================================ */

.dds-section,
.dds-section * {
    box-sizing: border-box;
}

.dds-section {
    --dds-bg: #F4F6F9;
    --dds-card: #FFFFFF;
    --dds-primary: #0A1F44;
    --dds-secondary: #7A8599;
    --dds-accent: #E32028;
    --dds-red: #E32028;
    --dds-red-dark: #8F0F14;
    --dds-cyan: #1E63FF;
    --dds-icon: #1E63FF;
    --dds-blue: #123D8D;
    --dds-blue-dark: #0A1F44;
    --dds-blue-light: #4D8DFF;
    --dds-corner: #E32028;
    --dds-line: #D9DEE8;
    --dds-shadow: 0 22px 55px rgba(10, 31, 68, 0.10);
    --dds-shadow-hover: 0 32px 75px rgba(10, 31, 68, 0.16);

    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 92px 20px 90px;
    font-family: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at 8% 18%, rgba(30, 99, 255, .075) 0%, transparent 28%),
        radial-gradient(circle at 92% 26%, rgba(77, 141, 255, .075) 0%, transparent 30%),
        radial-gradient(circle at 92% 86%, rgba(227, 32, 40, .055) 0%, transparent 34%),
        linear-gradient(180deg, #FFFFFF 0%, var(--dds-bg) 44%, #FFFFFF 100%);
    color: var(--dds-primary);
}

.dds-section::before,
.dds-section::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.dds-section::before {
    left: -150px;
    top: -170px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(77, 141, 255, .22);
    box-shadow:
        0 0 0 34px rgba(77, 141, 255, .035),
        0 0 0 72px rgba(77, 141, 255, .025),
        0 0 0 112px rgba(77, 141, 255, .018);
}

.dds-section::after {
    right: -120px;
    bottom: -90px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(77, 141, 255, .16);
    box-shadow:
        0 0 0 36px rgba(217, 222, 232, .32),
        0 0 0 86px rgba(217, 222, 232, .20),
        0 0 0 136px rgba(217, 222, 232, .12);
}

.dds-container {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.dds-container::before,
.dds-container::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: -1;
    width: 150px;
    height: 150px;
    opacity: .26;
    background-image: radial-gradient(var(--dds-blue-light) 1.6px, transparent 1.6px);
    background-size: 16px 16px;
}

.dds-container::before {
    left: -55px;
    top: -50px;
}

.dds-container::after {
    right: -40px;
    bottom: 90px;
}

/* Header */
.dds-header {
    text-align: center;
    margin-bottom: 58px;
}

.dds-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 16px;
    color: var(--dds-red);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.dds-subtitle::before,
.dds-subtitle::after {
    content: '';
    display: block;
    width: 72px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--dds-red));
}

.dds-subtitle::after {
    background: linear-gradient(90deg, var(--dds-red), transparent);
}

.dds-title {
    margin: 0 0 18px;
    color: var(--dds-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.8rem, 5.7vw, 5.5rem);
    line-height: .98;
    font-weight: 800;
    letter-spacing: -0.045em;
    text-shadow: 0 10px 22px rgba(10, 31, 68, .10);
}

.dds-title .dds-title-cyan {
    display: block;
    color: var(--dds-red);
    text-shadow: 0 12px 28px rgba(227, 32, 40, .12);
}

.dds-line {
    position: relative;
    width: 320px;
    max-width: 55vw;
    height: 18px;
    margin: 0 auto 22px;
}

.dds-line::before,
.dds-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 28px);
    height: 2px;
    transform: translateY(-50%);
}

.dds-line::before {
    left: 0;
    background: linear-gradient(90deg, transparent, var(--dds-red));
}

.dds-line::after {
    right: 0;
    background: linear-gradient(90deg, var(--dds-blue), transparent);
}

.dds-line {
    background: none;
}

.dds-line::marker {
    display: none;
}

.dds-line:after {
    content: '';
}

.dds-line > * {
    display: none;
}

.dds-line {
    border-radius: 0;
}

.dds-line::selection {
    background: transparent;
}

.dds-line::before {
    box-shadow: none;
}

.dds-line::after {
    box-shadow: none;
}

.dds-line {
    --diamond-size: 12px;
}

.dds-line + .dds-description::before {
    content: '◆';
    display: block;
    width: var(--diamond-size, 12px);
    height: var(--diamond-size, 12px);
    margin: -34px auto 20px;
    color: var(--dds-blue);
    font-size: 14px;
    line-height: 1;
    transform: rotate(0deg);
    text-shadow: 0 0 14px rgba(30, 99, 255, .35);
}

.dds-description {
    margin: 0 auto;
    max-width: 760px;
    color: var(--dds-primary);
    opacity: .78;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.72;
    font-weight: 500;
}

/* Grid */
.dds-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 54px;
}

/* Card */
.dds-card {
    position: relative;
    min-height: 100%;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(217, 222, 232, .95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--dds-shadow);
    opacity: 0;
    transform: translateY(24px);
    transition: transform .38s ease, box-shadow .38s ease, border-color .38s ease;
}

.dds-section.dds-in-view .dds-card {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity .7s ease,
        transform .7s cubic-bezier(.16,1,.3,1),
        box-shadow .38s ease,
        border-color .38s ease;
}

.dds-section.dds-in-view .dds-card:nth-child(1) { transition-delay: .08s; }
.dds-section.dds-in-view .dds-card:nth-child(2) { transition-delay: .18s; }
.dds-section.dds-in-view .dds-card:nth-child(3) { transition-delay: .28s; }

.dds-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--dds-shadow-hover);
    border-color: rgba(30, 99, 255, .22);
}

.dds-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.82) 100%),
        radial-gradient(circle at 15% 8%, rgba(30, 99, 255, .08), transparent 32%);
}

.dds-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 38px 30px 30px;
}

/* Decorative corner */
.dds-corner {
    position: absolute;
    right: 0;
    top: 0;
    width: 94px;
    height: 94px;
    z-index: 3;
    opacity: 1;
    background:
        linear-gradient(135deg, transparent 0 49%, rgba(255,255,255,.22) 50% 58%, transparent 59% 100%),
        linear-gradient(135deg, transparent 0 49%, var(--dds-corner) 50% 100%);
    box-shadow: -12px 10px 24px rgba(227, 32, 40, .10);
    transition: width .35s ease, height .35s ease, filter .35s ease;
}

.dds-card:nth-child(even) .dds-corner {
    --dds-corner: #1E63FF;
}

.dds-card:hover .dds-corner {
    width: 104px;
    height: 104px;
    filter: saturate(1.1);
}

/* Card Header */
.dds-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    text-align: center;
}

.dds-card-icon {
    position: relative;
    width: 116px;
    height: 116px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFFFFF 0%, #F4F6F9 100%);
    border: 1px solid rgba(217, 222, 232, .9);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.94),
        0 16px 30px rgba(10, 31, 68, .08);
}

.dds-card-icon::before,
.dds-card-icon::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dds-card-icon::before {
    inset: -8px;
    border: 2px solid rgba(30, 99, 255, .22);
    border-right-color: transparent;
    border-bottom-color: transparent;
}

.dds-card-icon::after {
    right: -5px;
    top: 10px;
    width: 13px;
    height: 13px;
    background: var(--dds-red);
    box-shadow: 0 0 14px rgba(227,32,40,.55);
}

.dds-section.dds-in-view .dds-card-icon::before {
    animation: ddsOrbit 8s linear infinite;
}

.dds-card-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--dds-icon);
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dds-card-title {
    margin: 0;
    color: var(--dds-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

/* Card Divider */
.dds-card-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dds-line), transparent);
    border-radius: 99px;
    margin: 4px 0 22px;
    position: relative;
}

.dds-card-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -1px;
    width: 50px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 99px;
    background: var(--dds-blue);
}

/* What is */
.dds-what-is {
    margin-bottom: 22px;
}

.dds-question,
.dds-ideal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--dds-primary);
    font-weight: 800;
}

.dds-q-icon {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--dds-red);
    color: #fff;
    font-size: .95rem;
    font-weight: 900;
    box-shadow: 0 7px 14px rgba(227,32,40,.18);
}

.dds-card:nth-child(even) .dds-q-icon {
    background: var(--dds-blue);
    box-shadow: 0 7px 14px rgba(30,99,255,.18);
}

.dds-q-text,
.dds-ideal-header span {
    font-size: .96rem;
}

.dds-what-text {
    margin: 0;
    color: var(--dds-primary);
    opacity: .78;
    font-size: .94rem;
    line-height: 1.72;
}

/* Ideal for */
.dds-ideal-for {
    margin-bottom: 22px;
}

.dds-ideal-header svg {
    width: 22px;
    height: 22px;
    stroke: var(--dds-red);
}

.dds-card:nth-child(even) .dds-ideal-header svg {
    stroke: var(--dds-blue);
}

.dds-ideal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dds-ideal-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 9px;
    color: var(--dds-primary);
    opacity: .82;
    font-size: .92rem;
    line-height: 1.5;
}

.dds-ideal-list li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: .62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--dds-red);
    box-shadow: 0 0 8px rgba(227,32,40,.26);
}

.dds-card:nth-child(even) .dds-ideal-list li::before {
    background: var(--dds-blue);
    box-shadow: 0 0 8px rgba(30,99,255,.26);
}

/* Note before button */
.dds-card-note {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    margin-top: auto;
    margin-bottom: 18px;
    min-height: 72px;
    border-radius: 14px;
    border: 1px solid rgba(227, 32, 40, .24);
    background: linear-gradient(180deg, rgba(227,32,40,.07), rgba(227,32,40,.035));
}

.dds-card:nth-child(even) .dds-card-note {
    border-color: rgba(30,99,255,.25);
    background: linear-gradient(180deg, rgba(30,99,255,.07), rgba(30,99,255,.035));
}

.dds-note-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--dds-red);
}

.dds-card:nth-child(even) .dds-note-icon {
    color: var(--dds-blue);
}

.dds-note-icon svg {
    width: 31px;
    height: 31px;
    stroke: currentColor;
}

.dds-card-note p {
    margin: 0;
    color: var(--dds-primary);
    font-size: .9rem;
    line-height: 1.4;
    font-weight: 700;
}

/* Button red */
.dds-card-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: #FFFFFF !important;
    background: linear-gradient(180deg, var(--dds-red) 0%, #D71620 48%, var(--dds-red-dark) 100%);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        0 14px 28px rgba(227,32,40,.24),
        inset 0 1px 0 rgba(255,255,255,.18);
    font-size: .96rem;
    font-weight: 900;
    line-height: 1.1;
    transition: transform .28s ease, box-shadow .28s ease, filter .28s ease;
}

.dds-card-button::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -20px;
    width: 48%;
    height: 26px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255,255,255,.56), rgba(255,255,255,.18) 38%, transparent 72%);
    filter: blur(8px);
    opacity: .9;
}

.dds-card-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.18) 44%, transparent 62%);
    transform: translateX(-140%);
}

.dds-card-button:hover {
    transform: translateY(-2px);
    color: #fff !important;
    filter: saturate(1.05);
    box-shadow:
        0 18px 34px rgba(227,32,40,.30),
        inset 0 1px 0 rgba(255,255,255,.2);
}

.dds-card-button:hover::after {
    animation: ddsSheen 1.1s ease;
}

.dds-btn-icon {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
}

.dds-btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
}

.dds-card-button > * {
    position: relative;
    z-index: 1;
}

/* Closing Box */
.dds-closing-box {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto auto;
    align-items: center;
    gap: 28px;
    min-height: 112px;
    padding: 20px 34px;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(217, 222, 232, .98);
    box-shadow: 0 18px 42px rgba(10,31,68,.08);
    position: relative;
    overflow: hidden;
}

.dds-closing-box::after {
    content: 'Confianza  |  Acompañamiento  |  Experiencia  |  Compromiso';
    color: var(--dds-blue);
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: .01em;
    justify-self: end;
    white-space: nowrap;
}

.dds-closing-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--dds-red);
    border: 1px solid rgba(30,99,255,.22);
    background: linear-gradient(145deg, #fff, #F4F6F9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 24px rgba(10,31,68,.06);
}

.dds-closing-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
}

.dds-closing-text {
    color: var(--dds-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.2rem, 2vw, 1.62rem);
    font-weight: 800;
    line-height: 1.28;
}

.dds-closing-text br + * {
    color: var(--dds-red);
}

/* Animations */
@keyframes ddsOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ddsSheen {
    from { transform: translateX(-140%); }
    to { transform: translateX(140%); }
}

@media (prefers-reduced-motion: reduce) {
    .dds-section *,
    .dds-section *::before,
    .dds-section *::after {
        animation: none !important;
        transition: none !important;
    }

    .dds-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .dds-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dds-closing-box {
        grid-template-columns: 86px 1fr;
    }

    .dds-closing-box::after {
        grid-column: 1 / -1;
        justify-self: center;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .dds-section {
        padding: 66px 16px 70px;
    }

    .dds-subtitle {
        font-size: .72rem;
        letter-spacing: 2px;
        gap: 12px;
    }

    .dds-subtitle::before,
    .dds-subtitle::after {
        width: 34px;
    }

    .dds-title {
        font-size: clamp(2.25rem, 12vw, 3.4rem);
    }

    .dds-description {
        font-size: .98rem;
    }

    .dds-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dds-card-inner {
        padding: 34px 22px 24px;
    }

    .dds-card-icon {
        width: 104px;
        height: 104px;
    }

    .dds-card-icon svg {
        width: 42px;
        height: 42px;
    }

    .dds-card-title {
        font-size: 1.65rem;
    }

    .dds-closing-box {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        padding: 26px 20px;
    }

    .dds-closing-box::after {
        font-size: .86rem;
        line-height: 1.6;
    }
}

@media (max-width: 420px) {
    .dds-card-note {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .dds-card-button {
        font-size: .88rem;
    }
}
