/**
 * La Otra Prevención - Estilos principales
 * v1.0.0
 *
 * Estructura:
 * 1. Variables / Custom Properties
 * 2. Reset / Base
 * 3. Layout
 * 4. Header / Navbar
 * 5. Footer
 * 6. Componentes
 * 7. Home (front-page)
 * 8. Páginas genéricas / Sobre mí
 * 9. 404
 * 10. Responsive
 */

/* ──────────────────────────────────────────────
   1. VARIABLES
   ────────────────────────────────────────────── */

:root {
    /* ─ Marca ─ */
    --brand-yellow:       #F5C518;
    --brand-yellow-hover: #E0B200;
    --brand-yellow-tint:  #FFF8DC;
    --brand-dark:         #1A1A1A;
    --brand-dark-surface: #2C2C2C;
    --brand-dark-elevated:#3D3D3D;
    --brand-jet:          #121212;

    /* ─ Fondos ─ */
    --bg-primary:   #FFFFFF;
    --bg-secondary: #FAFAF8;
    --bg-tertiary:  #F2F2EF;

    /* ─ Texto ─ */
    --text-primary:   #1A1A1A;
    --text-secondary: #555555;
    --text-muted:     #999999;
    --text-inverse:   #FFFFFF;

    /* ─ Bordes ─ */
    --border-light:  #E8E8E5;
    --border-medium: #D0D0CD;

    /* ─ Semánticos ─ */
    --color-success: #2ecc40;
    --color-danger:  #e24b4a;
    --color-warning: #F5C518;

    /* ─ Tipografía ─ */
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:    'Courier New', Courier, monospace;

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

    /* ─ Radios ─ */
    --radius-sm:  4px;
    --radius-md:  6px;
    --radius-lg:  8px;
    --radius-xl:  12px;

    /* ─ Anchos ─ */
    --max-width:     1200px;
    --max-width-narrow: 800px;

    /* ─ Transiciones ─ */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}


/* ──────────────────────────────────────────────
   2. RESET / BASE
   ────────────────────────────────────────────── */

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

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

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

strong {
    font-weight: 700;
}


/* ──────────────────────────────────────────────
   3. LAYOUT
   ────────────────────────────────────────────── */

.site-main {
    min-height: 60vh;
}


/* ──────────────────────────────────────────────
   4. HEADER / NAVBAR
   ────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--brand-dark);
}

.navbar {
    border-bottom: 2px solid var(--brand-yellow);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 60px;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.navbar__name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-inverse);
    letter-spacing: -0.01em;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.navbar__menu li a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.navbar__menu li a:hover {
    color: var(--text-inverse);
}

.navbar__menu li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-yellow);
    transition: width var(--transition-base);
}

.navbar__menu li a:hover::after {
    width: 100%;
}

.navbar__cta {
    display: flex;
    align-items: center;
}

.navbar__cta li a {
    display: inline-block;
    padding: 0.45rem 1.25rem;
    background: var(--brand-yellow);
    color: var(--brand-dark);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.navbar__cta li a:hover {
    background: var(--brand-yellow-hover);
    transform: translateY(-1px);
}

/* ── Hamburguesa ── */

.navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar__toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-inverse);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

/* ── Mobile nav ── */

.navbar-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--brand-dark);
    z-index: 200;
    transition: right var(--transition-base);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.navbar-mobile.is-open {
    right: 0;
}

.navbar-mobile__inner {
    padding: var(--space-lg);
}

.navbar-mobile__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-xl);
}

