/* Fundación San Pío — design system
   Palette from the foundation's logo: Capuchin habit brown (sayal),
   parchment ground, brand gold, logo teal. Type: Marcellus (display),
   Alegreya (body), Alegreya Sans (UI). */

:root {
    --pergamino: #FBF6EC;
    --pergamino-2: #F4EBDA;
    --sayal: #3A2D22;
    --sayal-oscuro: #2A2014;
    --piedra: #6E6154;
    --oro: #E7B041;
    --oro-tinta: #A26F14;
    --teal: #0F7180;
    --linea: #E2D6BF;
    --tarjeta: #FFFDF7;
    --font-display: 'Marcellus', Georgia, serif;
    --font-body: 'Alegreya', Georgia, serif;
    --font-ui: 'Alegreya Sans', Verdana, sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--sayal);
    background: var(--pergamino);
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--sayal);
    margin: 0;
    text-wrap: balance;
}

p {
    font-size: 18px;
    line-height: 1.65;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: 0.2s color, 0.2s border-color;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

.eyebrow {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 6px;
}

/* --- Navbar --- */
.navbar-sanpio {
    background: var(--pergamino);
    border-bottom: 1px solid var(--linea);
    padding: 0;
}

.navbar-sanpio .navbar-brand {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.15;
    color: var(--sayal);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.navbar-sanpio .navbar-brand:hover {
    color: var(--sayal);
}

.navbar-sanpio .navbar-brand img {
    height: 46px;
    width: 46px;
    border-radius: 50%;
}

.navbar-sanpio .nav-link {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--sayal) !important;
    padding: 18px 12px !important;
    border-bottom: 2px solid transparent;
}

.navbar-sanpio .nav-link:hover,
.navbar-sanpio .nav-link.active {
    border-bottom-color: var(--oro);
}

.navbar-sanpio .navbar-toggler {
    border-color: var(--linea);
}

.navbar-sanpio .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%233A2D22' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-sanpio .social-nav a {
    color: var(--piedra);
}

.navbar-sanpio .social-nav a:hover {
    color: var(--oro-tinta);
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--piedra);
    cursor: pointer;
    padding: 2px 6px;
    font-family: var(--font-ui);
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.lang-switcher button:hover {
    color: var(--oro-tinta);
}

.lang-switcher button.active {
    color: var(--sayal);
    font-weight: 700;
}

/* --- Hero --- */
.hero-sanpio {
    padding: 72px 0 64px;
}

.hero-sanpio h1 {
    font-size: clamp(38px, 5.4vw, 62px);
    line-height: 1.08;
    margin: 14px 0 10px;
}

.hero-sanpio h1 em {
    font-style: normal;
    color: var(--oro-tinta);
}

.hero-sanpio .cita {
    color: var(--piedra);
    font-style: italic;
    margin-bottom: 14px;
}

.hero-sanpio .lede {
    font-size: 20px;
    max-width: 34em;
    margin-bottom: 30px;
}

.hero-sanpio .arco {
    aspect-ratio: 4 / 5;
    max-width: 420px;
    margin-left: auto;
}

@media (max-width: 767px) {
    .hero-sanpio {
        padding: 48px 0;
    }

    .hero-sanpio .arco {
        margin: 36px auto 0;
        max-width: 340px;
    }
}

/* --- Arched duotone photo frame --- */
.arco {
    border-radius: 999px 999px 18px 18px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--oro), #8A5F19);
    border: 1px solid var(--linea);
    margin: 0;
}

.arco img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05) brightness(1.04);
    mix-blend-mode: multiply;
}

/* Duotone for flat (non-arched) photos: gallery grids, cards */
.duotono {
    background: linear-gradient(160deg, #F2D391, #C99B45);
    overflow: hidden;
}

.duotono img {
    filter: grayscale(1) contrast(1.02) brightness(1.1);
    mix-blend-mode: multiply;
}

/* --- Franciscan cord divider (three knots: the three vows) --- */
.cordon {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

.cordon svg {
    width: min(420px, 70vw);
    height: 26px;
    color: var(--oro-tinta);
    opacity: 0.85;
}

/* --- Sections --- */
.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--pergamino-2);
}

.section-title {
    font-size: clamp(28px, 3.4vw, 38px);
    margin: 4px 0 12px;
}

.section-intro {
    color: var(--piedra);
    max-width: 40em;
    margin-bottom: 36px;
}

/* --- Buttons --- */
.btn-sanpio {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--oro);
    color: var(--sayal-oscuro);
    border: 2px solid var(--oro);
    border-radius: 0;
    padding: 11px 26px;
    display: inline-block;
}

.btn-sanpio:hover {
    background: #F0BE58;
    border-color: #F0BE58;
    color: var(--sayal-oscuro);
}

