/* =========================
   Biología — ADN, plantas y fauna
   Fondo claro de tonos naturales (sin papel de cuaderno), banner
   ilustrado con doble hélice, hojas y siluetas de animales.
   ========================= */

:root {
    --bio-bg-top: #eafaf1;
    --bio-bg-bottom: #f8fbf8;
    --bio-ink: #1b4332;
    --bio-muted: #5b7869;
    --bio-leaf: #2d8a5f;
    --bio-leaf-light: #d8f3e3;
    --bio-sky: #3aa9c2;
    --bio-coral: #ef8a7f;
}

* {
    box-sizing: border-box;
}


/* ANIMACION DE ENTRADA: la naturaleza cobra vida */

@keyframes bioFade {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.bio-rung, .bio-fade {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: bioFade .45s ease forwards;
}

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

.bio-bird {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: bioFade .45s ease forwards, bioBob 2.6s ease-in-out infinite;
}

@keyframes bioFlutterL {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.55); }
}

@keyframes bioFlutterR {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.55); }
}

.bio-wing-l, .bio-wing-r {
    transform-box: fill-box;
}

.bio-wing-l {
    transform-origin: right center;
    animation: bioFlutterL 0.9s ease-in-out infinite;
}

.bio-wing-r {
    transform-origin: left center;
    animation: bioFlutterR 0.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .bio-rung, .bio-fade, .bio-bird {
        animation: none;
        opacity: 1;
    }
    .bio-wing-l, .bio-wing-r {
        animation: none;
    }
}

body.field {
    margin: 0;
    background: linear-gradient(180deg, var(--bio-bg-top), var(--bio-bg-bottom) 420px);
    color: var(--bio-ink);
    font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif;
}

a {
    color: var(--bio-leaf);
}

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


/* HOJAS DECORATIVAS FIJAS EN LAS ESQUINAS */

.field-corner {
    position: fixed;
    pointer-events: none;
    opacity: 0.10;
    z-index: 0;
}

.field-corner-tl { top: -40px; left: -40px; transform: rotate(20deg); }
.field-corner-br { bottom: -50px; right: -50px; transform: rotate(-10deg); }


/* BARRA SUPERIOR */

.field-topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;

    padding: 24px 40px;
}

.field-brand {
    text-decoration: none;
    color: var(--bio-ink);
    font-weight: 700;
}

.field-nav {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    gap: 18px;
}

.field-nav a {
    text-decoration: none;
    color: var(--bio-muted);
    font-size: 14px;
}

.field-nav a:hover {
    color: var(--bio-leaf);
}


/* BANNER ILUSTRADO */

.field-banner {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 0 24px;
    background: linear-gradient(135deg, #123524, #1b4d34 55%, #226b45);
    min-height: 300px;
    display: flex;
    align-items: center;
}

.field-banner-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.field-banner-text {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.field-banner-text h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 44px;
    font-weight: 600;
    color: #eafaf1;
    margin: 0 0 14px;
}

.field-banner-text p {
    margin: 0 auto;
    color: #cfe9da;
    font-size: 16px;
    line-height: 1.65;
    max-width: 480px;
}


/* CONTENIDO */

.field-main {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 28px 90px;
}

.field-main > * + * {
    margin-top: 44px;
}


/* BUSCADOR */

.field-search-form {
    margin-bottom: -4px;
}

.field-search {
    width: 100%;
    max-width: 420px;

    padding: 10px 18px;

    background-color: #fff;
    border: 1.5px solid var(--bio-leaf-light);
    border-radius: 24px;

    color: var(--bio-ink);
    font-family: "Work Sans", sans-serif;
    font-size: 15px;
}

.field-search::placeholder {
    color: var(--bio-muted);
}

.field-search:focus {
    outline: none;
    border-color: var(--bio-leaf);
}


/* SECCIONES */

.field-section-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    color: var(--bio-leaf);
    margin: 0 0 18px;
}

.field-cards {
    display: grid;
    gap: 16px;
}

.field-card {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;

    color: var(--bio-ink);
    border-left: 4px solid var(--bio-leaf);
    background-color: white;
    box-shadow: 0 1px 2px rgba(27, 67, 50, 0.06);
    padding: 16px 18px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.field-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(27, 67, 50, 0.12);
}

.field-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.field-card-icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
}

.field-card h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
}

.field-card p {
    margin: 0;
    color: var(--bio-muted);
    font-size: 14px;
}

.field-card-meta {
    display: inline-block;
    margin-top: 6px;
    color: var(--bio-coral);
    font-size: 13px;
    font-weight: 600;
}

.field-card-copy {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-left: auto;

    width: 28px;
    height: 28px;
    padding: 0;

    background-color: var(--bio-leaf-light);
    border: none;
    border-radius: 50%;

    color: var(--bio-leaf);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.field-card-copy:hover {
    background-color: var(--bio-leaf);
    color: white;
}

.field-empty {
    color: var(--bio-muted);
    font-size: 15px;
    font-style: italic;
}


@media (max-width: 640px) {

    .field-topbar {
        padding: 20px 20px;
    }

    .field-banner {
        margin: 0 16px;
        min-height: 260px;
    }

    .field-banner-text h1 {
        font-size: 32px;
    }

    .field-main {
        padding: 32px 20px 70px;
    }

}
