/* ==========================================================================
   PERSINOVAA - BASE.CSS
   Reset, Tipografía Global y Clases de Utilidad
   Agencia: Web Total México
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET CSS Y CONFIGURACIÓN BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    /* Las variables se definirán en variables.css. Dejo fallbacks de seguridad */
    font-family: var(--font-primary, 'Inter', sans-serif);
    color: var(--text-main, #333333);
    background-color: var(--bg-main, #ffffff);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal indeseado */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. TIPOGRAFÍA GLOBAL
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-weight: 800; /* Peso premium/bold */
    color: var(--heading-color, #0a0a0a);
    line-height: 1.2;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted, #666666);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   3. CONTENEDORES Y ESTRUCTURA
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Margen de seguridad para móviles */
}

/* Contenedor relativo para posicionamiento interno */
.relative-container {
    position: relative;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. CLASES DE UTILIDAD (UTILITIES)
   -------------------------------------------------------------------------- */

/* ----- Espaciado Vertical (Padding) ----- */
.padding-y-sm { padding: 3rem 0; }
.padding-y-md { padding: 5rem 0; }
.padding-y-lg { padding: 8rem 0; }

/* ----- Márgenes (Margin) ----- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-3 { padding-top: 1.5rem; }

/* ----- Alineación y Estilo de Texto ----- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-bold { font-weight: 800; }
.text-sm { font-size: 0.875rem; }

/* ----- Colores de Texto ----- */
.text-white { color: #ffffff !important; }
.text-dark { color: var(--color-black, #0a0a0a) !important; }
.text-muted { color: var(--color-gray-dark, #6c757d) !important; }
.text-blue { color: var(--color-primary, #0056b3) !important; }
.text-blue-accent { color: var(--color-accent, #00a8ff) !important; }
.text-accent-yellow { color: #f5b041 !important; } /* Para las estrellas de reseñas */
.text-success { color: #2ecc71 !important; }

/* ----- Fondos (Backgrounds) ----- */
.bg-white { background-color: #ffffff; }
.bg-dark { background-color: var(--color-black, #0a0a0a); }
.bg-light { background-color: var(--color-light, #f8f9fa); }
.bg-gray { background-color: var(--color-gray-light, #e9ecef); }
.bg-blue { background-color: var(--color-primary, #0056b3); color: #ffffff; }

/* ----- Bordes y Sombras ----- */
.border-top { border-top: 1px solid var(--color-gray-light, #dee2e6); }
.border-top-blue { border-top: 4px solid var(--color-primary, #0056b3); }

.shadow-premium {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
}

.rounded-box {
    border-radius: 16px;
}

/* --------------------------------------------------------------------------
   5. COMPONENTES BASE GLOABLES
   -------------------------------------------------------------------------- */

/* Placeholders para imágenes mientras se cargan o se asignan los assets */
.image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-color: var(--color-gray-light, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Efecto esqueleto de carga para los placeholders */
.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: placeholderShimmer 2s infinite;
}

@keyframes placeholderShimmer {
    100% {
        left: 200%;
    }
}

/* --------------------------------------------------------------------------
   6. VISIBILIDAD RESPONSIVA
   -------------------------------------------------------------------------- */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Ajustes base para móviles */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    /* Reducción de espaciados en móviles para mejor experiencia de lectura */
    .padding-y-lg { padding: 4rem 0; }
    .padding-y-md { padding: 3rem 0; }
    
    html {
        font-size: 15px; /* Ligeramente más pequeño en móviles */
    }
}