/* ============================================= */
/* COMENTARIOS ESTILO WHATSAPP - MODERNO */
/* ============================================= */

.comments-area {
    margin: 3rem auto;
    background: transparent;
    border-radius: 30px 30px 30px 30px;
    position: relative;
}

/* Fondo de patron sutil (como el de WhatsApp) */
.comments-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ccc" opacity="0.2"/></svg>');
    background-repeat: repeat;
    border-radius: 30px;
    pointer-events: none;
}

/* ============================================= */
/* FORMULARIO DE COMENTARIOS */
/* ============================================= */

.comment-respond {
    background: white;
    border-radius: 25px 25px 25px 25px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #075e54; /* Verde WhatsApp */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-reply-title::before {
    content: '💬';
    font-size: 1.8rem;
}

.comment-reply-title small {
    margin-left: auto;
}

#cancel-comment-reply-link {
    color: #ff4444;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    background: #ffeeee;
    transition: all 0.3s ease;
}

#cancel-comment-reply-link:hover {
    background: #ff4444;
    color: white;
}

/* ============================================= */
/* INFO DEL USUARIO LOGUEADO */
/* ============================================= */

.logged-in-as {
    background: #f0f2f5;
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #1f1f1f;
    border-left: 4px solid #25d366;
}

.logged-in-as a {
    color: #075e54;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.logged-in-as a:hover {
    color: #25d366;
    text-decoration: underline;
}

.required-field-message {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.required {
    color: #ff4444;
}

/* ============================================= */
/* CAMPO DE TEXTO - ESTILO WHATSAPP */
/* ============================================= */

.comment-form-comment {
    margin-bottom: 1.5rem;
}

.comment-form-comment label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

.comment-form-comment label::before {
    content: '✏️ ';
    opacity: 0.7;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    line-height: 1.5;
    resize: vertical;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%);
    color: lightgray;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    font-family: 'ubuntu-bold';
    height: 7em;
    overflow: hidden;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: #25d366;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1);
}

.comment-form-comment textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* ============================================= */
/* BOTÓN DE ENVÍO - ESTILO WHATSAPP */
/* ============================================= */

.form-submit {
    margin-top: 2rem;
    text-align: right;
}

#submit {
    background: #25d366;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#submit::after {
    content: '📤';
    font-size: 1.2rem;
}

#submit:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

#submit:active {
    transform: translateY(0);
}

/* ============================================= */
/* LISTA DE COMENTARIOS EXISTENTES (si los hay) */
/* ============================================= */

.comment-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.comment {
    background: white;
    border-radius: 20px;
    margin-bottom: 1rem;
    padding: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-left: 4px solid #25d366;
    position: relative;
}

.comment.depth-2 {
    margin-left: 2rem;
}

.comment.depth-3 {
    margin-left: 4rem;
    border-left-color: #075e54;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.comment-author img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #25d366;
}

.comment-author b {
    color: #1f1f1f;
    font-weight: 600;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
}

.comment-metadata a {
    color: #999;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #25d366;
}

.comment-content {
    color: #1f1f1f;
    line-height: 1.6;
    border-radius: 15px;
    margin-bottom: 1em;
}

.reply {
    text-align: right;
}

.reply a {
    color: #25d366;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(37, 211, 102, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reply a::before {
    content: '↩️';
}

.reply a:hover {
    background: #25d366;
    color: white;
}

/* ============================================= */
/* PAGINACIÓN DE COMENTARIOS */
/* ============================================= */

.comments-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0;
}

.comments-pagination a,
.comments-pagination span {
    padding: 8px 15px;
    border-radius: 20px;
    background: white;
    color: #1f1f1f;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.comments-pagination a:hover,
.comments-pagination .current {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

/* ============================================= */
/* AJUSTES RESPONSIVOS */
/* ============================================= */

@media (max-width: 768px) {
    .comments-area {
        padding: 1.5rem;
        margin: 2rem 1rem;
        border-radius: 20px;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
    
    .comment.depth-2,
    .comment.depth-3 {
        margin-left: 1rem;
    }
    
    #submit {
        width: 100%;
        justify-content: center;
    }
    
    .comment-reply-title {
        font-size: 1.3rem;
        flex-wrap: wrap;
    }
    
    .comment-reply-title small {
        margin-left: 0;
        width: 100%;
    }
    
    #cancel-comment-reply-link {
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .comments-area {
        padding: 1rem;
    }
    
    .comment-respond {
        padding: 1rem;
    }
    
    .comment-author {
        flex-wrap: wrap;
    }
    
    .comment-author img.avatar {
        width: 30px;
        height: 30px;
    }
    
    .comment.depth-2,
    .comment.depth-3 {
        margin-left: 0.5rem;
    }
    
    #submit {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================= */
/* ANIMACIONES */
/* ============================================= */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-respond,
.comment-respond, .comment-respond, .comment {
    border-radius: 1em;
    margin-bottom: 1rem;
    padding: 1.2rem;
    box-shadow: 4px 6px 5px rgb(255 255 255 / 3%);
    border: 1px solid gray;
    position: relative;
    margin-top: 1em;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%);
    list-style: none;
}

.comment {
    animation-delay: calc(var(--comment-index, 0) * 0.1s);
}

/* ============================================= */
/* ESTILOS ADICIONALES TIPO WHATSAPP */
/* ============================================= */

/* Burbujas de comentario como WhatsApp */
.comment-content p {
    position: relative;
    background: #f0f2f5;
    padding: 10px 15px;
    border-radius: 20px 20px 20px 5px;
    margin: 5px 0;
}

.comment.depth-2 .comment-content p {
    background: #e8f4fe;
    border-radius: 20px 20px 5px 20px;
}

/* Checkmark de enviado (opcional) */
#submit.success {
    background: #128C7E;
}

#submit.success::after {
    content: '✓';
    font-size: 1.2rem;
}