.navbar-mobile__close {
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar-mobile__menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.navbar-mobile__menu li a {
    display: block;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--brand-dark-surface);
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.navbar-mobile__menu li a:hover {
    color: var(--brand-yellow);
    padding-left: var(--space-sm);
}


/* ──────────────────────────────────────────────
   5. FOOTER
   ────────────────────────────────────────────── */

.site-footer {
    background: var(--brand-dark);
    border-top: 2px solid var(--brand-yellow);
    padding: var(--space-2xl) 0;
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.site-footer__copy {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.site-footer__legal ul {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer__legal li a {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    transition: color var(--transition-fast);
}

.site-footer__legal li a:hover {
    color: var(--brand-yellow);
}


/* ──────────────────────────────────────────────
   6. COMPONENTES
   ────────────────────────────────────────────── */

/* ── Decorativo (línea amarilla) ── */
.decorative {
    width: 60px;
    height: 3px;
    background: var(--brand-yellow);
    margin-top: var(--space-lg);
    border-radius: 2px;
}

/* ── Botones genéricos ── */
.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--brand-yellow);
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background: var(--brand-yellow-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--brand-dark);
    color: var(--text-inverse);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--brand-dark-surface);
    transform: translateY(-2px);
}

/* ── Imagen estática ── */
.static-img {
    border-radius: var(--radius-xl);
}

/* ── Alineación de imagen ── */
.alignleft {
    float: left;
    margin: 0 var(--space-lg) var(--space-md) 0;
}

.alignright {
    float: right;
    margin: 0 0 var(--space-md) var(--space-lg);
}

.aligncenter {
    display: block;
    margin: 0 auto var(--space-md);
}


/* ──────────────────────────────────────────────
   7. HOME (front-page)
   ────────────────────────────────────────────── */

.site-main--home {
    background: var(--bg-primary);
}

.site-main--home h1 {
    text-align: center;
    margin: var(--space-2xl) auto var(--space-lg);
    position: relative;
}

.site-main--home h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--brand-yellow);
    margin: var(--space-sm) auto 0;
    border-radius: 2px;
}

#simon-sinek {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-3xl);
}

/* ── Fragmento (sección con texto + imagen) ── */
.smsn-fragment {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    padding: var(--space-2xl) 0;
}

.smsn-fragment.revert {
    flex-direction: row-reverse;
}

.smsn-text {
    flex: 1;
}

.smsn-text h2 {
    margin-bottom: var(--space-md);
    color: var(--brand-dark);
}

.cover-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.cover-text p {
    margin-bottom: 0.85rem;
}

.center-spacing {
    display: none;
}

.smsn-img {
    flex: 0 0 380px;
}

.smsn-img picture {
    display: block;
}

.smsn-img img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    object-fit: cover;
}


/* ──────────────────────────────────────────────
   8. PÁGINAS GENÉRICAS / SOBRE MÍ
   ────────────────────────────────────────────── */

/* ── Cabecera tipo blog ── */
.blogcover {
    background: var(--brand-dark);
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
}

.cover-fragment-blog h1 {
    color: var(--text-inverse);
    margin-bottom: var(--space-md);
}

.blogcover .decorative {
    margin: 0 auto;
}

/* ── Contenido post ── */
#post-display {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

#post-display::after {
    content: '';
    display: table;
    clear: both;
}

#post-display img {
    border-radius: var(--radius-xl);
}

/* ── Página genérica ── */
.site-main--page {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.page-title {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--brand-yellow);
}

.entry-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.entry-content a {
    color: var(--brand-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--brand-yellow);
    transition: border-color var(--transition-fast);
}

.entry-content a:hover {
    border-color: var(--brand-yellow-hover);
}

/* ── Servicio single ── */
.site-main--servicio {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.servicio-title {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--brand-yellow);
}


/* ──────────────────────────────────────────────
   9. PÁGINA 404
   ────────────────────────────────────────────── */

.error-404 {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 40px,
            rgba(26, 26, 26, 0.015) 40px,
            rgba(26, 26, 26, 0.015) 80px
        ),
        var(--bg-secondary);
}

