/*
Theme Name: Twenty Twenty-Five PSOE
Template: twentytwentyfive
Description: Tema personalizado PSOE basado en Twenty Twenty-Five
Version: 1.2.0
Text Domain: twentytwentyfive-psoe
*/

/* COLORES PSOE COMO CUSTOM PROPERTIES */
:root {
    --wp--preset--color--psoe-red: #E53E3E;
    --wp--preset--color--psoe-dark-red: #C53030;
    --wp--preset--color--psoe-light-red: #FEB2B2;
    --wp--preset--color--institutional-gray: #2D3748;
    --wp--preset--color--institutional-blue: #1A365D;
    --wp--preset--color--light-background: #F7FAFC;
}

/* ======================================
   HEADER PREMIUM PSOE
   ====================================== */

.psoe-header-premium {
    background: linear-gradient(135deg, 
        var(--wp--preset--color--psoe-red) 0%, 
        var(--wp--preset--color--psoe-dark-red) 30%,
        var(--wp--preset--color--institutional-blue) 100%) !important;
    box-shadow: 0 8px 32px rgba(229, 62, 62, 0.2);
    position: relative;
    overflow: hidden;
}

/* Textura de fondo animada */
.psoe-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="psoe-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="0.8" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23psoe-pattern)"/></svg>');
    pointer-events: none;
    animation: headerFloat 20s ease-in-out infinite;
}

@keyframes headerFloat {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-2px) translateY(-1px); }
    50% { transform: translateX(2px) translateY(1px); }
    75% { transform: translateX(-1px) translateY(2px); }
}

/* BARRA SUPERIOR */
.psoe-top-bar {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 3;
}

.psoe-top-bar p {
    margin: 0 !important;
    opacity: 0.9;
}

.psoe-header-social .wp-block-social-link a {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.psoe-header-social .wp-block-social-link a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.1) translateY(-1px);
}

/* HEADER PRINCIPAL */
.psoe-main-header {
    position: relative;
    z-index: 2;
}

/* Logo principal mejorado */
.psoe-logo-main img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.psoe-logo-main img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Título del sitio espectacular */
.psoe-site-title a {
    color: white !important;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
    transition: all 0.4s ease;
    display: inline-block;
}

.psoe-site-title a:hover {
    transform: translateY(-2px) scale(1.02);
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 16px 32px rgba(0, 0, 0, 0.2);
}

/* Tagline mejorado */
.psoe-tagline {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

/* NAVEGACIÓN CENTRADA PREMIUM */
.psoe-nav-centered {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.75rem 2rem !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

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

.psoe-nav-centered:hover::before {
    left: 100%;
}

.psoe-nav-centered .wp-block-navigation-item a {
    color: white !important;
    font-weight: 600;
    text-decoration: none !important;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.psoe-nav-centered .wp-block-navigation-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.psoe-nav-centered .wp-block-navigation-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white !important;
}

.psoe-nav-centered .wp-block-navigation-item a:hover::before {
    left: 0;
}

/* LÍNEA DECORATIVA ANIMADA */
.psoe-header-divider {
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--wp--preset--color--psoe-red) 25%,
        var(--wp--preset--color--institutional-blue) 50%,
        var(--wp--preset--color--psoe-red) 75%,
        transparent 100%);
    position: relative;
    overflow: hidden;
}

.psoe-header-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ======================================
   FOOTER PREMIUM PSOE
   ====================================== */

.psoe-footer-premium {
    background: linear-gradient(135deg, 
        var(--wp--preset--color--institutional-gray) 0%,
        #1a202c 50%,
        #0f1419 100%) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

/* Textura de fondo footer */
.psoe-footer-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(229, 62, 62, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(26, 54, 93, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><polygon points="15,0 30,15 15,30 0,15" fill="none" stroke="white" stroke-width="0.3" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>');
    pointer-events: none;
}

/* Línea decorativa superior footer */
.psoe-footer-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--wp--preset--color--psoe-red) 0%,
        var(--wp--preset--color--institutional-blue) 25%,
        var(--wp--preset--color--psoe-red) 50%,
        var(--wp--preset--color--institutional-blue) 75%,
        var(--wp--preset--color--psoe-red) 100%);
    animation: gradientShift 4s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* SECCIÓN PRINCIPAL FOOTER */
.psoe-footer-main-section {
    position: relative;
    z-index: 2;
}

/* Logo footer mejorado */
.psoe-footer-logo img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.psoe-footer-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

/* Títulos footer con efectos */
.psoe-footer-heading {
    position: relative;
    padding-bottom: 1rem;
}

.psoe-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--wp--preset--color--psoe-red),
        var(--wp--preset--color--psoe-light-red));
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.3);
}

