:root {
    --brand-green: #3f6a4f;
    --brand-green-deep: #1f3d2b;
    --brand-red: #9e2c28;
    --brand-gold: #d6b15f;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --surface-border: rgba(44, 58, 52, 0.16);
    --ink: #24363d;
    --ink-soft: #455e65;
    --shadow-soft: 0 16px 36px rgba(19, 32, 28, 0.12);
    --shadow-strong: 0 28px 70px rgba(19, 32, 28, 0.2);
    --header-height: 3rem;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 0.75rem);
}

body {
    font-family: "Source Sans Pro", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(214, 177, 95, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(159, 191, 170, 0.16), transparent 32%),
        linear-gradient(180deg, #f7f5ef 0%, #f9f8f4 30%, #ffffff 100%);
}

body.nav-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10002;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--brand-green-deep);
    color: #fff;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

#header {
    --header-title-size: clamp(1rem, 1.2vw, 1.45rem);
    --header-title-tracking: -0.04em;
    --header-nav-size: clamp(0.82rem, 0.74vw, 0.97rem);
    --header-nav-gap: 0.2rem;
    --header-link-padding-x: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(35, 55, 46, 0.08);
}

.titulo {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.titulo h1 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    display: block !important;
    margin: 0 auto;
    line-height: 1 !important;
}

#titulo-principal {
    font-size: var(--header-title-size);
    color: var(--brand-green-deep);
    letter-spacing: var(--header-title-tracking);
    white-space: nowrap;
    pointer-events: none;
}

.titulonav {
    position: static;
    width: auto;
    height: auto;
    line-height: normal;
    margin-left: auto;
    text-align: right;
}

#header nav ul {
    display: flex;
    align-items: center;
    gap: var(--header-nav-gap);
}

#header nav ul li {
    margin-left: 0;
}

#header nav ul li a,
#header .dropbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--header-height) - 0.5rem);
    padding: 0 var(--header-link-padding-x);
    border-radius: 999px;
    color: var(--ink);
    font-size: var(--header-nav-size);
    font-weight: 600;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

#header .dropbtn {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

#header nav ul li a:hover,
#header .dropbtn:hover,
#header nav ul li a:focus-visible,
#header .dropbtn:focus-visible {
    background: rgba(63, 106, 79, 0.1);
    color: var(--brand-green-deep);
    outline: none;
    transform: translateY(-1px);
}

.nav-expo-toggle strong {
    color: var(--brand-green);
}

.nav-youtube strong {
    color: #c4302b;
}

#header .dropdown-content {
    min-width: 13rem;
    margin-top: 0.45rem;
    padding: 0.55rem;
    border: 1px solid rgba(35, 55, 46, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow-soft);
}

#header .dropdown-content a {
    justify-content: flex-start;
    width: 100%;
    height: auto;
    min-height: 2.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.75rem;
}

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 0.25rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(35, 55, 46, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    line-height: 1;
}

.nav-toggle-line {
    width: 1.05rem;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--brand-green-deep);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

#header.header-collapsed {
    justify-content: center;
    gap: 0;
    padding: 0 0.75rem;
    backdrop-filter: none;
}

#header.header-collapsed .titulo {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

#header.header-collapsed .titulo h1 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: none;
    display: block !important;
    margin: 0 auto;
    line-height: 1 !important;
    transform: translateZ(0) scale(var(--mobile-title-scale, 1));
    transform-origin: center center;
    will-change: transform;
}

#header.header-collapsed #titulo-principal {
    max-width: none;
    margin: 0 auto;
    padding: 0 0.2rem;
    text-align: center;
    white-space: nowrap !important;
    line-height: 1;
    letter-spacing: -0.052em;
}

#header.header-collapsed .nav-toggle {
    display: inline-flex;
    position: fixed;
    top: auto;
    right: max(0.8rem, calc(env(safe-area-inset-right, 0px) + 0.8rem));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
    width: 2.65rem;
    height: 2.65rem;
    margin: 0;
    z-index: 10001;
    opacity: 0.98;
}

#header.header-collapsed .titulonav {
    display: block !important;
    position: fixed;
    top: auto;
    right: max(0.75rem, calc(env(safe-area-inset-right, 0px) + 0.75rem));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 4.8rem);
    left: auto;
    z-index: 10000;
    width: min(18rem, calc(100vw - 1.5rem));
    max-height: min(26rem, calc(100dvh - 7rem));
    padding: 0.9rem 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(35, 55, 46, 0.12);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
    text-align: left;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.5rem) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