.error-404__hazard-tape {
    width: 120%;
    margin-left: -10%;
    background: repeating-linear-gradient(
        -45deg,
        var(--brand-yellow),
        var(--brand-yellow) 20px,
        var(--brand-dark) 20px,
        var(--brand-dark) 40px
    );
    padding: 0.55rem 0;
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    overflow: hidden;
    transform: rotate(-1deg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.error-404__hazard-tape--bottom {
    transform: rotate(1deg);
}

.error-404__hazard-tape span {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--text-inverse);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
    animation: tape-scroll 12s linear infinite;
}

@keyframes tape-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.error-404__content {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    max-width: 600px;
    z-index: 1;
}

.error-404__sign {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
    animation: sign-wobble 3s ease-in-out infinite;
}

.error-404__triangle {
    width: 120px;
    height: auto;
}

@keyframes sign-wobble {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.error-404__code {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 900;
    color: var(--brand-dark);
    line-height: 1;
    margin: 0 0 0.25rem;
    letter-spacing: -0.03em;
    text-shadow: 3px 3px 0 var(--brand-yellow);
}

.error-404__title {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--brand-dark);
    font-weight: 700;
    margin: 0 0 var(--space-md);
}

.error-404__text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 var(--space-xl);
}

.error-404__checklist {
    background: var(--bg-primary);
    border: 2px solid var(--brand-yellow);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: var(--space-xl);
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.error-404__checklist-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brand-dark);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.error-404__checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-404__checklist li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 1px dashed var(--border-light);
}

.error-404__checklist li:last-child {
    border-bottom: none;
}

.error-404__check {
    color: var(--color-success);
    font-weight: 700;
    margin-right: 0.5rem;
}

.error-404__btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--brand-yellow);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background var(--transition-fast), transform var(--transition-fast);
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.3);
}