/* Enlaces footer mejorados */
.psoe-footer-links {
    list-style: none;
    padding: 0;
}

.psoe-footer-links li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0;
}

.psoe-footer-links a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 0.25rem 0;
}

.psoe-footer-links a::before {
    content: '▶';
    position: absolute;
    left: -25px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--wp--preset--color--psoe-red);
    font-size: 0.8em;
    transform: translateX(-5px);
}

.psoe-footer-links a:hover {
    color: var(--wp--preset--color--psoe-light-red) !important;
    transform: translateX(8px);
    text-shadow: 0 0 8px rgba(254, 178, 178, 0.5);
}

.psoe-footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* SECCIÓN DE CONTACTO */
.psoe-footer-contact {
    background: rgba(0, 0, 0, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* REDES SOCIALES PREMIUM */
.psoe-social-premium .wp-block-social-link a {
    background: var(--wp--preset--color--psoe-red) !important;
    border-radius: 50%;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.psoe-social-premium .wp-block-social-link a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.psoe-social-premium .wp-block-social-link a:hover {
    transform: translateY(-4px) scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.5);
    background: linear-gradient(135deg, 
        var(--wp--preset--color--psoe-red), 
        var(--wp--preset--color--psoe-dark-red)) !important;
}

.psoe-social-premium .wp-block-social-link a:hover::before {
    left: 100%;
}

/* COPYRIGHT PREMIUM */
.psoe-copyright-premium {
    background: var(--wp--preset--color--contrast) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.psoe-copyright-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        var(--wp--preset--color--psoe-red),
        var(--wp--preset--color--institutional-blue),
        var(--wp--preset--color--psoe-red),
        transparent);
}

.psoe-copyright-premium a {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.psoe-copyright-premium a:hover {
    color: var(--wp--preset--color--psoe-light-red) !important;
    text-shadow: 0 0 5px rgba(254, 178, 178, 0.5);
}

/* ======================================
   ESTILOS GENERALES MEJORADOS
   ====================================== */

/* Botones PSOE mejorados */
.wp-block-button .wp-block-button__link {
    background: linear-gradient(135deg, 
        var(--wp--preset--color--psoe-red), 
        var(--wp--preset--color--psoe-dark-red)) !important;
    color: white !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
    position: relative;
    overflow: hidden;
}

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

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

.wp-block-button .wp-block-button__link:hover::before {
    left: 100%;
}

/* Títulos mejorados */
h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", sans-serif !important;
}

h3 {
    color: var(--wp--preset--color--psoe-red) !important;
    position: relative;
}

/* Enlaces generales mejorados */
a {
    color: var(--wp--preset--color--psoe-red) !important;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--wp--preset--color--psoe-dark-red) !important;
    text-shadow: 0 0 5px rgba(229, 62, 62, 0.3);
}

/* ======================================
   RESPONSIVE DESIGN MEJORADO
   ====================================== */

@media (max-width: 768px) {
    /* Header mobile */
    .psoe-header-premium {
        text-align: center;
    }
    
    .psoe-top-bar .wp-block-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .psoe-site-title a {
        font-size: 1.8rem !important;
    }
    
    .psoe-nav-centered {
        margin: 1rem !important;
        padding: 1rem !important;
        border-radius: 15px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .psoe-nav-centered .wp-block-navigation-item a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: white !important;
    }
    
    /* Footer mobile */
    .psoe-footer-premium .wp-block-columns {
        flex-direction: column;
        gap: 2rem;
    }
    
    .psoe-footer-contact .wp-block-group {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .psoe-social-premium {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .psoe-copyright-premium .wp-block-group {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .psoe-site-title a {
        font-size: 1.5rem !important;
    }
    
    .psoe-tagline {
        font-size: 0.8rem !important;
    }
    
    .psoe-footer-premium .wp-block-columns {
        gap: 1.5rem;
    }
    
    .psoe-social-premium .wp-block-social-link a {
        width: 40px;
        height: 40px;
    }
}

/* ======================================
   ANIMACIONES ADICIONALES
   ====================================== */

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

.psoe-footer-premium .wp-block-column {
    animation: fadeInUp 0.6s ease-out;
}

.psoe-footer-premium .wp-block-column:nth-child(1) { animation-delay: 0.1s; }
.psoe-footer-premium .wp-block-column:nth-child(2) { animation-delay: 0.2s; }
.psoe-footer-premium .wp-block-column:nth-child(3) { animation-delay: 0.3s; }
.psoe-footer-premium .wp-block-column:nth-child(4) { animation-delay: 0.4s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}