/*
Theme Name: MO Ciudadano
Theme URI: https://munigobcosta.com
Description: Tema minimalista y tecnológico para el Portal Ciudadano. Diseño limpio, mobile-first, con paleta sobria.
Author: Municipalidad Gobernador Costa
Author URI: https://munigobcosta.com
Template: twentytwentyfive
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mo-ciudadano
*/

/* =============================================================================
   CSS CUSTOM PROPERTIES - DESIGN TOKENS
   ============================================================================= */

:root {
    /* Paleta Principal - Sobria */
    --mo-black: #0a0a0a;
    --mo-gray-900: #171717;
    --mo-gray-800: #262626;
    --mo-gray-700: #404040;
    --mo-gray-600: #525252;
    --mo-gray-500: #737373;
    --mo-gray-400: #a3a3a3;
    --mo-gray-300: #d4d4d4;
    --mo-gray-200: #e5e5e5;
    --mo-gray-100: #f5f5f5;
    --mo-gray-50: #fafafa;
    --mo-white: #ffffff;

    /* Color de Acento - Azul Tecnológico */
    --mo-accent: #2563eb;
    --mo-accent-light: #3b82f6;
    --mo-accent-dark: #1d4ed8;
    --mo-accent-subtle: #eff6ff;

    /* Estados */
    --mo-success: #22c55e;
    --mo-success-light: #dcfce7;
    --mo-warning: #f59e0b;
    --mo-warning-light: #fef3c7;
    --mo-error: #ef4444;
    --mo-error-light: #fee2e2;

    /* Tipografía */
    --mo-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mo-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Espaciado */
    --mo-space-xs: 0.25rem;
    --mo-space-sm: 0.5rem;
    --mo-space-md: 1rem;
    --mo-space-lg: 1.5rem;
    --mo-space-xl: 2rem;
    --mo-space-2xl: 3rem;

    /* Bordes */
    --mo-radius-sm: 6px;
    --mo-radius-md: 10px;
    --mo-radius-lg: 16px;
    --mo-radius-full: 9999px;

    /* Sombras */
    --mo-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --mo-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --mo-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --mo-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transiciones */
    --mo-transition-fast: 150ms ease;
    --mo-transition-base: 200ms ease;
    --mo-transition-slow: 300ms ease;
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--mo-font-sans);
    color: var(--mo-gray-800);
    background-color: var(--mo-gray-50);
    line-height: 1.6;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--mo-gray-900);
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--mo-gray-600);
}

a {
    color: var(--mo-accent);
    text-decoration: none;
    transition: color var(--mo-transition-fast);
}

a:hover {
    color: var(--mo-accent-dark);
}

/* =============================================================================
   BUTTONS - GLOBAL STYLES
   ============================================================================= */

.wp-block-button__link,
.wp-element-button,
button,
input[type="submit"],
input[type="button"] {
    font-family: var(--mo-font-sans);
    font-weight: 500;
    border-radius: var(--mo-radius-md) !important;
    padding: 0.875rem 1.75rem;
    transition: all var(--mo-transition-base);
    border: none;
    cursor: pointer;
}

/* Primary Button */
.wp-block-button__link,
.wp-element-button,
input[type="submit"] {
    background: var(--mo-gray-900) !important;
    color: var(--mo-white) !important;
    box-shadow: var(--mo-shadow-sm);
}

.wp-block-button__link:hover,
.wp-element-button:hover,
input[type="submit"]:hover {
    background: var(--mo-black) !important;
    box-shadow: var(--mo-shadow-md);
    transform: translateY(-1px);
}

/* Accent Button */
.wp-block-button.is-style-fill .wp-block-button__link,
.mo-btn-accent {
    background: var(--mo-accent) !important;
    color: var(--mo-white) !important;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover,
.mo-btn-accent:hover {
    background: var(--mo-accent-dark) !important;
}

/* Outline Button */
.wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    color: var(--mo-gray-900) !important;
    border: 2px solid var(--mo-gray-300) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    border-color: var(--mo-gray-900) !important;
    background: var(--mo-gray-50) !important;
}

