/**
 * Arte Viajero - Estilos Adicionales
 * 
 * @package ArteViajero
 */

/* ==========================================================================
   ANIMACIONES Y TRANSICIONES
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ==========================================================================
   MEJORAS PARA GUTENBERG
   ========================================================================== */

/* Bloques de WordPress */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-image img {
    border-radius: 8px;
}

.wp-block-gallery {
    margin: 2rem 0;
}

.wp-block-quote {
    border-left: 4px solid var(--color-cian);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-gris-oscuro);
}

.wp-block-pullquote {
    border-top: 4px solid var(--color-magenta);
    border-bottom: 4px solid var(--color-magenta);
    padding: 2rem 0;
    text-align: center;
}

.wp-block-button__link {
    background-color: var(--color-cian);
    color: var(--color-navy);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.wp-block-button__link:hover {
    background-color: var(--color-azul-electrico);
    color: var(--color-blanco);
    transform: translateY(-2px);
}

/* Alineaciones */
.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS DE PÁGINAS
   ========================================================================== */

/* Página de inicio - Hero */
.page-inicio .hero-section {
    position: relative;
    overflow: hidden;
}

.page-inicio .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

/* Cards hover effects */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

/* Galería - efectos hover mejorados */
.galeria-item {
    position: relative;
    cursor: pointer;
}

.galeria-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.galeria-item:hover::after {
    opacity: 1;
}

/* ==========================================================================
   FORMULARIOS - ESTILOS MEJORADOS
   ========================================================================== */

.form-control:hover {
    border-color: var(--color-cian);
}

.form-control:focus {
    border-color: var(--color-cian);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--color-magenta);
}

/* Estados del formulario */
.form-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.form-error {
    color: var(--color-magenta);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ==========================================================================
   LOADING Y ESTADOS
   ========================================================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-cian);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumbs a {
    color: var(--color-cian);
    margin: 0 0.5rem;
}

.breadcrumbs a:hover {
    color: var(--color-azul-electrico);
}

.breadcrumbs span {
    color: var(--color-gris-oscuro);
}

/* ==========================================================================
   TABLAS RESPONSIVAS
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gris-medio);
}

table th {
    background-color: var(--color-navy);
    color: var(--color-blanco);
    font-weight: 600;
}

table tr:hover {
    background-color: var(--color-gris-claro);
}

/* ==========================================================================
   BLOQUES DE CÓDIGO
   ========================================================================== */

code {
    background-color: var(--color-gris-claro);
    color: var(--color-magenta);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

pre {
    background-color: var(--color-navy);
    color: var(--color-blanco);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ==========================================================================
   BADGES Y TAGS
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
}

.badge-primary {
    background-color: var(--color-cian);
    color: var(--color-navy);
}

.badge-secondary {
    background-color: var(--color-magenta);
    color: var(--color-blanco);
}

/* ==========================================================================
   ALERTAS
   ========================================================================== */

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--color-cian);
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-error {
    background-color: #f8d7da;
    border-color: var(--color-magenta);
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

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

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ==========================================================================
   MEJORAS DE ACCESIBILIDAD
   ========================================================================== */

/* Focus visible mejorado */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-cian);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-navy);
    color: var(--color-blanco);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   IMPRESIÓN
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .btn,
    .form-group {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
