
:root {
    --verde-oscuro: #123c2b;
    --verde: #16804b;
    --verde-claro: #e8f4ed;
    --fondo: #f5f8f5;
    --texto: #20352b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ENCABEZADO */

.site-header {
    background: var(--verde-oscuro);
    padding: 18px 0;
}

.site-header a {
    color: white;
    text-decoration: none;
}

.site-header nav a {
    font-size: 0.9rem;
    opacity: 0.88;
}

.site-header nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
}

/* PORTADA */

.hero {
    padding: 85px 0 75px;
    color: white;
    background:
        radial-gradient(circle at 85% 20%,
            rgba(117, 207, 140, 0.22), transparent 38%),
        linear-gradient(135deg, #123c2b, #176b43);
}

.hero .container {
    max-width: 1140px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.7px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    font-weight: 850;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero p {
    max-width: 660px;
    font-size: 1.08rem;
    line-height: 1.8;
    opacity: 0.9;
}

.hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.10);
    border-radius: 16px;
}

.hero-stat strong {
    font-size: 2rem;
}

.hero-stat span {
    font-size: 0.9rem;
}

/* CATÁLOGO */

.catalogo {
    padding-top: 65px;
    padding-bottom: 90px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 12px;
}

/* BUSCADOR */

.search-panel {
    background: white;
    border: 1px solid #e4ebe5;
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0 35px;
    box-shadow: 0 8px 28px rgba(18,60,43,0.04);
}

.search-panel .form-control {
    border-radius: 12px;
    border-color: #dce8df;
}

.search-panel .form-control:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 0.2rem rgba(22,128,75,0.12);
}

.search-count {
    font-size: 0.85rem;
    color: #66786d;
    margin: 12px 0 0;
}

/* TARJETAS */

.species-card {
    height: 100%;
    overflow: hidden;
    background: white;
    border: 1px solid #e6ece7;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(17,52,35,0.055);
    transition: transform 0.25s ease,
                box-shadow 0.25s ease;
}

.species-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(17,52,35,0.12);
}

.species-image {
    position: relative;
    height: 225px;
    background: #e6f0e7;
    overflow: hidden;
}

.species-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.species-card:hover .species-image img {
    transform: scale(1.05);
}

.species-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
}

.species-code {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    color: var(--verde-oscuro);
    border-radius: 30px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
}

.species-content {
    padding: 24px;
}

.species-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.scientific-name {
    color: #60766a;
    font-style: italic;
    font-size: 0.9rem;
    min-height: 22px;
}

.species-family {
    font-size: 0.82rem;
    color: #587064;
    margin: 16px 0;
}

.species-description {
    color: #5b6d61;
    line-height: 1.65;
    font-size: 0.9rem;
    min-height: 76px;
}

.btn-species {
    display: inline-block;
    margin-top: 12px;
    padding: 11px 19px;
    border-radius: 50px;
    background: var(--verde);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-species:hover {
    background: var(--verde-oscuro);
    color: white;
}

/* SIN RESULTADOS */

.empty-state {
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* FOOTER */

.site-footer {
    background: #103526;
    color: white;
    padding: 45px 0;
}

.site-footer strong {
    display: block;
    margin-bottom: 12px;
}

.site-footer small {
    opacity: 0.75;
}

/* RESPONSIVE */

@media (max-width: 768px) {

    .site-header {
        padding: 15px 0;
    }

    .site-header .container {
        justify-content: center !important;
        text-align: center;
    }

    .hero {
        padding: 55px 0;
    }

    .hero p {
        font-size: 0.98rem;
    }

    .catalogo {
        padding-top: 45px;
        padding-bottom: 60px;
    }

    .search-panel {
        padding: 18px;
    }

    .species-image {
        height: 210px;
    }

    .species-content {
        padding: 20px;
    }

    .species-description {
        min-height: auto;
    }
}