body.nav-open #header.header-collapsed .titulonav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#header.header-collapsed nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
}

#header.header-collapsed nav ul li {
    display: block;
}

#header.header-collapsed nav ul li a,
#header.header-collapsed .dropbtn {
    justify-content: space-between;
    width: 100%;
    min-height: 2.8rem;
    padding: 0.8rem 0.25rem;
    border-radius: 0.9rem;
    text-align: left;
}

#header.header-collapsed .dropdown-content {
    position: static;
    display: none;
    min-width: 0;
    margin-top: 0.25rem;
    padding: 0.35rem 0.2rem 0.15rem 0.85rem;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#header.header-collapsed .dropdown.is-open .dropdown-content {
    display: block;
}

#header.header-collapsed .dropdown-content a {
    min-height: 2.35rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(63, 106, 79, 0.06);
}

#intro,
#one,
#two {
    isolation: isolate;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
}

#intro::before,
#one::before,
#two::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

#intro::before {
    background:
        radial-gradient(circle at 50% 72%, rgba(12, 18, 16, 0.28), transparent 25%),
        linear-gradient(180deg, rgba(17, 27, 24, 0.16) 0%, rgba(17, 27, 24, 0.08) 30%, rgba(17, 27, 24, 0.34) 100%);
}

#one::before,
#two::before {
    background: linear-gradient(180deg, rgba(13, 21, 19, 0.34) 0%, rgba(13, 21, 19, 0.18) 36%, rgba(13, 21, 19, 0.4) 100%);
}

#intro > .content,
#one > .content,
#two > .content {
    position: relative;
    z-index: 1;
}

#intro .content,
#one .content,
#two .content,
#work .content,
#contact .content,
#footer {
    position: relative;
    z-index: 18;
}

.container-buttons,
.enlace-logo {
    z-index: 18;
}

#intro .content {
    max-width: min(42rem, calc(100% - 3rem));
    padding-inline: 1.2rem;
}

#titulo-web {
    font-size: clamp(3.1rem, 6.5vw, 5.35rem);
    line-height: 0.95;
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

#mecanografiado {
    max-width: 36rem;
    margin: 1.25rem auto 0;
    font-size: clamp(1.02rem, 1.5vw, 1.3rem);
    line-height: 1.5;
    text-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

#mecanografiado strong {
    color: #fff7dd;
}

#intro .button.down {
    margin-top: 1.5rem;
    border-color: rgba(255, 255, 255, 0.86);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

#intro .button.down:hover,
#intro .button.down:focus-visible {
    background-color: rgba(255, 255, 255, 0.16);
}

.container-buttons {
    position: absolute;
    top: 0.9rem;
    left: 1.05rem;
    min-width: auto;
    gap: 0.7rem;
    align-items: center;
    transform: none;
    justify-content: flex-start;
}

