*,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            background: #f5f5f5;
            color: #333;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 16px;
            line-height: 1.65;
        }

        img,
        svg {
            max-width: 100%;
        }

        a {
            color: #087f68;
        }

        a:hover {
            color: #075f50;
        }

        button,
        input {
            font: inherit;
        }

        button {
            cursor: pointer;
        }

        .container {
            width: min(1200px, calc(100% - 40px));
            margin: 0 auto;
        }

        .skip-link {
            position: absolute;
            top: -60px;
            left: 20px;
            z-index: 10000;
            padding: 12px 18px;
            border-radius: 0 0 5px 5px;
            background: #fff;
            color: #1d2d3d;
            font-weight: bold;
            text-decoration: none;
        }

        .skip-link:focus {
            top: 0;
        }

        :focus-visible {
            outline: 3px solid #f4c542;
            outline-offset: 3px;
        }

        header {
            padding: 18px 0;
            background: #fff;
            color: #2c3e50;
            border-bottom: 1px solid #dfe7e9;
        }

        .logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logo-container a {
            display: inline-block;
            line-height: 0;
        }

        .logo-container img {
            display: block;
            width: 340px;
            max-width: 100%;
            height: auto;
        }

        nav.main-navigation {
            position: relative;
            z-index: 100;
            background: #34495e;
        }

        .menu-toggle {
            display: none;
            width: 100%;
            padding: 14px 20px;
            border: 0;
            background: #138f79;
            color: #fff;
            font-weight: bold;
            text-align: left;
        }

        .menu {
            display: flex;
            justify-content: center;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .menu li {
            position: relative;
        }

        .menu a {
            display: block;
            padding: 15px 20px;
            color: #fff;
            text-align: center;
            text-decoration: none;
            transition: background-color .2s ease;
        }

        .menu a:hover,
        .menu a:focus-visible,
        .menu a[aria-current="page"] {
            background: #138f79;
            color: #fff;
        }

        .main-content {
            display: flex;
            align-items: flex-start;
            gap: 32px;
            padding-top: 38px;
            padding-bottom: 38px;
            background: #fff;
        }

        .content-left {
            min-width: 0;
            flex: 3;
        }

        .content-right {
            min-width: 260px;
            flex: 1;
            padding: 22px;
            border-left: 1px solid #ddd;
            background: #f9f9f9;
        }

        section {
            scroll-margin-top: 30px;
            margin-bottom: 42px;
        }

        section:last-child {
            margin-bottom: 0;
        }

        .section-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 18px;
            padding-bottom: 10px;
            border-bottom: 2px solid #19a88e;
        }

        .section-icon {
            width: 42px;
            height: 42px;
            flex: 0 0 auto;
        }

        h2,
        h3 {
            color: #2c3e50;
            line-height: 1.3;
        }

        h2 {
            margin: 0;
            font-size: clamp(1.45rem, 3vw, 1.9rem);
        }

        h3 {
            margin-top: 0;
            font-size: 1.25rem;
        }

        p {
            margin-top: 0;
        }

        .intro-text {
            font-size: 1.08rem;
        }

        .featured-image {
            margin: 24px 0 30px;
        }

        .featured-image img {
            display: block;
            width: 100%;
            height: auto;
            border-radius: 10px;
            box-shadow: 0 5px 18px rgba(31, 48, 64, .13);
        }

        .featured-image figcaption {
            margin-top: 8px;
            color: #666;
            font-size: .9rem;
            text-align: center;
        }

        .notice-box {
            margin: 22px 0;
            padding: 17px 19px;
            border-left: 5px solid #138f79;
            border-radius: 5px;
            background: #eef8f6;
        }

        .notice-box p:last-child {
            margin-bottom: 0;
        }

        .guide-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 18px;
            margin-top: 24px;
        }

        .guide-card {
            display: flex;
            flex-direction: column;
            min-height: 100%;
            padding: 20px;
            border: 1px solid #d9e3e1;
            border-radius: 7px;
            background: #fff;
            box-shadow: 0 3px 12px rgba(25, 50, 65, .06);
        }

        .guide-card h3 {
            margin-bottom: 10px;
        }

        .guide-card p {
            flex-grow: 1;
            margin-bottom: 16px;
        }

        .guide-link {
            align-self: flex-start;
            display: inline-block;
            padding: 9px 14px;
            border-radius: 4px;
            background: #138f79;
            color: #fff;
            font-weight: bold;
            text-decoration: none;
        }

        .guide-link:hover,
        .guide-link:focus-visible {
            background: #0d705f;
            color: #fff;
        }

        .decesos-box {
            margin-bottom: 22px;
            padding: 18px;
            border-radius: 6px;
            background: #e7f4f7;
        }

        .decesos-box:last-child {
            margin-bottom: 0;
        }

        .decesos-box h2 {
            margin-top: 0;
            padding-bottom: 8px;
            border-bottom: 1px solid #19a88e;
            font-size: 1.28rem;
        }

        .decesos-box ul {
            padding-left: 20px;
        }

        .quick-links {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .quick-links li {
            margin-bottom: 9px;
        }

        .quick-links a {
            font-weight: bold;
            text-decoration: none;
        }

        .contact-box {
            padding: 22px;
            border-radius: 6px;
            background: #f2f6f7;
        }

        footer {
            padding: 28px 0;
            background: #2c3e50;
            color: #fff;
            text-align: center;
        }

        footer p {
            margin: 8px 0;
            text-align: center;
        }

        footer a,
        .cookie-settings-link {
            color: #63e6cc;
        }

        .footer-links {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px 20px;
            margin: 18px 0;
            padding: 0;
            list-style: none;
        }

        .cookie-settings-link {
            padding: 0;
            border: 0;
            background: transparent;
            text-decoration: underline;
        }

        #cookie-banner {
            position: fixed;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 9999;
            padding: 16px 20px;
            background: #1f3040;
            color: #fff;
            box-shadow: 0 -3px 14px rgba(0, 0, 0, .25);
        }

        #cookie-banner[hidden] {
            display: none;
        }

        .cookie-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .cookie-text {
            flex: 1;
        }

        .cookie-text p {
            margin: 0;
            font-size: .96rem;
        }

        .cookie-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .cookie-btn {
            min-width: 100px;
            padding: 10px 18px;
            border: 1px solid #19a88e;
            border-radius: 4px;
            background: #138f79;
            color: #fff;
            font-weight: bold;
        }

        .cookie-btn-outline {
            border-color: #fff;
            background: transparent;
        }

        .cookie-dialog {
            width: min(520px, calc(100% - 30px));
            padding: 0;
            border: 0;
            border-radius: 8px;
            color: #333;
            box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
        }

        .cookie-dialog::backdrop {
            background: rgba(0, 0, 0, .55);
        }

        .cookie-dialog-content {
            padding: 24px;
        }

        .cookie-category {
            margin: 18px 0;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            background: #f8f8f8;
        }

        .cookie-category-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            margin-bottom: 7px;
        }

        .cookie-category h3,
        .cookie-category p {
            margin: 0;
        }

        .cookie-status {
            color: #087f68;
            font-weight: bold;
        }

        .cookie-dialog-buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 22px;
        }

        .dialog-btn {
            padding: 10px 16px;
            border: 1px solid #138f79;
            border-radius: 4px;
            background: #138f79;
            color: #fff;
            font-weight: bold;
        }

        .dialog-btn-secondary {
            background: #fff;
            color: #2c3e50;
        }

        @media (max-width: 768px) {
            .logo-container img {
                width: 280px;
            }

            .container {
                width: min(100% - 28px, 1200px);
            }

            .menu-toggle {
                display: block;
            }

            .menu {
                display: none;
                flex-direction: column;
            }

            .menu.active {
                display: flex;
            }

            .menu li {
                width: 100%;
            }

            .menu a {
                padding: 13px 18px;
                border-bottom: 1px solid rgba(255, 255, 255, .12);
                text-align: left;
            }

            .main-content {
                flex-direction: column;
                padding-top: 28px;
                padding-bottom: 28px;
            }

            .content-left,
            .content-right {
                width: 100%;
                min-width: 0;
            }

            .content-right {
                padding: 20px;
                border-top: 1px solid #ddd;
                border-left: 0;
            }

            .logo-container {
                flex-direction: column;
                gap: 12px;
            }

            .logo-text {
                text-align: center;
            }

            .guide-grid {
                grid-template-columns: 1fr;
            }

            .cookie-content {
                flex-direction: column;
                align-items: stretch;
                gap: 14px;
            }

            .cookie-buttons {
                width: 100%;
            }

            .cookie-btn {
                flex: 1;
            }
        }

        @media (max-width: 480px) {
            header {
                padding: 14px 0;
            }

            .logo-container img {
                width: 240px;
            }

            .cookie-buttons,
            .cookie-dialog-buttons {
                flex-direction: column;
            }

            .cookie-btn,
            .dialog-btn {
                width: 100%;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            html {
                scroll-behavior: auto;
            }
        }

/* =========================================================
   PÁGINA DE SEGUROS
   ========================================================= */

.content-full {
    width: 100%;
    flex: 1 1 100%;
}

.seguros-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 28px 0 32px;
}