/* Efecto de typing (opcional) */
@keyframes typing {
    0% { content: '⏺️'; }
    33% { content: '⏺️⏺️'; }
    66% { content: '⏺️⏺️⏺️'; }
    100% { content: '⏺️'; }
}


/* ============================================= */
/* GALERÍA MODERNA - SLIDER DARK THEME */
/* 100% CSS Propio - Sin dependencias externas */
/* ============================================= */

/* Contenedor principal del slider */
.modern-gallery-slider {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
}

/* Slideshow */
.gallery-slideshow {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 1;
    display: block;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

/* Botones de navegación - Discretos */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gallery-nav:hover {
    background: #25d366;
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

/* Contador */
.gallery-counter {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 10;
    font-family: monospace;
}

/* Botón de autoplay */
.gallery-autoplay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gallery-autoplay:hover {
    background: #25d366;
    transform: scale(1.05);
}

.gallery-autoplay.active {
    background: #25d366;
}

/* Miniaturas */
.gallery-thumbnails {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.6;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.gallery-thumb.active {
    border-color: #25d366;
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================= */
/* LIGHTBOX PROPIO */
/* ============================================= */

.custom-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    visibility: hidden;
}

.custom-lightbox.active {
    background: rgba(0, 0, 0, 0.95);
    visibility: visible;
}

.custom-lightbox.closing {
    background: rgba(0, 0, 0, 0);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

.lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox-image-container img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

/* Botones del lightbox */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #ff4444;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: #25d366;
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    right: 80px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: monospace;
    backdrop-filter: blur(4px);
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* ============================================= */
/* SOPORTE PARA ALINEACIONES DE GALERÍA */
/* ============================================= */

/* Contenedor de la galería */
.wp-block-gallery.has-nested-images {
    clear: both;
    margin: 2rem auto;
}

/* Alineación a la izquierda */
.wp-block-gallery.has-nested-images.alignleft,
.wp-block-gallery.alignleft {
    float: left;
    margin: 0 2rem 1rem 0 !important;
    max-width: 45%;
}

/* Alineación a la derecha */
.wp-block-gallery.has-nested-images.alignright,
.wp-block-gallery.alignright {
    float: right;
    margin: 0 0 1rem 2rem !important;
    max-width: 45%;
}

/* Alineación al centro */
.wp-block-gallery.has-nested-images.aligncenter,
.wp-block-gallery.aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
}

/* Alineación ancha */
.wp-block-gallery.has-nested-images.alignwide,
.wp-block-gallery.alignwide {
    margin-left: -10vw;
    margin-right: -10vw;
    max-width: 120vw;
    width: auto;
}

/* Alineación completa */
.wp-block-gallery.has-nested-images.alignfull,
.wp-block-gallery.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
}

/* ============================================= */
/* RESPONSIVE */
/* ============================================= */

@media (max-width: 768px) {
    .modern-gallery-slider {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .gallery-nav.prev {
        left: 0.5rem;
    }
    
    .gallery-nav.next {
        right: 0.5rem;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 45px;
    }
    
    .gallery-thumbnails {
        gap: 0.5rem;
    }
    
    .lightbox-nav {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .lightbox-nav.prev {
        left: 10px;
    }
    
    .lightbox-nav.next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-counter {
        top: 10px;
        right: 60px;
        font-size: 0.7rem;
    }
    
    .lightbox-caption {
        bottom: -30px;
        font-size: 0.75rem;
    }
    
    /* Alineaciones laterales en móvil */
    .wp-block-gallery.has-nested-images.alignleft,
    .wp-block-gallery.has-nested-images.alignright,
    .wp-block-gallery.alignleft,
    .wp-block-gallery.alignright {
        float: none;
        margin: 1rem auto !important;
        max-width: 100%;
    }
    
    .wp-block-gallery.has-nested-images.alignwide,
    .wp-block-gallery.alignwide {
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    .wp-block-gallery.has-nested-images.alignfull,
    .wp-block-gallery.alignfull {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }
}

@media (max-width: 480px) {
    .gallery-thumb {
        width: 50px;
        height: 38px;
    }
    
    .gallery-nav {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .gallery-counter {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }
    
    .gallery-autoplay {
        bottom: 1rem;
        left: 1rem;
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}

/* ============================================= */
/* ANIMACIONES */
/* ============================================= */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-slide.active {
    animation: slideIn 0.5s ease-out;
}