* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== ESTILOS GENERALES ==================== */

body {
    font-family: Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.container {
    width: min(1200px, 95%);
    margin: 3rem auto;
}

h2 {
    text-align: center;
    color: #999;
    margin-bottom: 1.5rem;
    font-weight: 300;
    font-size: calc(1.5rem + 2vw);
}

p {
    text-align: center;
    color: #555;
    margin: 0 auto 3rem auto;
    font-weight: 300;
    width: min(600px, 80%);
}

p > a{
    color:#111;
}

p > a:hover{
    color:#000;
    text-decoration: none;
}

/* ==================== NAVEGACIÓN ==================== */

nav {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background-color: #f8f9fa;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

nav h1 {
    line-height: 2rem;
    background:transparent url('ave.svg') 0 0.4rem no-repeat;
    background-size:1rem auto;
    padding-left: 1.5rem;
    font-size: 1rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #e9ecef;
}

nav ul li a.active {
    background-color: #f5f5f5;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
}


/* ==================== GRID DE AVES ==================== */

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-item {
    background: white;
    border-radius: 5px;
    padding: 0.75rem;
    font-size: 1.5rem;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor:crosshair;
}

.grid-item img {
    border-radius: 4px;
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.grid-item p {
    text-align: left;
    margin: 0;
    font-size: 0.85rem;
    text-wrap: balance;
}

.grid-item p em {
    color: #111;
    font-weight: bold;
    font-style: normal;
}

.grid-item small {
    display: block;
    font-size: 0.7rem;
}

/* ==================== FOOTER ==================== */
footer {
    padding: 2rem;
    padding-bottom:0;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

footer a {
    color: #666;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #333;
    text-decoration: underline;
}

/* ==================== RESPONSIVE ==================== */

/* Aves a lo ancho según la ventana del navegador */

@media (min-width: 576px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Navegación en pantallas que no son grandes */

@media (min-width: 992px) {
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    nav h1 {
        margin: 0;
    }

    nav ul {
        flex-direction: row;
        gap: 0.5rem;
    }

    nav ul li a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    nav ul li a {
        padding: 0.5rem 1rem;
    }
}