.error-404__btn:hover {
    background: var(--brand-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(224, 178, 0, 0.35);
}


/* ──────────────────────────────────────────────
   10. RESPONSIVE
   ────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* ── Navbar ── */
    .navbar__menu,
    .navbar__cta {
        display: none;
    }

    .navbar__toggle {
        display: flex;
    }

    /* ── Home fragments ── */
    .smsn-fragment,
    .smsn-fragment.revert {
        flex-direction: column;
        gap: var(--space-lg);
        padding: var(--space-xl) 0;
    }

    .smsn-img {
        flex: none;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

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

    .smsn-text .decorative {
        margin: var(--space-lg) auto 0;
    }

    /* ── Sobre mí ── */
    #post-display .alignleft {
        float: none;
        margin: 0 auto var(--space-lg);
        display: block;
    }

    /* ── 404 ── */
    .error-404__content {
        padding: var(--space-xl) var(--space-md);
    }

    .error-404__triangle {
        width: 90px;
    }

    .error-404__checklist {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {

    .navbar__inner {
        padding: 0 var(--space-md);
    }

    #simon-sinek {
        padding: 0 var(--space-md) var(--space-xl);
    }

    .site-main--home h1 {
        margin-top: var(--space-xl);
    }

    .blogcover {
        padding: var(--space-xl) var(--space-md);
    }

    .site-footer__legal ul {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
}
/* ──────────────────────────────────────────────
   RECURSOS / GRID DE SERVICIOS
   ────────────────────────────────────────────── */

.site-main--recursos {
    background: var(--bg-primary);
}

.recursos-listing {
    padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

.recursos-listing .section-padding {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-bottom: var(--space-lg);
}

.recursos-listing .center {
    text-align: center;
}

.grey-bg {
    background: var(--bg-tertiary);
}

/* ── Grid de tarjetas ── */
#blog-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.excerpt-post {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.excerpt-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.excerpt-post a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Imagen de la tarjeta ── */
.posts-picture {
    position: relative;
    width: 100%;
    height: 200px;
    background-position: center;
    background-size: cover;
    background-color: var(--bg-tertiary);
}

.masinfo-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: var(--text-inverse);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
}

.masinfo-text .secondary {
    color: var(--brand-yellow);
    font-weight: 700;
}

/* ── Texto de la tarjeta ── */
.posts-h2 {
    padding: var(--space-md) var(--space-md) var(--space-xs);
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--brand-dark);
}

.excerpt-post .entry {
    padding: 0 var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.excerpt-post .entry p {
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #blog-display {
        grid-template-columns: 1fr;
        padding: 0 var(--space-md);
    }
}
/* ══════════════════════════════════════════════
   PÁGINA DE LIBROS
   ══════════════════════════════════════════════ */
.site-main--libros {
    background: var(--bg-primary);
}

.site-main--libros .cg-section {
    max-width: var(--max-width-narrow, 860px);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.cg-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.cg-book {
    position: relative;
}

.cg-book a {
    display: block;
    text-decoration: none;
    border-bottom: none !important;
    transition: transform 0.3s ease;
}

.cg-book a:hover {
    transform: translateY(-6px);
}

.cg-book img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

.cg-book a:hover img {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.cg-book-title {
    display: block;
    margin-top: 0.8rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary, #1A1A1A);
    line-height: 1.3;
}

/* ── Badges ── */
.cg-book-badge {
    position: absolute;
    top: -8px;
    right: 10%;
    z-index: 2;
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cg-book-badge--nuevo {
    background: #2ecc40;
}

.cg-book-badge--destacado {
    background: #F5C518;
    color: #1A1A1A;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .cg-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 380px) {
    .cg-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .cg-book img {
        max-width: 150px;
    }
}

/* ══════════════════════════════════════════════
   SOBRE MÍ — MEJORAS + RRSS
   Pegar al final de main.css
   ══════════════════════════════════════════════ */

/* ── Tipografía mejorada ── */
.site-main--sobre-mi #post-display {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.site-main--sobre-mi #post-display p {
    margin-bottom: 1.2rem;
}

.site-main--sobre-mi #post-display strong {
    color: var(--text-primary);
}

/* Foto de perfil circular */
.site-main--sobre-mi #post-display .alignleft {
    border-radius: 50%;
    border: 4px solid var(--brand-yellow);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    shape-outside: circle(50%);
    margin: 0 2rem 1.5rem 0;
}

/* Primera línea destacada */
.site-main--sobre-mi #post-display > p:nth-of-type(2) {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   TARJETAS RRSS
   ══════════════════════════════════════════════ */
.sobremi-social {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-3xl);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sobremi-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-xl);
    text-decoration: none !important;
    border-bottom: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sobremi-card:hover {
    transform: translateY(-2px);
}

/* ── LinkedIn ── */
.sobremi-card--linkedin {
    background: linear-gradient(135deg, #0A66C2 0%, #004182 100%);
    box-shadow: 0 4px 16px rgba(10, 102, 194, 0.25);
}

.sobremi-card--linkedin:hover {
    box-shadow: 0 8px 28px rgba(10, 102, 194, 0.35);
}

/* ── TikTok ── */
.sobremi-card--tiktok {
    background: linear-gradient(135deg, #010101 0%, #1a1a1a 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.08);
}

.sobremi-card--tiktok:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

/* Glow sutil de TikTok */
.sobremi-card--tiktok::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #25F4EE, #FE2C55, #25F4EE);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ── Icono ── */
.sobremi-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sobremi-card__icon svg {
    display: block;
}

/* ── Texto ── */
.sobremi-card__body {
    flex: 1;
    min-width: 0;
}

.sobremi-card__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.1rem;
}

.sobremi-card__name {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.sobremi-card__sub {
    display: block;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Contador ── */
.sobremi-card__stat {
    flex-shrink: 0;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
}

.sobremi-card__count {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.sobremi-card__stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    margin-top: 0.15rem;
}

/* ── Flecha ── */
.sobremi-card__arrow {
    flex-shrink: 0;
    font-size: 1.3rem;
    color: rgba(255,255,255,0.4);
    transition: color 0.2s ease, transform 0.2s ease;
}

.sobremi-card:hover .sobremi-card__arrow {
    color: #fff;
    transform: translateX(3px);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .site-main--sobre-mi #post-display .alignleft {
        float: none;
        display: block;
        margin: 0 auto var(--space-lg);
        shape-outside: none;
        max-width: 220px;
    }

    .sobremi-social {
        padding: 0 var(--space-md) var(--space-2xl);
    }

    .sobremi-card {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 1.2rem;
    }

    .sobremi-card__body {
        flex: 1 1 calc(100% - 70px);
    }

    .sobremi-card__stat {
        margin-left: auto;
    }

    .sobremi-card__sub {
        white-space: normal;
    }

    .sobremi-card__arrow {
        display: none;
    }
}

@media (max-width: 400px) {
    .sobremi-card__count {
        font-size: 1.1rem;
    }

    .sobremi-card__name {
        font-size: 0.95rem;
    }
}
/* ──────────────────────────────────────────────
   CONTACTO
   ────────────────────────────────────────────── */

.site-main--contacto {
    background: var(--bg-primary);
}

/* ── Subtítulo en el cover ── */
.site-main--contacto .cover-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    margin-bottom: var(--space-sm);
}

/* ── Cuerpo ── */
.contacto-body {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

/* ── Tarjeta del formulario ── */
.contacto-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.contacto-card h2 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--brand-yellow);
}

