/* ==========================================================================
   Urukais Klick - Guestbook Section CSS
   Estilos específicos para la sección de libro de visitas
   ========================================================================== */

/* --- Guestbook Section --- */
.guestbook-section {
    padding-block: 6rem;
    background: linear-gradient(135deg, #0a0a0a, #161616);
}

/* --- Guestbook Container --- */
.guestbook-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

/* --- Guestbook Form --- */
.guestbook-form-wrapper {
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guestbook-form .form-group {
    position: relative;
}

.guestbook-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #f8fafc;
    margin-block-end: 0.5rem;
}

.guestbook-form input,
.guestbook-form select,
.guestbook-form textarea {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #f8fafc;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.guestbook-form input:focus,
.guestbook-form select:focus,
.guestbook-form textarea:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.guestbook-form textarea {
    resize: vertical;
    min-height: 120px;
}

.guestbook-form .form-help {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-block-start: 0.25rem;
}

.guestbook-form i {
    position: absolute;
    inset-inline-start: 0.75rem;
    top: 2.5rem;
    color: #64748b;
    font-size: 0.875rem;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.guestbook-form input:focus + i,
.guestbook-form select:focus + i,
.guestbook-form textarea:focus + i {
    color: #ff6b00;
}

.guestbook-form .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.guestbook-form input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #ff6b00;
    margin-block-start: 0.125rem;
    flex-shrink: 0;
}

.guestbook-form .checkbox-group label {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-block-end: 0;
}

/* --- Messages Wall --- */
.guestbook-messages-wrapper {
    background: #161616;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
}

.guestbook-header {
    padding: 1.5rem;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.guestbook-header h3 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.guestbook-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.guestbook-filter .filter-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 32px;
    touch-action: manipulation;
}

.guestbook-filter .filter-btn:hover {
    border-color: rgba(255, 107, 0, 0.3);
    color: #ff6b00;
}

.guestbook-filter .filter-btn.active {
    background: #ff6b00;
    color: #f8fafc;
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.25);
}

/* --- Messages Container --- */
.guestbook-messages {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-messages::-webkit-scrollbar {
    width: 6px;
}

.guestbook-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.guestbook-messages::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 3px;
}

/* --- Message Item --- */
.guestbook-message {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.5s ease-out;
}

.guestbook-message:hover {
    border-color: rgba(255, 107, 0, 0.2);
    transform: translateY(-2px);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-block-end: 0.75rem;
    gap: 1rem;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b00, #ff8533);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-info h4 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
    line-height: 1.3;
}

.message-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.message-type {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 107, 0, 0.1);
    color: #ff6b00;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 50px;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.message-type.question {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.message-type.testimonial {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.message-date {
    font-size: 0.75rem;
    color: #64748b;
}

.message-content {
    color: #cbd5e1;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-block-end: 1rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.message-action {
    padding: 0.25rem 0.5rem;
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.message-action:hover {
    color: #ff6b00;
    border-color: rgba(255, 107, 0, 0.2);
}

.message-action.liked {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

/* --- Empty State --- */
.guestbook-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.guestbook-empty i {
    font-size: 3rem;
    margin-block-end: 1rem;
    color: #ff6b00;
    opacity: 0.5;
}

.guestbook-empty h4 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin-block-end: 0.75rem;
}

.guestbook-empty p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* --- Pagination --- */
.guestbook-pagination {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Animations --- */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- Mobile Optimizations --- */
@media (max-width: 1024px) {
    .guestbook-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .guestbook-form-wrapper {
        position: static;
        order: 2;
    }
    
    .guestbook-messages-wrapper {
        order: 1;
    }
    
    .guestbook-messages {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .guestbook-section {
        padding-block: 4rem;
    }
    
    .guestbook-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .guestbook-form-wrapper {
        padding: 1.5rem;
        order: 1;
        width: 100%;
    }
    
    .guestbook-messages-wrapper {
        order: 2;
        width: 100%;
    }
    
    .guestbook-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .guestbook-header h3 {
        text-align: center;
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 1.25rem;
        color: #ff6b00;
    }
    
    .guestbook-filter {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .guestbook-filter .filter-btn {
        flex: 1;
        min-width: 80px;
        min-height: 36px;
        font-size: 0.75rem;
        text-align: center;
    }
    
    .guestbook-messages {
        max-height: 350px;
        padding: 0.75rem;
    }
    
    .guestbook-message {
        padding: 1rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .message-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .message-info h4 {
        font-size: 0.875rem;
    }
    
    .message-content {
        font-size: 0.8125rem;
    }
    
    .guestbook-form input,
    .guestbook-form select,
    .guestbook-form textarea {
        padding: 0.625rem 0.875rem 0.625rem 2.25rem;
        font-size: 0.8125rem;
    }
    
    .guestbook-form i {
        top: 2.25rem;
        inset-inline-start: 0.625rem;
    }
}

@media (max-width: 480px) {
    .guestbook-form-wrapper {
        padding: 1.25rem;
    }
    
    .guestbook-messages {
        max-height: 300px;
        padding: 0.5rem;
    }
    
    .guestbook-message {
        padding: 0.75rem;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .message-info h4 {
        font-size: 0.8125rem;
    }
    
    .message-content {
        font-size: 0.75rem;
    }
    
    .guestbook-filter .filter-btn {
        font-size: 0.6875rem;
        padding: 0.3125rem 0.625rem;
    }
    
    .guestbook-form input,
    .guestbook-form select,
    .guestbook-form textarea {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.75rem;
    }
    
    .guestbook-form i {
        top: 2rem;
        inset-inline-start: 0.5rem;
    }
}

/* --- Touch Device Optimizations --- */
@media (hover: none) and (pointer: coarse) {
    .guestbook-filter .filter-btn {
        min-height: 44px;
    }
    
    .message-action {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }
    
    .guestbook-form input,
    .guestbook-form select,
    .guestbook-form textarea {
        min-height: 44px;
    }
}

/* --- Landscape Mode --- */
@media (max-height: 600px) and (orientation: landscape) {
    .guestbook-messages {
        max-height: 250px;
    }
    
    .guestbook-form-wrapper {
        position: static;
    }
    
    .guestbook-section {
        padding-block: 3rem;
    }
}
