/*
Theme Name: Conexión Tecnológica
Theme URI: https://conexiontecnologica.com
Author: Conexión Tec Team
Author URI: https://conexiontecnologica.com
Description: Un tema moderno, elegante y fluido de alto rendimiento para portales de tecnología, noticias y podcasts. CSS compilado (sin CDN), pantalla de carga y navegación móvil optimizada.
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: conexion-tec
Tags: news, blog, technology, full-width, responsive-layout, dark-mode, custom-colors, custom-menu
*/

/*
 * Zoom global para pantallas grandes.
 *
 * IMPORTANTE: el zoom se aplica SOLO desde 1024 px. Cuando estaba activo en
 * móvil desplazaba el mapa de impactos táctiles respecto a lo que se veía
 * (el <header> es sticky), y por eso el botón de modo oscuro y la lupa
 * "no hacían nada" en el teléfono. En móvil el diseño ya es responsive y no
 * necesita escalado.
 */
@media (min-width: 1024px) {
    body {
        zoom: 1.12;
    }
}

@media (min-width: 1920px) {
    body {
        zoom: 1.18;
    }
}

@media (min-width: 2560px) {
    body {
        zoom: 1.25;
    }
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/*
 * Evita el desbordamiento horizontal: en móvil una sola sección ancha
 * provoca scroll lateral en toda la página y descuadra el header.
 */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.custom-logo {
    height: 2.75rem !important;
    width: auto !important;
    object-fit: contain;
}

@media (min-width: 640px) {
    .custom-logo {
        height: 3.5rem !important;
    }
}

@media (min-width: 1024px) {
    .custom-logo {
        height: 5rem !important;
        max-height: 5.5rem !important;
    }
}

/* Brand Color Palette (#b92241 & #3e7db3) */
:root {
    --color-brand: #b92241;
    --color-brand-hover: #9c1b35;
    --color-brand-blue: #3e7db3;
    --color-navy: #0f172a;
}

.bg-brand-blue {
    background-color: #3e7db3 !important;
}

.text-brand-blue {
    color: #3e7db3 !important;
}

.border-brand-blue {
    border-color: #3e7db3 !important;
}

.bg-pink-brand, .bg-brand {
    background-color: #b92241 !important;
}

.hover\:bg-pink-brand:hover, .hover\:bg-pink-600:hover {
    background-color: #9c1b35 !important;
}

.text-pink-brand, .text-pink-600, .text-pink-500, .text-brand {
    color: #b92241 !important;
}

.border-pink-brand, .border-pink-500, .border-pink-600 {
    border-color: #b92241 !important;
}

/* Utilities & Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.glass-panel-dark {
    background: rgba(15, 23, 42, 0.38) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5) !important;
}

.text-navy {
    color: #0f172a;
}

.bg-navy {
    background-color: #0f172a;
}

/*
 * Estabilidad de layout (CLS en PageSpeed).
 * Con width/height en el HTML, `height:auto` mantiene la proporción real y el
 * navegador puede reservar el hueco antes de descargar la imagen.
 */
img,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

/* Placeholder mientras la imagen carga: evita el "salto" en blanco. */
.ct-media {
    background-color: #e2e8f0;
}

.dark .ct-media {
    background-color: #1e293b;
}

/* Fachada del vídeo de YouTube (se sustituye por el iframe real al hacer clic) */
.ct-yt-facade {
    cursor: pointer;
    border: 0;
    padding: 0;
    display: block;
}

.ct-yt-facade__play {
    transition: transform .2s ease-out, background-color .2s ease-out;
}

.ct-yt-facade:hover .ct-yt-facade__play,
.ct-yt-facade:focus-visible .ct-yt-facade__play {
    transform: scale(1.08);
    background-color: #ff0000;
}

/* Foco visible y consistente para navegación por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b92241;
    outline-offset: 2px;
}

/* Clases de alineación que inserta el editor de WordPress */
.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption-text {
    font-size: .8125rem;
    color: #64748b;
    text-align: center;
    margin-top: .5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b92241;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