/* =============================================================================
   FORMS - GLOBAL STYLES
   ============================================================================= */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="search"],
select,
textarea {
    font-family: var(--mo-font-sans);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mo-gray-300);
    border-radius: var(--mo-radius-sm);
    background: var(--mo-white);
    color: var(--mo-gray-900);
    transition: all var(--mo-transition-fast);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--mo-accent);
    box-shadow: 0 0 0 3px var(--mo-accent-subtle);
}

input::placeholder,
textarea::placeholder {
    color: var(--mo-gray-400);
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mo-gray-700);
    display: block;
    margin-bottom: var(--mo-space-xs);
}

/* =============================================================================
   CARDS
   ============================================================================= */

.mo-card {
    background: var(--mo-white);
    border-radius: var(--mo-radius-lg);
    box-shadow: var(--mo-shadow-md);
    padding: var(--mo-space-xl);
    transition: box-shadow var(--mo-transition-base);
}

.mo-card:hover {
    box-shadow: var(--mo-shadow-lg);
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.mo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--mo-space-md);
}

.mo-section {
    padding: var(--mo-space-2xl) 0;
}

/* =============================================================================
   HEADER CUSTOMIZATION
   ============================================================================= */

.wp-site-blocks header {
    background: var(--mo-white);
    border-bottom: 1px solid var(--mo-gray-200);
}

.wp-block-site-title a {
    color: var(--mo-gray-900) !important;
    font-weight: 700;
    text-decoration: none !important;
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.wp-block-navigation a {
    color: var(--mo-gray-700) !important;
    font-weight: 500;
    padding: var(--mo-space-sm) var(--mo-space-md);
    border-radius: var(--mo-radius-sm);
    transition: all var(--mo-transition-fast);
}

.wp-block-navigation a:hover {
    color: var(--mo-gray-900) !important;
    background: var(--mo-gray-100);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

footer.wp-block-template-part {
    background: var(--mo-gray-900);
    color: var(--mo-gray-400);
}

footer a {
    color: var(--mo-gray-300) !important;
}

footer a:hover {
    color: var(--mo-white) !important;
}

/* =============================================================================
   MOBILE FIRST - RESPONSIVE
   ============================================================================= */

/* Mobile Base (default) */
.wp-site-blocks {
    padding: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }

    .mo-container {
        padding: 0 var(--mo-space-lg);
    }
}

/* Desktop and up */
@media (min-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }

    .mo-container {
        padding: 0 var(--mo-space-xl);
    }
}

/* =============================================================================
   WORDPRESS BLOCK OVERRIDES
   ============================================================================= */

/* Cover Block */
.wp-block-cover {
    border-radius: var(--mo-radius-lg);
    overflow: hidden;
}

/* Group Block */
.wp-block-group {
    border-radius: var(--mo-radius-md);
}

/* Image Block */
.wp-block-image img {
    border-radius: var(--mo-radius-md);
}

/* Quote Block */
.wp-block-quote {
    border-left: 4px solid var(--mo-accent);
    padding-left: var(--mo-space-lg);
    font-style: italic;
    color: var(--mo-gray-600);
}

/* Separator */
.wp-block-separator {
    border-color: var(--mo-gray-200) !important;
}

/* =============================================================================
   HIDE WORDPRESS ADMIN BAR ON MOBILE
   ============================================================================= */

@media (max-width: 782px) {
    #wpadminbar {
        display: none !important;
    }

    html {
        margin-top: 0 !important;
    }
}

/* =============================================================================
   HIDE PAGE TITLES (visible in editor, hidden in frontend)
   ============================================================================= */

/* Hide default page title for pages */
body.page .wp-block-post-title,
body.page .entry-title,
body.page header.entry-header,
body.page .page-title {
    display: none !important;
}

/* Also hide for specific page templates */
.page-template-default .wp-block-post-title,
.page-template-default .entry-title {
    display: none !important;
}
