/*
Theme Name: Form
Description: Un tema de WordPress ultraligero, mobile-first, con diseño blanco puro y toques de glassmorphism moderno inspirado en Apple.
Author: Tu Nombre
Version: 1.0.0
*/

:root {
    /* 🎨 CONFIGURACIÓN TIPO APPLE / MODERNO */
    --color-primary: #0066cc;       /* Azul estilo Apple link */
    --color-text-main: #1d1d1f;     /* Gris casi negro, muy legible */
    --color-text-muted: #86868b;    /* Gris claro para meta descripciones */
    --color-bg-page: #f5f5f7;       /* Gris ultraclaro de fondo base */
    --color-surface: rgba(255, 255, 255, 0.7); /* Blanco traslúcido para el glassmorphism */
    --color-white: #ffffff;
    
    /* 📝 Tipografía (SF Pro/System UI nativo para máximo rendimiento y look Apple) */
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* 📏 Espaciado, Dimensiones y Bordes */
    --spacing-sm: 0.8rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
    
    /* MODIFICACIÓN PARA PANTALLA COMPLETA */
    --container-width: 100%;        /* Cambiado a 100% para ocupar toda la pantalla */
    --border-radius-lg: 18px;       /* Curvas pronunciadas estilo Apple */
    
    /* ☁️ Sombras sutiles */
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* === RESET Y ESTILOS BASE (Mobile First) === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: var(--font-main); 
    color: var(--color-text-main); 
    background-color: var(--color-bg-page); 
    line-height: 1.5; 
    font-size: 17px; /* Tamaño de letra ligeramente mayor */
    -webkit-font-smoothing: antialiased; /* Suavizado de fuentes en Mac/iOS */
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
a { color: var(--color-primary); text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.7; }

/* === UTILIDADES Y ESTRUCTURA === */
.container { 
    width: 100%; 
    /* MODIFICACIÓN: Márgenes laterales dinámicos relativos al ancho de la pantalla (Viewport Width) */
    padding: 0 4vw; 
    margin: 0 auto; 
    max-width: var(--container-width); 
}

/* Cabecera Glassmorphism */
.site-header { 
    background: var(--color-surface); 
    padding: 1rem 0; 
    position: sticky; /* Se queda arriba al hacer scroll */
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(20px); /* El efecto de cristal/desenfoque de Apple */
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Para móvil */
}
.site-title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.site-title a { color: var(--color-text-main); }

/* Navegación Móvil y Botón Hamburguesa */
.menu-toggle {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}
.main-navigation { width: 100%; }
.main-navigation ul { 
    display: none; /* Oculto por defecto en móvil */
    list-style: none; 
    margin-top: var(--spacing-sm); 
    padding: 1rem 0; 
    flex-direction: column; 
    gap: 15px; 
    border-top: 1px solid rgba(0,0,0,0.05);
}
.main-navigation.toggled ul { display: flex; /* Se muestra al hacer clic por JS */ }
.main-navigation a { display: block; font-size: 0.95rem; color: var(--color-text-main); font-weight: 500; }

/* Contenido Principal */
.site-main { padding: var(--spacing-lg) 0; min-height: 70vh; }

.post-article { 
    margin-bottom: var(--spacing-lg); 
    background: var(--color-white); 
    padding: var(--spacing-lg); 
    border-radius: var(--border-radius-lg); 
    box-shadow: var(--shadow-soft); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.entry-title { 
    font-size: 1.8rem; 
    font-weight: 700; 
    letter-spacing: -0.03em; 
    margin-bottom: var(--spacing-sm); 
    line-height: 1.2;
}
.entry-title a { color: var(--color-text-main); }
.entry-thumbnail { margin-bottom: var(--spacing-md); overflow: hidden; border-radius: 14px; }

/* Limitar el ancho del texto para que no sea cansado de leer en monitores muy anchos */
.entry-content { 
    color: #333336; 
}

.entry-content p { margin-bottom: 1.2rem; }
.entry-content h2, .entry-content h3 { color: var(--color-text-main); margin-top: 2rem; margin-bottom: 1rem; font-weight: 600; letter-spacing: -0.02em; }

/* Comentarios y Formularios */
.comments-area { margin-top: 3rem; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 2rem; }
.comments-title { font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; }
.comment-list { list-style: none; padding: 0; margin-bottom: 2rem; }
.comment-list li { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); }
.comment-list .avatar { border-radius: 50%; float: left; margin-right: 1rem; width: 48px; height: 48px; }
.comment-body { overflow: hidden; font-size: 0.95rem; }
.comment-meta { margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--color-text-muted); }
.reply a { font-size: 0.85rem; font-weight: 600; }

input[type="text"], input[type="email"], input[type="url"], textarea { 
    width: 100%; padding: 0.8rem 1rem; margin-bottom: 1rem; 
    border: 1px solid rgba(0,0,0,0.1); border-radius: 10px; 
    font-family: var(--font-main); font-size: 1rem;
    background: #fafafa; transition: border-color 0.2s, background 0.2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--color-primary); background: var(--color-white); }
.submit-btn { 
    background: var(--color-primary); color: var(--color-white); border: none; 
    padding: 0.8rem 1.8rem; border-radius: 20px; font-weight: 600; 
    cursor: pointer; transition: opacity 0.2s; font-size: 0.95rem;
}
.submit-btn:hover { opacity: 0.8; }

/* Pie de Página */
.site-footer { 
    background: var(--color-bg-page); color: var(--color-text-muted); 
    padding: var(--spacing-lg) 0; text-align: center; font-size: 0.85rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Errores 404 */
.error-404 { text-align: center; padding: 4rem 1rem; }
.error-404 .entry-title { font-size: 4rem; margin-bottom: 0.5rem; }

/* === MEDIA QUERIES (Tablet & Desktop) === */
@media (min-width: 768px) {
    .site-header .container { flex-wrap: nowrap; }
    .menu-toggle { display: none; /* Ocultar botón en escritorio */ }
    .main-navigation { width: auto; }
    .main-navigation ul { 
        display: flex; /* Siempre visible */
        margin-top: 0; padding: 0; flex-direction: row; gap: 2rem; border-top: none; 
    }
    .entry-title { font-size: 2.4rem; }
    .post-article { padding: 3.5rem; }
}