/* ── Campos del formulario (CF7) ── */
.contacto-card input[type="text"],
.contacto-card input[type="email"],
.contacto-card textarea {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-bottom: var(--space-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contacto-card input[type="text"]:focus,
.contacto-card input[type="email"]:focus,
.contacto-card textarea:focus {
    outline: none;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15);
}

.contacto-card textarea {
    min-height: 160px;
    resize: vertical;
}

/* ── Botón enviar ── */
.contacto-card input[type="submit"],
.contacto-card .wpcf7-submit {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--brand-yellow);
    color: var(--brand-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.3);
}

.contacto-card input[type="submit"]:hover,
.contacto-card .wpcf7-submit:hover {
    background: var(--brand-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(224, 178, 0, 0.35);
}

/* ── Mensajes de validación CF7 ── */
.contacto-card .wpcf7-not-valid-tip {
    color: var(--color-danger);
    font-size: 0.82rem;
    margin-top: -0.5rem;
    margin-bottom: var(--space-sm);
}

.contacto-card .wpcf7-response-output {
    margin: var(--space-lg) 0 0;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
}

.contacto-card .wpcf7-mail-sent-ok,
.contacto-card .wpcf7-response-output[class*="sent"] {
    background: rgba(46, 204, 64, 0.08);
    border-color: var(--color-success);
    color: var(--color-success);
}

.contacto-card .wpcf7-validation-errors,
.contacto-card .wpcf7-response-output[class*="invalid"] {
    background: rgba(226, 75, 74, 0.06);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

/* ── Labels ocultos (CF7 usa placeholder) ── */
.contacto-card label {
    display: block;
}

/* ── Texto legal (reCAPTCHA) ── */
.contacto-card .googlepolicy,
.contacto-card .googlepolicy p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: var(--space-md);
}

.contacto-card .googlepolicy a {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-medium);
    transition: color var(--transition-fast);
}

.contacto-card .googlepolicy a:hover {
    color: var(--brand-dark);
}

/* ── Spinner de CF7 ── */
.contacto-card .wpcf7-spinner {
    margin-left: var(--space-sm);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .contacto-body {
        padding: var(--space-xl) var(--space-md) var(--space-2xl);
    }

    .contacto-card {
        padding: var(--space-xl) var(--space-lg);
    }
}

@media (max-width: 480px) {
    .contacto-card {
        padding: var(--space-lg) var(--space-md);
        border-radius: var(--radius-lg);
    }

    .contacto-card input[type="submit"],
    .contacto-card .wpcf7-submit {
        width: 100%;
        text-align: center;
    }
}