:root {
    --primary: #265e66;
    --primary-deep: #1d393d;
    --primary-soft: #64b0c2;
    --white: #ffffff;
    --ink: #1a1a1a;
    --muted: #66757a;
    --shadow: 0 16px 40px rgba(20, 53, 57, 0.16);
    --shadow-soft: 0 10px 24px rgba(38, 94, 102, 0.16);
    --container: min(1180px, calc(100% - 2rem));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: #f7f9f9;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.site-header {
    height: 125px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(38, 94, 102, 0.08);
}

.nav-shell {
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    width: 182px;
    object-fit: contain;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    z-index: 50;
    transition: transform 0.2s ease;
}

.nav-hamburger:hover {
    transform: scale(1.05);
}

.nav-hamburger:focus-visible {
    outline: 2px solid var(--primary-soft);
    outline-offset: 2px;
}

.nav-hamburger__line {
    width: 20px;
    height: 2.5px;
    background: var(--primary-deep);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin: 4px 0;
}

.nav-hamburger.is-active .nav-hamburger__line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-hamburger.is-active .nav-hamburger__line:nth-child(2) {
    opacity: 0;
    transform: scale(0.8);
}

.nav-hamburger.is-active .nav-hamburger__line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.site-nav > a,
.nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #38555a;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.site-nav > a:hover,
.site-nav > a:focus-visible,
.nav-dropdown__toggle:hover,
.nav-dropdown__toggle:focus-visible {
    background: rgba(38, 94, 102, 0.08);
    color: var(--primary-deep);
    transform: translateY(-1px);
}

.site-nav > a.is-active {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-soft);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: 50%;
    width: min(360px, 90vw);
    padding: 1.15rem;
    background: var(--white);
    border-radius: 28px;
    border: 1px solid rgba(38, 94, 102, 0.08);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown__menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem;
    border-radius: 18px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a:focus-visible {
    background: rgba(100, 176, 194, 0.16);
    transform: translateX(3px);
}

.nav-dropdown__menu img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-dropdown__menu span {
    color: var(--primary-deep);
    font-weight: 700;
}

.page-placeholder {
    min-height: 120px;
}

.page-placeholder__inner {
    min-height: 120px;
}

.site-footer {
    padding: 4rem 0 1.5rem;
    background: linear-gradient(135deg, #2b6b73 0%, #295f66 100%);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2rem;
}

.footer-brand p,
.footer-links a,
.footer-links span,
.footer-bottom p,
.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-logo {
    width: 170px;
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 470px;
}

.site-footer h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li + li {
    margin-top: 0.95rem;
}

.footer-links__subtitle {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1.2rem !important;
    opacity: 0.7;
}

.footer-links li + li {
    margin-top: 0.35rem; /* antes era 0.95rem, ahora más junto */
}

.footer-links__subtitle {
    margin-top: 1.2rem !important; /* los subtítulos sí tienen más espacio arriba */
}

.footer-links__subtitle:first-child {
    margin-top: 0 !important;
}           
.footer-links a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.social-links img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.92rem;
}

.footer-bottom div {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.floating-bubble {
    position: fixed;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    padding: 0.45rem;
    border-radius: 50%;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
    animation: floatBubble 3.2s ease-in-out infinite;
}

.floating-bubble img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.floating-bubble--left {
    left: 1rem;
    bottom: 6rem;
    background: linear-gradient(135deg, #0e8292 0%, #0a6674 100%);
}

.floating-bubble--right {
    right: 1rem;
    bottom: 6rem;
    background: linear-gradient(135deg, #27d366 0%, #0eb94f 100%);
    animation-delay: 0.7s;
}

@keyframes floatBubble {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@media (max-width: 860px) {
    .nav-hamburger {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 110px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(38, 94, 102, 0.08);
        padding: 0;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        z-index: 40;
    }

    .site-nav.is-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav > a,
    .nav-dropdown__toggle {
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        text-align: left;
        min-height: 52px;
        justify-content: flex-start;
        color: var(--primary-deep);
        font-weight: 500;
        font-size: 0.95rem;
        background: transparent;
        border-bottom: 1px solid rgba(38, 94, 102, 0.06);
        transition: background-color 0.2s ease, padding-left 0.2s ease;
    }

    .site-nav > a:hover,
    .site-nav > a:focus-visible,
    .nav-dropdown__toggle:hover,
    .nav-dropdown__toggle:focus-visible {
        background: rgba(100, 176, 194, 0.08);
        padding-left: 2rem;
        color: var(--primary);
    }

    .site-nav > a.is-active {
        background: rgba(38, 94, 102, 0.06);
        color: var(--primary-deep);
        box-shadow: none;
        font-weight: 600;
    }

    .nav-dropdown__menu {
        position: static;
        width: 100%;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
        padding: 0;
        background: rgba(100, 176, 194, 0.04);
        border: none;
        box-shadow: none;
    }

    .nav-dropdown:hover .nav-dropdown__menu,
    .nav-dropdown:focus-within .nav-dropdown__menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .nav-dropdown__menu a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.8rem 2rem 0.8rem 3rem;
        border-radius: 0;
        transition: background-color 0.2s ease, padding-left 0.2s ease;
    }

    .nav-dropdown__menu a:hover,
    .nav-dropdown__menu a:focus-visible {
        background: rgba(100, 176, 194, 0.12);
        padding-left: 3.5rem;
    }

    .footer-grid,
    .footer-bottom {
        display: grid;
        grid-template-columns: 1fr;
    }

    .nav-shell {
        padding: 0 1rem 0.8rem;
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 110px;
    }

    .brand img {
        width: 140px;
    }

    .site-nav {
        top: 110px;
    }
}

@media (max-width: 640px) {
    .site-header {
        height: 80px;
        padding: 0.5rem 0;
    }

    .brand img {
        width: 110px;
    }

    .nav-hamburger {
        width: 34px;
        height: 34px;
        padding: 5px;
    }

    .nav-hamburger__line {
        width: 18px;
        height: 2.25px;
        margin: 3.5px 0;
    }

    .site-nav {
        top: 80px;
        max-height: calc(100vh - 80px);
    }

    .site-nav > a,
    .nav-dropdown__toggle {
        font-size: 0.9rem;
        padding: 0.9rem 1.2rem;
        min-height: 48px;
    }

    .nav-dropdown__menu a {
        padding: 0.7rem 1.8rem 0.7rem 2.8rem;
        gap: 0.8rem;
    }

    .nav-dropdown__menu img {
        width: 32px;
        height: 32px;
    }

    .nav-dropdown__menu span {
        font-size: 0.85rem;
    }

    .floating-bubble {
        width: 52px;
        height: 52px;
    }

    .floating-bubble--left,
    .floating-bubble--right {
        bottom: 1rem;
    }

    .floating-bubble--left {
        left: 0.7rem;
    }

    .floating-bubble--right {
        right: 0.7rem;
    }
}
