/* ============================================================================
   SUBPAGE v1.0 — Layout de sub-páginas (header, hero, section, footer)
   ============================================================================ */

/* ============ HEADER ============ */
.sub-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 22, 40, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    transition: background 0.3s ease;
}

body.day-mode .sub-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: #E5E7EB;
}

.sub-header-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.sub-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--c-text);
    transition: opacity 0.25s ease;
}

.sub-brand:hover { opacity: 0.85; }

.sub-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background: transparent;
    padding: 2px;
    filter: drop-shadow(0 4px 12px var(--c-accent-glow));
}

.sub-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sub-brand-text strong {
    font-family: var(--f-title);
    font-size: 16px;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.sub-brand-text small {
    font-family: var(--f-mono);
    font-size: 10.5px;
    color: var(--c-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 1px;
}

.sub-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--c-bg-3);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}

.sub-theme-toggle:hover {
    background: var(--c-accent);
    color: var(--c-bg);
    border-color: var(--c-accent);
    transform: rotate(20deg);
}

.sub-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--c-bg-3);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 13.5px;
    font-weight: 600;
    transition: all var(--t-fast);
}

.sub-back-btn:hover {
    background: var(--c-accent);
    color: var(--c-bg);
    border-color: var(--c-accent);
    transform: translateX(-3px);
}

.sub-back-btn i { font-size: 12px; }

/* ============ HERO BASE ============ */
.sub-hero {
    position: relative;
    padding: 80px 24px 60px;
    overflow: hidden;
}

.sub-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sub-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--c-accent-soft);
    border: 1px solid var(--c-accent);
    border-radius: 999px;
    color: var(--c-accent);
    font-family: var(--f-mono);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.sub-hero-tag i { font-size: 11px; }

.sub-hero h1 {
    font-family: var(--f-title);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 18px;
    color: var(--c-text);
    text-align: center;
}

.sub-hero p {
    font-family: var(--f-body);
    font-size: clamp(15px, 1.7vw, 18px);
    line-height: 1.65;
    color: var(--c-text-soft);
    max-width: 760px;
    margin: 0 auto 22px;
    text-align: center;
}

.sub-hero-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-2) 100%);
    border-radius: 999px;
    margin: 18px auto 22px;
    box-shadow: 0 0 18px var(--c-accent-glow);
}

/* ============ SECTION BASE ============ */
.sub-section {
    padding: 70px 24px;
    position: relative;
}

.sub-section.alt {
    background: linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 100%);
}

body.day-mode .sub-section.alt {
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.sub-section-inner {
    max-width: 1340px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.sub-section-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 44px;
}

.sub-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--c-accent-soft);
    border: 1px solid var(--c-accent);
    border-radius: 999px;
    color: var(--c-accent);
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.sub-section-tag i { font-size: 10.5px; }

.sub-section-header h2,
.sub-section h2 {
    font-family: var(--f-title);
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--c-text);
}

.sub-section-header p,
.sub-section-head-text p {
    font-family: var(--f-body);
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--c-text-soft);
    margin: 0;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.sub-section-underline {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-accent-2) 100%);
    border-radius: 999px;
    margin: 14px auto 0;
    box-shadow: 0 0 12px var(--c-accent-glow);
}

/* ============ FOOTER ============ */
.sub-footer {
    text-align: center;
    padding: 30px 24px 40px;
    color: var(--c-muted);
    font-family: var(--f-mono);
    font-size: 12px;
    border-top: 1px solid var(--c-border);
    letter-spacing: 0.04em;
}

.sub-footer a {
    color: var(--c-accent);
    font-weight: 700;
    transition: color var(--t-fast);
}

.sub-footer a:hover { color: var(--c-accent-2); }

/* ============ WHATSAPP CTA SECTION ============ */
.whatsapp-cta-section {
    padding: 70px 24px;
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 211, 102, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.day-mode .whatsapp-cta-section {
    background:
        radial-gradient(circle at 20% 50%, rgba(37, 211, 102, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.whatsapp-cta-section .sub-section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.whatsapp-cta-section h2 {
    font-family: var(--f-title);
    font-size: clamp(24px, 3.4vw, 36px);
    margin: 0 0 8px;
}

.whatsapp-cta-section p {
    color: var(--c-text-soft);
    font-size: 15.5px;
    margin: 0;
    max-width: 640px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
    .sub-header-inner { padding: 12px 16px; gap: 12px; }
    .sub-brand-logo { width: 40px; height: 40px; }
    .sub-brand-text strong { font-size: 14.5px; }
    .sub-brand-text small { font-size: 9.5px; }
    .sub-back-btn span { display: none; }
    .sub-back-btn { padding: 10px 12px; }
    .sub-hero { padding: 60px 18px 44px; }
    .sub-section { padding: 50px 18px; }
    .sub-section-header { margin-bottom: 32px; }
}

@media (max-width: 480px) {
    /* El nombre de la página SIEMPRE visible en móvil (Diseño Gráfico,
       Desarrollo Full Stack, Video y Motion, Currículum…). Solo se
       compacta: título más pequeño y se oculta el subtítulo secundario. */
    .sub-brand-text { display: flex; min-width: 0; }
    .sub-brand-text strong {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }
    .sub-brand-text small { display: none; }
    .sub-brand { gap: 8px; min-width: 0; flex: 1; }
    .sub-brand-logo { width: 36px; height: 36px; }
    .sub-theme-toggle { width: 38px; height: 38px; font-size: 13px; flex-shrink: 0; }
    .sub-header-actions { flex-shrink: 0; }
}
