/**
 * Recioil Theme - Estilos Personalizados
 * 
 * @package Recioil
 */

/* ============================================
   VARIABLES CSS ROOT
   ============================================ */
:root {
    /* Colores corporativos */
    --recioil-primary: #385152;
    --recioil-accent: #50A696;
    --recioil-white: #FFFFFF;
    --recioil-dark: #1C1C1C;
    
    /* Colores de fondo */
    --recioil-background-light: #FFFFFF;
    --recioil-background-dark: #171b1b;
    
    /* Colores de texto */
    --recioil-text-light: #1C1C1C;
    --recioil-text-dark: #FFFFFF;
}

/* ============================================
   CONTAINER
   ============================================ */
.container-content {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-content {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ============================================
   MATERIAL SYMBOLS
   ============================================ */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   TRANSICIONES GLOBALES
   ============================================ */
/* Transiciones solo para propiedades básicas, sin transform */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

button,
a,
input,
select,
textarea {
    transition-duration: 150ms;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* Compensar el espacio del header fixed (altura h-16 = 4rem) */
main {
    padding-top: 4rem; /* 64px - altura del header */
}

/* Resaltado en hover de los enlaces del menú */
header nav a {
    transition: color 0.2s ease;
}

header nav a:hover {
    color: var(--recioil-accent, #50A696);
}

/* Sombra cuando el header está en scroll */
header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Logo en header */
header img.logo {
    height: 2rem;
    width: auto;
    object-fit: contain;
}

/* Menú móvil */
#mobile-menu-toggle {
    transition: opacity 0.2s ease;
}

#mobile-menu-toggle:active {
    opacity: 0.7;
}

/* ============================================
   BOTONES
   ============================================ */
button {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ============================================
   ENLACES
   ============================================ */
a {
    text-decoration: none;
    transition: color 0.2s ease;
}

a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ============================================
   IMÁGENES
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Imágenes de fondo con aspect-ratio */
[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-overlay {
    position: relative;
    overflow: hidden;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(56, 81, 82, 0.7) 0%,
        rgba(80, 166, 150, 0.6) 50%,
        rgba(56, 81, 82, 0.8) 100%
    );
    z-index: 1;
}

.hero-overlay > * {
    position: relative;
    z-index: 2;
}

/* ============================================
   CARDS Y TARJETAS
   ============================================ */
/* Clase específica para cards con efecto hover */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-2px);
}

/* ============================================
   FORMULARIOS
   ============================================ */
input,
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(80, 166, 150, 0.1);
}

/* ============================================
   UTILIDADES
   ============================================ */
/* Ocultar scrollbar pero mantener funcionalidad */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Texto seleccionado */
::selection {
    background-color: rgba(80, 166, 150, 0.3);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(80, 166, 150, 0.3);
    color: inherit;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
/* Asegurar que las imágenes responsive funcionen */
@media (max-width: 640px) {
    .hero-section {
        min-height: 50vh !important;
    }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Ajustes adicionales para dark mode si es necesario */
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header,
    footer,
    button,
    .no-print {
        display: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* Mejorar contraste para accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible para teclado */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

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

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

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

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
/* Estilos específicos de WordPress se pueden añadir aquí si es necesario */

/* Alineación de imágenes de WordPress */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

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

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
/* Optimización de renderizado */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU acceleration para animaciones */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

