/*
=========================================================
ARCHIVO: components.css
UBICACIÓN: static/css/
FUNCIÓN: componentes reutilizables para templates públicos
USO: T1, T2 y T3
=========================================================
*/

/* =========================================================
   TOPBAR COMPARTIDA
========================================================= */
.t1-topbar,
.t2-topbar,
.t3-topbar {
    color: #ffffff;
    font-size: 13px;
    padding: 10px 18px;
}

.t1-topbar {
    background: var(--brand-primary);
}

.t2-topbar,
.t3-topbar {
    background: var(--brand-dark);
}

.t1-topbar-inner,
.t2-topbar-inner,
.t3-topbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.t1-topbar-left,
.t1-topbar-right,
.t2-topbar-left,
.t2-topbar-right,
.t3-topbar-left,
.t3-topbar-right {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.t1-topbar a,
.t2-topbar a,
.t3-topbar a {
    color: #ffffff;
    opacity: 0.96;
}

/* =========================================================
   HEADER COMPARTIDO
========================================================= */
.t1-header,
.t2-header,
.t3-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-border);
}

.t1-header-inner,
.t2-header-inner,
.t3-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.t1-brand,
.t2-brand,
.t3-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.t1-brand-logo,
.t2-brand-logo,
.t3-brand-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 14px;
    background: #ffffff;
    padding: 4px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--brand-border);
}

.t3-brand-logo {
    width: 62px;
    height: 62px;
}

.t1-brand-text h1,
.t2-brand-text h1,
.t3-brand-text h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.t1-brand-text p,
.t2-brand-text p,
.t3-brand-text p {
    margin: 4px 0 0;
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.5;
}

.t1-nav,
.t2-nav,
.t3-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.t1-nav a,
.t2-nav a,
.t3-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-text);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.t1-nav a:hover,
.t2-nav a:hover,
.t3-nav a:hover {
    background: var(--brand-soft);
    transform: translateY(-1px);
}

/* =========================================================
   SECCIONES REUTILIZABLES
========================================================= */
.t1-section,
.t2-section,
.t3-section {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 34px;
}

.t1-section-title,
.t2-section-title,
.t3-section-title {
    margin: 0 0 12px;
    color: var(--brand-primary);
}

.t1-section-title,
.t2-section-title {
    font-size: 36px;
}

.t3-section-title {
    font-size: 38px;
}

.t1-section-text,
.t2-section-text,
.t3-section-text {
    margin: 0 0 22px;
    color: var(--brand-muted);
    font-size: 17px;
    line-height: 1.8;
}

/* =========================================================
   BADGES
========================================================= */
.t1-badges,
.t2-badges,
.t3-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.t1-badge,
.t2-badge,
.t3-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* =========================================================
   BOTONES REUTILIZABLES
========================================================= */
.btn-t1,
.btn-t2,
.btn-t3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.btn-t1:hover,
.btn-t2:hover,
.btn-t3:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--brand-primary);
    color: #ffffff !important;
}

.btn-secondary {
    background: var(--brand-secondary);
    color: #111111 !important;
}

.btn-light {
    background: #ffffff;
    color: var(--brand-primary) !important;
    border-color: var(--brand-border);
}

/* Variantes según estilo de botón */
body[data-button-style="rounded"] .btn-t1,
body[data-button-style="rounded"] .btn-t2,
body[data-button-style="rounded"] .btn-t3 {
    border-radius: 14px;
}

body[data-button-style="square"] .btn-t1,
body[data-button-style="square"] .btn-t2,
body[data-button-style="square"] .btn-t3 {
    border-radius: 6px;
}

body[data-button-style="pill"] .btn-t1,
body[data-button-style="pill"] .btn-t2,
body[data-button-style="pill"] .btn-t3 {
    border-radius: 999px;
}

body[data-button-style="soft"] .btn-t1,
body[data-button-style="soft"] .btn-t2,
body[data-button-style="soft"] .btn-t3 {
    border-radius: 14px;
    box-shadow: none;
}

/* Ajustes según modo visual */
body[data-style-mode="corporate"] .btn-t1,
body[data-style-mode="corporate"] .btn-t2,
body[data-style-mode="corporate"] .btn-t3 {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

body[data-style-mode="minimal"] .btn-t1,
body[data-style-mode="minimal"] .btn-t2,
body[data-style-mode="minimal"] .btn-t3 {
    box-shadow: none;
}

body[data-style-mode="elegant"] .btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #1f2937);
}

body[data-style-mode="modern"] .btn-secondary {
    box-shadow: 0 14px 26px rgba(245, 158, 11, 0.22);
}

/* =========================================================
   HERO COMPARTIDO
========================================================= */
.t1-hero,
.t2-hero,
.t3-hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 30px;
    align-items: center;
}

.t1-hero-title,
.t2-hero-title,
.t3-hero-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--brand-primary);
}

.t1-hero-text,
.t2-hero-text,
.t3-hero-text {
    margin: 0 0 20px;
    color: var(--brand-muted);
    font-size: 18px;
    line-height: 1.8;
    max-width: 760px;
}

.t1-hero-actions,
.t2-hero-actions,
.t3-hero-actions,
.t1-cta-actions,
.t2-cta-actions,
.t3-cta-actions,
.t1-card-actions,
.t2-card-actions,
.t3-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.t1-hero-points,
.t2-hero-points {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
}

.t1-hero-point,
.t2-hero-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--brand-text);
    font-size: 16px;
    line-height: 1.65;
}

.t1-hero-check,
.t2-hero-check,
.t1-list-check,
.t2-list-check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(21, 128, 61, 0.12);
    color: var(--brand-success);
    font-size: 14px;
    font-weight: 900;
}

