.googlenoads {
    google-auto-ads: ignore;
}
.ficha-header {
    position: relative;
    margin-bottom: 20px;
}
.header-top {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}
.comestibilidad-icon {
    width: 85px;
    height: 85px;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.toxica-crudo {
    background-color: #c10f20; 
    color: white; 
    font-size: 0.45rem; 
    padding: 3px 8px; 
    border-radius: 10px; 
    /*margin: 5px 0px -64px -64px;*/
    margin:5px 0px -100px -8px;
    font-weight: bold; 
    white-space: nowrap; 
    text-transform: uppercase; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    float: left;
}
.species-info {
    display: flex;
    flex-direction: column;
    margin-top: -10px;
}
.species-info h1 {
    margin: 0;
    font-size: 2.2em;
    line-height: 1.2;
}
.species-info .author {
    margin: 0;
    font-style: italic;
    color: #555;
}
.comestibilidad-label {
    /*padding: 8px 15px 8px 70px;*/
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    text-align: center;
    align-self: flex-start;
    font-weight: bold;
    margin-top: -35px;
    position: relative;
    z-index: 1;
    max-width: 500px;
}

/* --- Morfología Rápida --- */
.morfologia-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.morfologia-item {
    background-color: #fafffa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.morfologia-item img {        
    max-height: 49px;
    margin-bottom: 5px;
    object-fit: contain;
}

.morfologia-label {
    font-size: 0.8em;
    color: #555;    
}

.morfologia-value {
    font-size: 1em;
    color: #333;
}

.ficha-container {
    background-color: white;
    border: 1px solid #dcdcdc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.confusion-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.ficha-confusion {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.confusion-header-new {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px; /* Space between header and the rest */
}

.comestibilidad-icon-confusion {
    width: 70px;
    height: 70px;    
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.species-info-confusion {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.species-info-confusion .author-confusion {
    margin: 0;
    font-size: 4.2cqw;
    color: #555;
    font-weight: bold;
    white-space: nowrap;
}
.species-info-confusion h4 {
    margin: 2px 0 0 0;
    font-size: 5.1cqw;    
    margin-top: -5px;
}

.confusion-link {
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;    
    width: calc(49% - 20px);
    text-decoration: none;
    color: inherit;
    margin: 10px;
}

.confusion-link:hover .confusion-container {
    border-color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.comestibilidad-label-confusion {
    padding: 4px 8px 4px 50px;
    border-radius: 20px;
    color: white;
    text-align: center;
    align-self: flex-start;
    font-weight: bold;
    margin-top: -30px;
    position: relative;
    z-index: 1;
    max-width: 500px;
    font-size: 13px;
}

.confusion-texto {
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

.confusion-container {
    background-color: #fafffa;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    container-type: inline-size;
}

/* Estilos para las pesta�as */
.tabs-container {
    display: flex;
    border-bottom: 2px solid #63783b;
    margin-top: 20px;
}
.tab-button {
    background-color: #fafffa;
    border: 1px solid #63783b;
    border-bottom: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-size: 1em;
    font-weight: bold;
}
.tab-button.active {
    background-color: #63783b;
    border-bottom: 2px solid #63783b;
    position: relative;
    top: 2px;
    color: #fff
}
.tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #63783b;
    border-top: none;
    border-radius: 0 0 5px 5px;
}
.tab-content.active {
    display: block;
}
.frame3d {
    width: 100%;
    height: 500px;
    border: none;
}
.microscopia-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.microscopia-item {
    width: calc(33.333% - 10px);
    text-align: center;
}
.microscopia-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 5px;
}

/* --- Contenedor y Botón de Citas --- */
.citar-buttons-group {
    text-align: right;
    margin-bottom: 10px;
    margin-top: -10px;
}

.citar-buttons-group .btn-citar {
    margin-left: 5px;
}

.btn-citar {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #333;
    font-family: inherit;
}

.btn-citar:hover {
    background-color: #e0e0e0;
}

.btn-citar .fa-solid {
    margin-right: 6px;
    width: 1.2em; /* Para alinear mejor los iconos */
    text-align: center;
}

/* --- Modal de Citas --- */
/* Reutilizando y adaptando estilos de .gallery-modal */
.citation-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    color: #333;
}

.citation-modal-content h4 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.citation-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    background-color: #f9f9f9;
    resize: vertical;
}

.citation-modal-content .modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}
.citation-modal-content .modal-close:hover {
    color: #333;
}

/* --- Diseño Responsive --- */
@media (max-width: 900px) {
    .species-info h1 {
        font-size: 2.0em!important;
    }

/* Reducir botones de cita un 25% */
    .btn-citar {
        font-size: 0.7em !important;
        padding: 6px 9px !important;
    }
}

@media (max-width: 600px) {
    .species-info h1 {
        font-size: 1.3em!important;
        line-height: 1.1!important;
    }

    .confusion-link {
        width: calc(99% - 20px)!important;
    }

    /* Agrupar y reducir botones de cita un 50% */
    .citar-buttons-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 5px;
        margin-bottom: 18px!important;
    }

    .citar-buttons-group .btn-citar {
        margin-left: 0;
    }

    .btn-citar {
        font-size: 0.6em !important;
        padding: 4px 6px !important;
    }

    .btn-citar .fa-solid {
        margin-right: 4px;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-button {
        margin-right: 0;
        border-radius: 0px;
    }

    .tab-button.active {
        top: 0;
    }

    .microscopia-item {
        width: calc(50% - 10px);
    }
}
@media (max-width: 500px) {
.toxica-crudo {
    margin: 5px 0px 20px -8px !important;
}
}