.container-buttons a,
.expo-trigger {
    position: relative;
    width: 3.1rem;
    height: 3.1rem;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 12px 30px rgba(21, 32, 28, 0.26);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.container-buttons a {
    --social-roll-distance: 2.4em;
    --social-roll-duration: 0.82s;
    --social-roll-easing: cubic-bezier(0.2, 0.88, 0.24, 1);
}

.container-buttons a::before,
.container-buttons a::after {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 1em;
    height: 1em;
    margin: 0;
    line-height: 1;
    transform: translate(-50%, -50%) translateY(var(--icon-offset, 0));
    transition: transform var(--social-roll-duration) var(--social-roll-easing);
    pointer-events: none;
    will-change: transform;
}

.container-buttons .one::before,
.container-buttons .one::after,
.container-buttons .two::before,
.container-buttons .two::after,
.container-buttons .three::before,
.container-buttons .three::after,
.container-buttons .four::before,
.container-buttons .four::after,
.container-buttons .six::before,
.container-buttons .six::after {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.container-buttons .five::before,
.container-buttons .five::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.container-buttons .one::before,
.container-buttons .one::after {
    content: "\f39e";
}

.container-buttons .two::before,
.container-buttons .two::after {
    content: "\f099";
}

.container-buttons .three::before,
.container-buttons .three::after {
    content: "\f16d";
}

.container-buttons .four::before,
.container-buttons .four::after {
    content: "\e07b";
}

.container-buttons .five::before,
.container-buttons .five::after {
    content: "\f0e0";
}

.container-buttons .six::before,
.container-buttons .six::after {
    content: "\f167";
}

.container-buttons a::before {
    --icon-offset: 0;
}

.container-buttons a::after {
    --icon-offset: var(--social-roll-distance);
}

.container-buttons a:hover::before,
.container-buttons a:focus-visible::before {
    --icon-offset: calc(var(--social-roll-distance) * -1);
}

.container-buttons a:hover::after,
.container-buttons a:focus-visible::after {
    --icon-offset: 0;
}

.expo-trigger {
    min-width: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
}

.container-buttons .expo-trigger.icon-log_mujeryguardiacivil::before {
    content: "\e900";
    display: block;
    margin: 0;
    font-family: "icomoon" !important;
    font-size: 1.12rem;
    line-height: 1;
}

.container-buttons .expo-trigger.icon-log_mujeryguardiacivil::after {
    content: none !important;
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .container-buttons a::before,
    .container-buttons a::after {
        transition: none;
    }
}

.container-buttons a:hover,
.container-buttons a:focus-visible,
.expo-trigger:hover,
.expo-trigger:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(21, 32, 28, 0.28);
    outline: none;
    filter: saturate(1.08);
}

.dropdown-vertical {
    position: relative;
    top: auto;
    right: auto;
    z-index: 42;
}

.dropdown-vertical .dropdowncontent {
    position: absolute;
    top: calc(100% + 0.85rem);
    right: auto;
    left: 50%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(20rem, calc(100vw - 2rem));
    padding: 0.8rem;
    margin: 0;
    transform: translate(-50%, 0.55rem) scale(0.96);
    transform-origin: top center;
    border: 1px solid rgba(35, 55, 46, 0.12);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 243, 0.94));
    box-shadow: 0 24px 44px rgba(18, 30, 26, 0.22);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.dropdown-vertical .dropdowncontent::before {
    content: "";
    position: absolute;
    top: -0.45rem;
    left: 50%;
    width: 0.95rem;
    height: 0.95rem;
    transform: translateX(-50%) rotate(45deg);
    border-top: 1px solid rgba(35, 55, 46, 0.12);
    border-left: 1px solid rgba(35, 55, 46, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.dropdown-vertical.is-open .dropdowncontent {
    display: grid !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
    .dropdown-vertical:hover .dropdowncontent {
        display: grid !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }
}

.dropdown-vertical .dropdowncontent a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(63, 106, 79, 0.12);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-green-deep);
    font-family: "Source Sans Pro", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
    opacity: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.dropdown-vertical .dropdowncontent a::before,
.dropdown-vertical .dropdowncontent a::after {
    content: none;
    display: none;
}

.dropdown-vertical .dropdowncontent a:hover,
.dropdown-vertical .dropdowncontent a:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(63, 106, 79, 0.24);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 24px rgba(31, 61, 43, 0.12);
    outline: none;
}

.box.style2 {
    border: 1px solid var(--surface-border);
    border-radius: 1.6rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.84));
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(14px);
}

#one .content,
#two .content {
    width: min(42rem, calc(100% - 2rem));
    display: flex;
    flex-direction: column;
    align-items: center;
}

#one .content > header,
#two .content > header {
    width: min(100%, 38rem);
    margin: 0 auto 1.15rem;
    text-align: center;
}

#one h2,
#two h2 {
    color: var(--ink);
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    text-wrap: balance;
}

#one p,
#two p,
#work p,
#contact p {
    color: var(--ink-soft);
    font-size: 1.08rem;
    line-height: 1.72;
    letter-spacing: 0.01em;
    word-spacing: normal;
    text-align: left;
    text-indent: 0;
    text-wrap: pretty;
    hyphens: none;
}

#one p,
#two p {
    width: min(100%, 40rem);
    max-width: 42ch;
    margin: 0 auto;
}

#work .content > header,
#contact .content > header {
    max-width: min(56rem, calc(100% - 1rem));
    margin: 0 auto 2.75rem;
    text-align: center;
}

.text-align-justify {
    text-align: left;
    text-justify: auto;
    hyphens: none;
    word-spacing: normal;
}

#work {
    background:
        radial-gradient(circle at top left, rgba(214, 177, 95, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 246, 241, 0.92));
}

#work .content {
    width: min(70rem, calc(100% - 3rem));
    max-width: none;
}

#work .content > header p,
#contact .content > header p {
    margin: 0 auto;
    max-width: 52rem;
}

#work h2,
#contact h2 {
    color: var(--brand-green-deep);
}

#work .content a:not(.image),
#contact .content a {
    color: var(--brand-red);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
}

