/*
Theme Name: Marcos Molina Tema
Theme URI: https://marcosmolina.com.mx
Author: Marcos Molina Alvarez
Author URI: https://marcosmolina.com.mx
Description: Tema personal para marcosmolina.com.mx — Instructor en Protección Civil, consultor y desarrollador.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marcosmolina-tema
Tags: dark-mode, light-mode, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Estilo base: ITCSS (Inverted Triangle CSS)
1. Settings — Design tokens (variables)
2. Tools — Mixins, functions
3. Generic — Reset, normalize
4. Elements — Bare HTML elements (h1, a, etc.)
5. Objects — Layout patterns
6. Components — UI components
7. Utilities — Helper classes
*/

/* ==========================================================================
   1. SETTINGS — Design Tokens
   ========================================================================== */
/* Tokens y tipografía se cargan via wp_enqueue_style en Assets.php */

/* ==========================================================================
   2. TOOLS — Mixins (placeholder)
   ========================================================================== */

/* ==========================================================================
   3. GENERIC — Reset
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ==========================================================================
   4. ELEMENTS — Bare HTML
   ========================================================================== */

body {
    font-family: var(--mm-font-primary);
    font-size: 1rem;
    font-weight: 400;
    color: var(--mm-text);
    background-color: var(--mm-bg-primary);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--mm-heading);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    line-height: 1.4;
}

a {
    color: var(--mm-accent);
    transition: color 0.2s ease;
}

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

code {
    font-family: var(--mm-font-mono);
    font-size: 0.875em;
    background: var(--mm-bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
}

pre {
    font-family: var(--mm-font-mono);
    font-size: 0.875rem;
    background: var(--mm-bg-elevated);
    padding: var(--mm-esp-md);
    border-radius: var(--mm-radio-card);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

blockquote {
    border-left: 3px solid var(--mm-accent);
    padding-left: var(--mm-esp-md);
    color: var(--mm-text-secondary);
    font-style: italic;
}

/* ==========================================================================
   5. OBJECTS — Layout
   ========================================================================== */

.mm-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--mm-esp-lg);
}

.mm-section {
    padding: var(--mm-esp-2xl) 0;
}

.mm-section--alt {
    background-color: var(--mm-bg-secondary);
}

.mm-flex {
    display: flex;
    flex-wrap: wrap;
}

.mm-grid {
    display: grid;
    gap: var(--mm-esp-lg);
}

/* ==========================================================================
   6. COMPONENTS
   ========================================================================== */

/* --- Buttons --- */
.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mm-esp-xs);
    padding: var(--mm-esp-sm) var(--mm-esp-lg);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--mm-radio-btn);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.mm-btn--primary {
    background-color: var(--mm-accent);
    color: var(--mm-bg-primary);
    border-color: var(--mm-accent);
}

.mm-btn--primary:hover {
    background-color: var(--mm-accent-hover);
    border-color: var(--mm-accent-hover);
    color: var(--mm-bg-primary);
}

.mm-btn--secondary {
    background-color: transparent;
    color: var(--mm-accent);
    border-color: var(--mm-accent);
}

.mm-btn--secondary:hover {
    background-color: rgba(17, 197, 217, 0.08);
    color: var(--mm-accent);
}

/* --- Cards --- */
.mm-card {
    background: var(--mm-bg-elevated);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radio-card);
    padding: var(--mm-esp-lg);
    box-shadow: 0 2px 8px var(--mm-shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px var(--mm-shadow-medium);
}

/* --- Inputs --- */
.mm-input {
    width: 100%;
    padding: var(--mm-esp-sm);
    font-size: 1rem;
    color: var(--mm-text);
    background-color: var(--mm-bg-elevated);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radio-input);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mm-input::placeholder {
    color: var(--mm-text-disabled);
}

.mm-input:focus {
    outline: none;
    border-color: var(--mm-accent);
    box-shadow: 0 0 0 3px rgba(17, 197, 217, 0.15);
}

/* --- Shortcode Fallback --- */
.mm-shortcode-fallback {
    padding: var(--mm-esp-xl);
    background: var(--mm-bg-elevated);
    border: 1px dashed var(--mm-border);
    border-radius: var(--mm-radio-card);
    text-align: center;
    color: var(--mm-text-secondary);
    font-size: 0.875rem;
}

/* --- Breadcrumbs --- */
.mm-breadcrumbs {
    padding: var(--mm-esp-md) 0;
    font-size: 0.875rem;
}

.mm-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mm-esp-xs);
    align-items: center;
}

.mm-breadcrumbs__item:not(:last-child)::after {
    content: '/';
    margin-left: var(--mm-esp-xs);
    color: var(--mm-text-disabled);
}

.mm-breadcrumbs__item a {
    color: var(--mm-text-secondary);
}

.mm-breadcrumbs__item a:hover {
    color: var(--mm-accent);
}

.mm-breadcrumbs__item--current {
    color: var(--mm-text);
}

/* ==========================================================================
   7. UTILITIES
   ========================================================================== */

.mm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mm-text-center {
    text-align: center;
}

.mm-text-accent {
    color: var(--mm-accent);
}

.mm-mt-xs { margin-top: var(--mm-esp-xs); }
.mm-mt-sm { margin-top: var(--mm-esp-sm); }
.mm-mt-md { margin-top: var(--mm-esp-md); }
.mm-mt-lg { margin-top: var(--mm-esp-lg); }
.mm-mt-xl { margin-top: var(--mm-esp-xl); }

.mm-mb-xs { margin-bottom: var(--mm-esp-xs); }
.mm-mb-sm { margin-bottom: var(--mm-esp-sm); }
.mm-mb-md { margin-bottom: var(--mm-esp-md); }
.mm-mb-lg { margin-bottom: var(--mm-esp-lg); }
.mm-mb-xl { margin-bottom: var(--mm-esp-xl); }