.seguro-card {
    padding: 24px;
    border: 1px solid #d9e3e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(25, 50, 65, .07);
}

.seguro-card .seguro-icon {
    display: block;
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
    margin: 0 auto 14px;
}

.seguro-card h3 {
    margin-bottom: 14px;
    text-align: center;
}

.coberturas-list {
    margin: 0 0 20px;
    padding-left: 22px;
}

.coberturas-list li {
    margin-bottom: 6px;
}

.recomendacion {
    margin: 30px 0;
    padding: 22px;
    border-left: 5px solid #138f79;
    border-radius: 6px;
    background: #eef8f6;
}

.recomendacion h3 {
    margin-bottom: 12px;
}

.recomendacion ul {
    margin-bottom: 0;
    padding-left: 22px;
}

.table-responsive {
    width: 100%;
    margin: 18px 0 28px;
    overflow-x: auto;
}

.comparativa-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}

.comparativa-table th,
.comparativa-table td {
    padding: 12px 14px;
    border: 1px solid #d8dfdf;
    text-align: left;
    vertical-align: top;
}

.comparativa-table th {
    background: #138f79;
    color: #fff;
}

.comparativa-table tbody tr:nth-child(even) {
    background: #f4f8f7;
}

@media (max-width: 768px) {
    .seguros-grid {
        grid-template-columns: 1fr;
    }

    .seguro-card {
        padding: 20px;
    }
}

