/* Estilos específicos para la página de detalle de plantas */

/* Variables de colores según la propuesta de diseño */
:root {
    --color-primary: #2E7D32;    /* Verde principal */
    --color-secondary: #1565C0;  /* Azul */
    --color-accent: #795548;     /* Tono tierra */
    --color-light: #E8F5E9;      /* Verde claro */
    --color-dark: #1B5E20;       /* Verde oscuro */
    --color-text: #212121;       /* Texto principal */
    --color-text-light: #757575; /* Texto secundario */
    --color-medicinal: #4CAF50;  /* Verde para plantas medicinales */
    --color-ornamental: #7E57C2; /* Púrpura para plantas ornamentales */
    --color-nativa: #FF9800;     /* Naranja para plantas nativas */
}

/* Estilos generales de la página */
.planta-detail {
    margin-bottom: 3rem;
}

.section-title {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
}

/* Estilos para imagen principal y galería */
.planta-image-container {
    position: relative;
}

.main-image-wrapper {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

.tipo-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.tipo-medicinal {
    background-color: var(--color-medicinal);
}

.tipo-ornamental {
    background-color: var(--color-ornamental);
}

.tipo-nativa {
    background-color: var(--color-nativa);
}

.thumbnail-gallery {
    margin-top: 1rem;
}

.thumbnail {
    display: block;
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail.active {
    border-color: var(--color-primary);
}

.thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    display: block;
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    transition: all 0.2s ease;
}

.video-thumbnail:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Estilos para información básica */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    border-bottom: none;
}

.card-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.info-group {
    margin-bottom: 1rem;
}

.info-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Estilos para compartir */
.share-section {
    margin-top: 1.5rem;
}

.share-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.social-buttons {
    display: flex;
    gap: 0.5rem;
}

.social-buttons .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para usos medicinales */
.uso-item {
    display: flex;
    margin-bottom: 1.25rem;
}

.uso-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-right: 1rem;
}

.uso-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.uso-content p {
    margin-bottom: 0;
    color: var(--color-text-light);
}

/* Estilos para usos culturales */
.usos-list {
    padding-left: 1.25rem;
}

.usos-list li {
    margin-bottom: 0.75rem;
}

/* Estilos para cultivo y cuidados */
.cultivo-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.cultivo-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background-color: var(--color-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.cultivo-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--color-text-light);
}

.cultivo-info p {
    font-size: 1rem;
    margin-bottom: 0;
}

.cultivo-detalles {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Estilos para recetas medicinales */
.receta-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.receta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.receta-card .card-header {
    padding: 0.75rem 1rem;
}

.receta-card .card-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.receta-info h4 {
    font-size: 1rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.receta-info ul, .receta-info ol {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.receta-info li {
    margin-bottom: 0.25rem;
}

/* Estilos para plantas relacionadas */
.planta-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.planta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-img-wrapper {
    position: relative;
}

.planta-card .tipo-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

.planta-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

/* Estilos para comentarios */
.comentario-list {
    margin-bottom: 2rem;
}

.comentario-item {
    margin-bottom: 1.5rem;
}

.comentario-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comentario-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.comentario-meta h4 {
    font-size: 1rem;
    margin-bottom: 0;
}

.comentario-meta p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.comentario-body p {
    margin-bottom: 0;
}

.nuevo-comentario h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Estilos para sección de reporte */
.reporte-section .card {
    border-left: 4px solid var(--color-success);
}

.reporte-section h2 {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.reporte-section p {
    margin-bottom: 0;
}

/* Estilos para el chatbot */
.chatbot-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background: var(--color-primary);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h5 {
    margin-bottom: 0;
}

.chatbot-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 350px;
}

.chatbot-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
}

.bot-message {
    background-color: #f1f1f1;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background-color: var(--color-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
}

.chatbot-input input {
    flex-grow: 1;
    margin-right: 10px;
    border-radius: 20px;
}

.chatbot-input button {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Estilos responsivos */
@media (max-width: 991px) {
    .planta-info, .share-section {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    .chatbot-container {
        width: 100%;
        right: 0;
        bottom: 0;
        border-radius: 10px 10px 0 0;
    }

    .uso-item, .cultivo-item {
        flex-direction: column;
    }

    .uso-icon, .cultivo-icon {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .thumbnail-gallery .col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .comentario-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comentario-avatar {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

    .social-buttons {
        flex-wrap: wrap;
    }
}

/* Estilos para la página de detalle de aves */
.plant-detail-hero {
    background-color: var(--color-light);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.plant-detail-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.plant-detail-info {
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.plant-detail-title {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.plant-detail-scientific {
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.plant-detail-section {
    margin-bottom: 2rem;
}

.plant-detail-section h3 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