.t1-hero-proof,
.t2-hero-proof,
.t3-hero-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 24px;
}

/* =========================================================
   TARJETAS Y PLACEHOLDERS
========================================================= */
.t1-card,
.t2-card,
.t3-card,
.t1-proof-card,
.t2-proof-card,
.t3-proof-card,
.t2-testimonial,
.t3-testimonial,
.t2-contact-box,
.t2-contact-actions,
.t3-contact-box,
.t3-contact-actions,
.t2-step {
    background: #ffffff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.t1-card,
.t2-card,
.t3-card,
.t2-testimonial,
.t3-testimonial,
.t2-contact-box,
.t2-contact-actions,
.t3-contact-box,
.t3-contact-actions,
.t2-step {
    padding: 24px;
}

.t1-proof-card,
.t2-proof-card,
.t3-proof-card {
    padding: 20px;
}

.t1-proof-number,
.t2-proof-number,
.t3-proof-number {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    color: var(--brand-primary);
}

.t1-proof-text,
.t2-proof-text,
.t3-proof-text,
.t1-card-text,
.t2-card-text,
.t3-card-text,
.t2-testimonial-author,
.t3-testimonial-author {
    color: var(--brand-muted);
    line-height: 1.7;
}

.t1-card-title,
.t2-card-title,
.t3-card-title,
.t2-step-title {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--brand-primary);
}

.t1-card-body,
.t2-card-body,
.t3-card-body {
    display: grid;
    gap: 14px;
}

.t1-card-media,
.t2-card-media,
.t3-card-media,
.t1-split-media,
.t2-about-media,
.t3-split-media,
.t1-hero-media,
.t2-hero-media,
.t3-hero-media {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.t1-card-media img,
.t2-card-media img,
.t3-card-media img,
.t1-split-media img,
.t2-about-media img,
.t3-split-media img,
.t1-hero-media img,
.t2-hero-media img,
.t3-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t1-placeholder,
.t2-placeholder,
.t3-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(17, 24, 39, 0.18);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248,250,252,0.94));
    color: var(--brand-muted);
    line-height: 1.7;
}

/* =========================================================
   LISTAS Y GRIDS
========================================================= */
.t1-grid-3,
.t2-grid-3,
.t3-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.t1-grid-4,
.t3-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.t3-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.t1-split,
.t2-split,
.t3-split,
.t2-about,
.t2-contact-grid,
.t3-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: center;
}

.t1-list,
.t2-list {
    display: grid;
    gap: 14px;
}

.t1-list-item,
.t2-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.7;
}

/* =========================================================
   CTA FINAL Y FOOTER
========================================================= */
.t1-cta-final,
.t2-cta-final,
.t3-cta-final {
    position: relative;
    overflow: hidden;
}

.t1-cta-final::before,
.t2-cta-final::before,
.t3-cta-final::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 68%);
    pointer-events: none;
}

.t1-footer,
.t2-footer,
.t3-footer {
    background: var(--brand-dark);
    color: #e5e7eb;
    padding: 40px 18px 18px;
}

.t1-footer-inner,
.t2-footer-inner,
.t3-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1fr;
    gap: 28px;
}

.t1-footer-title,
.t2-footer-title,
.t3-footer-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.t1-footer-text,
.t2-footer-text,
.t3-footer-text,
.t1-footer-list,
.t2-footer-list,
.t3-footer-list {
    display: grid;
    gap: 10px;
    color: #cbd5e1;
    line-height: 1.7;
}

.t1-footer-bottom,
.t2-footer-bottom,
.t3-footer-bottom {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   RESPONSIVE DE COMPONENTES
========================================================= */
@media (max-width: 1100px) {
    .t1-hero,
    .t2-hero,
    .t3-hero,
    .t1-split,
    .t2-split,
    .t3-split,
    .t2-about,
    .t2-contact-grid,
    .t3-contact-grid,
    .t1-grid-4,
    .t3-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .t1-hero-proof,
    .t2-hero-proof,
    .t3-hero-proof,
    .t1-grid-3,
    .t2-grid-3,
    .t3-grid-3,
    .t3-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .t1-footer-inner,
    .t2-footer-inner,
    .t3-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .t1-topbar,
    .t2-topbar,
    .t3-topbar,
    .t1-footer,
    .t2-footer,
    .t3-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .t1-header-inner,
    .t2-header-inner,
    .t3-header-inner {
        padding: 14px;
    }

    .t1-section,
    .t2-section,
    .t3-section {
        padding: 24px;
    }

    .t1-section-title,
    .t2-section-title,
    .t3-section-title {
        font-size: 29px;
    }

    .t1-hero,
    .t2-hero,
    .t3-hero,
    .t1-split,
    .t2-split,
    .t3-split,
    .t2-about,
    .t2-contact-grid,
    .t3-contact-grid,
    .t1-grid-3,
    .t2-grid-3,
    .t3-grid-3,
    .t1-grid-4,
    .t3-grid-4,
    .t3-grid-2,
    .t1-hero-proof,
    .t2-hero-proof,
    .t3-hero-proof,
    .t1-footer-inner,
    .t2-footer-inner,
    .t3-footer-inner {
        grid-template-columns: 1fr;
    }

    .t1-brand,
    .t2-brand,
    .t3-brand {
        width: 100%;
    }

    .t1-nav,
    .t2-nav,
    .t3-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-t1,
    .btn-t2,
    .btn-t3 {
        width: 100%;
    }

    .t1-hero-title,
    .t2-hero-title,
    .t3-hero-title {
        font-size: clamp(28px, 10vw, 42px);
    }

    .t1-placeholder,
    .t2-placeholder,
    .t3-placeholder {
        min-height: 220px;
    }
}