/* =========================================================
   SUBMENÚ - PLANIFICACIÓN PREVIA
   ========================================================= */

.menu-item-has-children {
    position: relative;
}

.menu-parent-row {
    display: flex;
    align-items: stretch;
}

.menu-parent-link {
    flex: 1;
}

.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}


/* SUBMENÚ */

.submenu {
    display: none;
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;

    min-width: 250px;

    margin: 0;
    padding: 0;

    list-style: none;

    background: #2c3e50;

    box-shadow:
        0 5px 12px
        rgba(0, 0, 0, 0.18);
}

.submenu li {
    width: 100%;
}

.submenu a {
    display: block;

    width: 100%;

    padding: 11px 16px;

    white-space: nowrap;
}


/* Mostrar desplegable */

.menu-item-has-children:hover > .submenu,
.menu-item-has-children:focus-within > .submenu,
.menu-item-has-children.submenu-open > .submenu {
    display: block;
}


/* Página perteneciente a Planificación previa */

.menu-parent-link.section-current {
    font-weight: 700;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 768px) {

    .menu-item-has-children {
        width: 100%;
    }

    .menu-parent-row {
        width: 100%;
    }

    .submenu-toggle {
        min-width: 50px;

        border-bottom:
            1px solid
            rgba(255, 255, 255, 0.1);
    }

    .submenu {
        position: static;

        min-width: 0;
        width: 100%;

        box-shadow: none;

        background:
            rgba(0, 0, 0, 0.12);
    }


    /*
       En móvil no abrimos el submenú
       simplemente al pasar el dedo.
    */

    .menu-item-has-children:hover > .submenu,
    .menu-item-has-children:focus-within > .submenu {
        display: none;
    }

    .menu-item-has-children.submenu-open > .submenu {
        display: block;
    }

    .submenu a {
        padding-left: 35px;

        white-space: normal;
    }
}