.gallery {
    width: min(62rem, 100%);
    gap: 1rem;
    margin-bottom: 0;
}

.gallery article {
    width: calc(50% - 0.5rem);
}

.gallery article .image {
    overflow: hidden;
    border-radius: 1.15rem;
    box-shadow: var(--shadow-soft);
    background: #fff;
}

.gallery article img {
    transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery article a:hover img,
.gallery article a:focus-visible img {
    transform: scale(1.03);
    filter: saturate(1.04);
}

#contact {
    background:
        radial-gradient(circle at top right, rgba(159, 191, 170, 0.12), transparent 25%),
        linear-gradient(180deg, rgba(248, 247, 243, 0.96), rgba(244, 243, 239, 0.92));
    padding-bottom: 8rem;
}

#contact .content {
    width: min(58rem, calc(100% - 2rem));
    max-width: none;
}

#contact .box {
    border: 1px solid var(--surface-border);
    border-radius: 1.6rem;
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
}

input[type="text"],
input[type="email"],
textarea {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(37, 58, 51, 0.18);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: rgba(63, 106, 79, 0.45);
    box-shadow: 0 0 0 4px rgba(63, 106, 79, 0.12);
}

input[type="submit"] {
    background: linear-gradient(135deg, var(--brand-green) 0%, #628e69 100%);
    box-shadow: 0 14px 30px rgba(39, 82, 57, 0.22);
}

input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    background: linear-gradient(135deg, #2e5a3c 0%, #547e5c 100%);
}

.honeypot {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

#footer {
    padding: 1.75rem 1.5rem;
    background:
        linear-gradient(135deg, rgba(25, 43, 34, 0.97), rgba(44, 68, 52, 0.96));
    color: rgba(242, 239, 228, 0.72);
}

#footer .footer-copy {
    display: flex;
    align-items: center;
}

.footer-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 247, 221, 0.9);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(214, 177, 95, 0.95) !important;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media screen and (max-width: 1000px) {
    #header {
        padding-inline: 0.75rem;
    }

    #titulo-principal {
        font-size: var(--header-title-size);
    }

    .container-buttons {
        left: 0.75rem;
        gap: 0.55rem;
    }

    .container-buttons a,
    .expo-trigger {
        width: 2.8rem;
        height: 2.8rem;
    }
}