.btn-linea-sanpio {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: transparent;
    color: var(--sayal);
    border: 2px solid var(--sayal);
    border-radius: 0;
    padding: 11px 26px;
    display: inline-block;
}

.btn-linea-sanpio:hover {
    border-color: var(--oro-tinta);
    color: var(--oro-tinta);
}

/* --- Obra / actividad cards --- */
.card-sanpio {
    background: var(--tarjeta);
    border: 1px solid var(--linea);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    transition: 0.2s box-shadow, 0.2s transform;
}

.card-sanpio:hover {
    box-shadow: 0 10px 28px rgba(58, 45, 34, 0.12);
    transform: translateY(-2px);
}

.card-sanpio .card-body {
    padding: 26px 28px;
}

.card-sanpio .card-title {
    font-size: 24px;
    color: var(--sayal);
    margin-bottom: 8px;
}

.card-sanpio .card-text {
    color: var(--piedra);
    font-size: 17px;
    line-height: 1.6;
}

.card-sanpio .lugar {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oro-tinta);
    margin-bottom: 4px;
}

.card-sanpio .card-link {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
}

.card-sanpio .card-link:hover {
    text-decoration: underline;
}

.card-sanpio .duotono {
    aspect-ratio: 16 / 9;
}

.card-sanpio .duotono img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Donation seals --- */
.dona-sello {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--oro);
    color: var(--sayal-oscuro);
    margin-bottom: 14px;
}

.dona-sello svg {
    width: 24px;
    height: 24px;
}

.dona h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.dona p {
    color: var(--piedra);
    font-size: 17px;
    margin: 0;
}

/* --- Gallery grid --- */
.gallery-grid .duotono {
    border-radius: 10px;
    border: 1px solid var(--linea);
}

.gallery-grid img {
    width: 100%;
    transition: 0.3s filter;
}

.gallery-grid .duotono:hover img {
    filter: grayscale(1) contrast(1.05) brightness(1.12);
}

.gallery-grid .caption {
    color: var(--piedra);
    font-size: 15px;
    margin: 6px 2px 0;
}

/* --- Team --- */
.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 999px 999px 60px 60px;
    border: 3px solid var(--oro);
    filter: grayscale(1) contrast(1.05);
}

.team-member h5 {
    font-size: 21px;
    margin-top: 16px;
}

.team-member .role {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--oro-tinta);
    margin-bottom: 8px;
}

.team-member .bio {
    color: var(--piedra);
    font-size: 16px;
}

/* --- Contact form --- */
.form-sanpio {
    background: var(--pergamino-2);
    border: 1px solid var(--linea);
    border-radius: 14px;
    padding: 36px;
    height: 100%;
}

.form-sanpio label {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sayal);
    margin-bottom: 6px;
}

.form-sanpio .form-control {
    font-family: var(--font-body);
    font-size: 17px;
    background: var(--tarjeta);
    border: 1px solid var(--linea);
    border-radius: 8px;
    color: var(--sayal);
    padding: 10px 12px;
}

.form-sanpio .form-control:focus {
    background: var(--tarjeta);
    border-color: var(--oro);
    box-shadow: 0 0 0 0.2rem rgba(231, 176, 65, 0.25);
    color: var(--sayal);
}

.map-sanpio {
    border: 1px solid var(--linea);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
}

/* --- Breadcrumb --- */
.breadcrumb {
    font-family: var(--font-ui);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal);
}

.breadcrumb .active {
    color: var(--piedra);
}

/* --- Footer --- */
.footer-sanpio {
    background: var(--sayal-oscuro);
    color: #D8CBB4;
    padding: 56px 0 32px;
    margin-top: 24px;
}

.footer-sanpio h3 {
    font-size: 19px;
    color: var(--oro);
    margin-bottom: 12px;
}

.footer-sanpio p,
.footer-sanpio li {
    list-style: none;
    font-size: 16px;
    line-height: 1.8;
    color: #D8CBB4;
}

.footer-sanpio a {
    color: #EFC15E;
}

.footer-sanpio a:hover {
    text-decoration: underline;
}

.footer-sanpio .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: var(--oro);
    color: var(--sayal-oscuro);
    margin: 0 6px;
    font-size: 16px;
}

.footer-sanpio .social-icons a:hover {
    background: #EFC15E;
    text-decoration: none;
}

.copy-right {
    color: #A99A88;
    font-size: 14px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #4A3A26;
}

/* --- Motion --- */
@media (prefers-reduced-motion: no-preference) {
    .hero-sanpio .hero-texto,
    .hero-sanpio .arco {
        animation: subir 0.7s ease-out both;
    }

    .hero-sanpio .arco {
        animation-delay: 0.12s;
    }

    @keyframes subir {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .section {
        padding: 48px 0;
    }

    .navbar-sanpio .nav-link {
        padding: 10px 12px !important;
    }

    .navbar-sanpio .navbar-extras {
        padding: 10px 12px;
    }
}