@media screen and (max-width: 736px) {
    :root {
        --header-height: 4.15rem;
    }

    #header {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: var(--header-height);
        height: var(--header-height);
        padding: 0 0.65rem;
        gap: 0;
        backdrop-filter: none;
    }

    body {
        padding-top: var(--header-height);
    }

    .titulo {
        width: 100%;
        flex: 1 1 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        overflow: hidden;
    }

    .titulo h1 {
        position: static !important;
        top: auto !important;
        left: auto !important;
        height: auto !important;
        width: auto !important;
        max-width: none;
        display: block !important;
        margin: 0 auto;
        line-height: 1 !important;
        transform: translateZ(0) scale(var(--mobile-title-scale, 1));
        transform-origin: center center;
        will-change: transform;
    }

    #titulo-principal {
        max-width: none;
        margin: 0 auto;
        padding: 0 0.2rem;
        font-size: clamp(1.08rem, 4.35vw, 1.38rem);
        text-align: center;
        white-space: nowrap !important;
        line-height: 1;
        letter-spacing: -0.052em;
    }

    .nav-toggle {
        display: inline-flex;
        position: fixed;
        top: auto;
        right: max(0.8rem, calc(env(safe-area-inset-right, 0px) + 0.8rem));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
        width: 2.65rem;
        height: 2.65rem;
        margin: 0;
        z-index: 10001;
        opacity: 0.98;
    }

    .titulonav {
        display: block !important;
        position: fixed;
        top: auto;
        right: max(0.75rem, calc(env(safe-area-inset-right, 0px) + 0.75rem));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 4.8rem);
        left: auto;
        z-index: 10000;
        width: min(18rem, calc(100vw - 1.5rem));
        max-height: min(26rem, calc(100dvh - 7rem));
        padding: 0.9rem 1rem 1.1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(35, 55, 46, 0.12);
        border-radius: 1.25rem;
        box-shadow: var(--shadow-soft);
        text-align: left;
        overflow: auto;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(0.5rem) scale(0.98);
        transform-origin: bottom right;
        transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
    }

    body.nav-open .titulonav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    #header nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
    }

    #header nav ul li {
        display: block;
    }

    #header nav ul li a,
    #header .dropbtn {
        justify-content: space-between;
        width: 100%;
        min-height: 2.8rem;
        padding: 0.8rem 0.25rem;
        border-radius: 0.9rem;
        text-align: left;
    }

    #header .dropdown-content {
        position: static;
        display: none;
        min-width: 0;
        margin-top: 0.25rem;
        padding: 0.35rem 0.2rem 0.15rem 0.85rem;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    #header .dropdown.is-open .dropdown-content {
        display: block;
    }

    #header .dropdown-content a {
        min-height: 2.35rem;
        padding: 0.55rem 0.7rem;
        border-radius: 0.75rem;
        background: rgba(63, 106, 79, 0.06);
    }

    .container-buttons {
        position: absolute;
        left: 50%;
        top: 0.7rem;
        width: calc(100% - 1.5rem);
        justify-content: center;
        transform: translateX(-50%);
    }

    .container-buttons a,
    .expo-trigger {
        width: 2.65rem;
        height: 2.65rem;
        font-size: 1.55rem;
    }

    .container-buttons a {
        --social-roll-distance: 2.26em;
        --social-roll-duration: 0.74s;
    }

    .dropdown-vertical .dropdowncontent {
        position: fixed;
        top: calc(var(--header-height) + 4.85rem);
        left: 50%;
        width: min(19.5rem, calc(100vw - 1.5rem));
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.78rem;
        border-radius: 1.15rem;
        transform: translate(-50%, 0.6rem) scale(0.97);
        transform-origin: top center;
    }

    .dropdown-vertical .dropdowncontent a {
        min-width: 0;
        min-height: 2.75rem;
        padding: 0.7rem 0.72rem;
        font-size: 0.9rem;
    }

    #intro {
        background-position: 0 0, 42% center !important;
        padding-inline: 0;
    }

    #intro .content {
        max-width: calc(100% - 1.4rem);
        padding-inline: 0.4rem;
    }

    #one .content,
    #two .content,
    #one .content > header,
    #two .content > header,
    #work .content > header,
    #contact .content > header {
        text-align: left;
    }

    #one p,
    #two p,
    #work p,
    #contact p {
        font-size: 1.02rem;
        line-height: 1.68;
    }

    .enlace-logo {
        display: none;
    }

    #titulo-web {
        font-size: clamp(2.4rem, 13vw, 4rem);
    }

    #mecanografiado {
        max-width: 19rem;
        font-size: 1rem;
    }

    .box.style2 {
        border-radius: 1.3rem;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --header-height: 3.95rem;
    }

    #header {
        padding-inline: 0.45rem;
    }

    #titulo-principal {
        font-size: clamp(1rem, 4.5vw, 1.2rem);
        letter-spacing: -0.058em;
    }

    .nav-toggle {
        right: max(0.65rem, calc(env(safe-area-inset-right, 0px) + 0.65rem));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 0.85rem);
        width: 2.55rem;
        height: 2.55rem;
    }

    .titulonav {
        right: max(0.65rem, calc(env(safe-area-inset-right, 0px) + 0.65rem));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 4.45rem);
        width: min(16.75rem, calc(100vw - 1.3rem));
        max-height: min(24rem, calc(100dvh - 6.5rem));
    }

    .container-buttons {
        top: 0.6rem;
        gap: 0.45rem;
    }

    .container-buttons a,
    .expo-trigger {
        width: 2.45rem;
        height: 2.45rem;
        font-size: 1.4rem;
    }

    .container-buttons a {
        --social-roll-distance: 2.08em;
        --social-roll-duration: 0.68s;
    }

    .container-buttons .expo-trigger.icon-log_mujeryguardiacivil::before {
        font-size: 1rem;
    }

    .dropdown-vertical .dropdowncontent {
        top: calc(var(--header-height) + 4.5rem);
        width: min(18rem, calc(100vw - 1rem));
        padding: 0.68rem;
    }

    .dropdown-vertical .dropdowncontent a {
        min-height: 2.55rem;
        padding: 0.65rem 0.55rem;
        font-size: 0.86rem;
    }

    .enlace-logo { display: none; }

    #titulo-web {
        font-size: clamp(2.15rem, 12vw, 3.4rem);
    }

    #mecanografiado {
        max-width: 17rem;
    }

    #one p,
    #two p,
    #work p,
    #contact p {
        font-size: 0.98rem;
        line-height: 1.64;
    }

    .gallery {
        gap: 0.75rem;
    }

    .gallery article {
        width: 100%;
    }
}
