/* =====================================================
   TNS Chile - Sitio Público CSS
   ===================================================== */

:root {
    --tns-primary: #0056b3;
    --tns-secondary: #004494;
    --tns-accent: #00a8e8;
    --tns-dark: #1a1a2e;
    --tns-gray: #6c757d;
    --tns-light-bg: #f8f9fa;
    --tns-footer-bg: #1a1a2e;
    --tns-footer-text: #adb5bd;
}

/* ---- Skip navigation (accesibilidad) ---- */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--tns-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s;
}

.skip-nav:focus {
    top: 0;
    color: #fff;
}

/* ---- Focus visible (teclado) ---- */
:focus-visible {
    outline: 3px solid var(--tns-accent);
    outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--tns-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Quitar outline por defecto solo cuando hay focus-visible */
:focus:not(:focus-visible) {
    outline: none;
}

/* ---- Botón volver arriba ---- */
#btn-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    background: var(--tns-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 1040;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

#btn-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-top:hover {
    background: var(--tns-accent);
}

/* ---- Scroll-reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delay para grillas de cards */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Navbar ---- */
.tns-navbar {
    background: rgba(26, 26, 46, 0.97) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--tns-accent);
    padding: 0.6rem 0;
    transition: all 0.3s ease;
}

.tns-navbar.scrolled {
    padding: 0.3rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.tns-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.tns-brand:hover {
    color: var(--tns-accent) !important;
}

.tns-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.7rem !important;
    transition: color 0.2s;
}

.tns-navbar .nav-link:hover,
.tns-navbar .nav-link.active {
    color: var(--tns-accent) !important;
}

/* ---- Navbar dropdown (Soluciones) ---- */
.tns-navbar .dropdown-menu.tns-dropdown {
    background: rgba(26, 26, 46, 0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.35rem 0;
    margin-top: 0.4rem;
    min-width: 220px;
}

.tns-navbar .dropdown-menu.tns-dropdown .dropdown-item {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
}

.tns-navbar .dropdown-menu.tns-dropdown .dropdown-item:hover,
.tns-navbar .dropdown-menu.tns-dropdown .dropdown-item:focus {
    background: rgba(255,255,255,0.06);
    color: var(--tns-accent);
}

@media (max-width: 991px) {
    .tns-navbar .dropdown-menu.tns-dropdown {
        background: transparent;
        border: none;
        padding-left: 0.75rem;
        margin-top: 0;
    }
}

.btn-portal {
    background: var(--tns-accent);
    color: #fff !important;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-portal:hover {
    background: var(--tns-primary);
    color: #fff !important;
}

/* Toggler icon visible sobre fondo oscuro */
.tns-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.tns-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(0,168,232,0.4);
}

/* ---- Hero ---- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--tns-dark) 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/ciudad.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: 220px;
    height: auto;
    display: block;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--tns-accent);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
}

.hero-btn-primary {
    background: var(--tns-accent);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn-primary:hover,
.hero-btn-primary:focus,
.hero-btn-primary:active {
    background: var(--tns-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,168,232,0.4);
    color: #fff;
}

.hero-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s;
}

.hero-btn-outline:hover {
    border-color: var(--tns-accent);
    background: rgba(0,168,232,0.1);
    color: #fff;
}

/* ---- Sections ---- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tns-dark);
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--tns-accent);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--tns-gray);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
}

.section-light {
    background: var(--tns-light-bg);
    padding: 5rem 0;
}

.section-white {
    background: #fff;
    padding: 5rem 0;
}

.section-dark {
    background: var(--tns-dark);
    padding: 5rem 0;
    color: #fff;
}

/* ---- Cards ---- */
.tns-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    padding: 2rem;
    height: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
}

.tns-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.tns-card .card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: #fff;
    font-size: 1.4rem;
}

.tns-card h5 {
    font-weight: 700;
    color: var(--tns-dark);
    margin-bottom: 0.75rem;
}

.tns-card p {
    color: var(--tns-gray);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---- Service As-a-Service badges ---- */
.aas-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.3rem;
    letter-spacing: 0.5px;
}

/* ---- Stats bar ---- */
.stats-bar {
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-dark));
    padding: 3rem 0;
    color: #fff;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--tns-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-top: 0.3rem;
}

/* ---- ISO Certifications ---- */
.iso-strip {
    background: #fff;
    padding: 2.5rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.iso-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--tns-light-bg);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin: 0.4rem;
    transition: border-color 0.2s, transform 0.2s;
}

.iso-badge:hover {
    border-color: var(--tns-accent);
    transform: translateY(-3px);
}

.iso-badge .iso-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--tns-primary);
}

.iso-badge .iso-label {
    font-size: 0.7rem;
    color: var(--tns-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Values ---- */
.value-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    height: 100%;
    transition: transform 0.25s;
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 1.6rem;
}

/* ---- Team photos ---- */
.team-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    border: 4px solid var(--tns-primary);
}

/* ---- Client table ---- */
.client-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.client-table thead tr {
    background: var(--tns-primary);
    color: #fff;
}

.client-table thead th {
    padding: 0.85rem 1rem;
    font-weight: 600;
    text-align: left;
    border: none;
}

.client-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.15s;
}

.client-table tbody tr:hover {
    background: #f0f6ff;
}

.client-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: var(--tns-dark);
}

.client-table tbody td:first-child {
    font-weight: 600;
}

.client-table-historicos thead tr {
    background: var(--tns-secondary, #1a3a5c);
}

/* ---- Client logos grid ---- */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.client-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-align: center;
    font-weight: 600;
    color: var(--tns-dark);
    font-size: 0.85rem;
}

.client-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: var(--tns-accent);
}

/* ---- Testimonials ---- */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    height: 100%;
}

.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    color: var(--tns-accent);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 20px;
    line-height: 1;
    font-family: Georgia, serif;
}

.testimonial-text {
    color: var(--tns-gray);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    font-weight: 700;
    color: var(--tns-dark);
}

.testimonial-role {
    font-size: 0.85rem;
    color: var(--tns-accent);
}

/* ---- Contact ---- */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s;
}

.contact-form .form-control:focus {
    border-color: var(--tns-accent);
    box-shadow: none;
}

.btn-tns-submit {
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
    color: #fff;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-tns-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff;
}

/* ---- Page Hero (subpages) ---- */
.page-hero {
    background: linear-gradient(135deg, var(--tns-dark) 0%, #0f3460 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/ciudad.jpg') center/cover no-repeat;
    opacity: 0.08;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
}

.page-hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    max-width: 600px;
}

/* ---- Timeline / Process ---- */
.process-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.process-num {
    width: 48px;
    height: 48px;
    background: var(--tns-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 1.2rem;
}

/* ---- Footer ---- */
.tns-footer {
    background: var(--tns-footer-bg);
    color: #ced4da;
    margin-top: auto;
}

/* Anular text-muted de Bootstrap dentro del footer */
.tns-footer .text-muted {
    color: #ced4da !important;
}

.footer-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-subtitle {
    font-size: 0.85rem;
    color: #ced4da;
}

.footer-heading {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.88rem;
}

.footer-link:hover {
    color: var(--tns-accent);
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-divider {
    border-color: rgba(255,255,255,0.15);
}

/* Copyright row */
.tns-footer .row.pb-3 .text-muted {
    color: #adb5bd !important;
}

.social-icon {
    color: #ced4da;
    font-size: 1.3rem;
    transition: color 0.2s;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--tns-accent);
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cert-badge {
    background: rgba(0,168,232,0.15);
    color: var(--tns-accent);
    border: 1px solid rgba(0,168,232,0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

/* ---- Tablet landscape / large tablet (≤ 1199px) ---- */
@media (max-width: 1199px) {
    .tns-navbar .nav-link {
        font-size: 0.82rem;
        padding: 0.5rem 0.5rem !important;
    }
}

/* ---- Tablet portrait (≤ 991px) ---- */
@media (max-width: 991px) {
    /* Navbar collapse */
    .tns-navbar .navbar-collapse {
        background: rgba(26, 26, 46, 0.98);
        border-top: 1px solid rgba(255,255,255,0.08);
        padding: 1rem 0.5rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }

    .tns-navbar .navbar-nav .nav-link {
        padding: 0.55rem 0.75rem !important;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    .tns-navbar .navbar-nav .nav-link:hover {
        background: rgba(255,255,255,0.06);
    }

    .btn-portal {
        margin-top: 0.5rem;
        margin-left: 0.75rem;
        display: inline-block;
    }

    /* Hero */
    .hero-section {
        min-height: 80vh;
        padding: 5rem 0 3rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Page hero */
    .page-hero {
        padding: 3rem 0 2rem;
    }

    .page-hero-title {
        font-size: 2rem;
    }

    /* Cards equal height rows */
    .tns-card {
        padding: 1.5rem;
    }

    /* Stats */
    .stats-bar {
        padding: 2rem 0;
    }

    /* Sections */
    .section-light,
    .section-white,
    .section-dark {
        padding: 4rem 0;
    }

    /* Process steps */
    .process-step {
        margin-bottom: 1.5rem;
    }

    /* Contact info items */
    .contact-info-item {
        margin-bottom: 1.2rem;
    }
}

/* ---- Mobile (≤ 767px) ---- */
@media (max-width: 767px) {
    /* Hero */
    .hero-section {
        min-height: 75vh;
        text-align: center;
        padding: 4rem 0 3rem;
    }

    .hero-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content .d-flex {
        justify-content: center;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    /* Section spacing */
    .section-light,
    .section-white,
    .section-dark {
        padding: 3rem 0;
    }

    /* Section titles */
    .section-title {
        font-size: 1.6rem;
    }

    .section-title.text-center::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Stats */
    .stat-number {
        font-size: 2.2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Cards */
    .tns-card {
        padding: 1.25rem;
    }

    /* ISO badges: 2 per row on small screens */
    .iso-badge {
        padding: 0.75rem 1rem;
        margin: 0.25rem;
    }

    .iso-badge .iso-num {
        font-size: 1.1rem;
    }

    /* Page hero */
    .page-hero {
        padding: 2.5rem 0 1.5rem;
        text-align: center;
    }

    .page-hero-title {
        font-size: 1.75rem;
    }

    .page-hero-subtitle {
        font-size: 0.95rem;
        margin: 0 auto;
    }

    /* Breadcrumb center on mobile */
    .page-hero .breadcrumb {
        justify-content: center;
    }

    /* Contact form full width */
    .contact-form .row > [class*="col-md"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Contact icon smaller */
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    /* Footer: center on mobile */
    .tns-footer .row.pb-3 .text-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }

    /* Testimonials */
    .testimonial-card::before {
        font-size: 4rem;
    }
}

/* ---- Small mobile (≤ 575px) ---- */
@media (max-width: 575px) {
    /* Navbar brand text */
    .tns-brand span {
        font-size: 1.1rem;
    }

    /* Hero buttons stack */
    .hero-section .d-flex {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn-primary,
    .hero-btn-outline {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    /* Hero title */
    .hero-title {
        font-size: 1.65rem;
    }

    /* Stats: 2 per row */
    .stats-bar .stat-number {
        font-size: 1.9rem;
    }

    /* Sections */
    .section-light,
    .section-white,
    .section-dark {
        padding: 2.5rem 0;
    }

    /* Section title */
    .section-title {
        font-size: 1.45rem;
    }

    /* Client grid: 2 columns */
    .client-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .client-item {
        padding: 1rem 0.5rem;
        font-size: 0.8rem;
        min-height: 65px;
    }

    /* ISO badges: wrap nicely */
    .iso-badge {
        padding: 0.6rem 0.75rem;
        margin: 0.2rem;
    }

    .iso-badge .iso-num {
        font-size: 1rem;
    }

    .iso-badge .iso-label {
        font-size: 0.62rem;
    }

    /* Cards icon */
    .tns-card .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    /* Value cards */
    .value-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }

    /* AAS badges */
    .aas-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    /* Footer columns center */
    .tns-footer [class*="col-"] {
        text-align: center;
    }

    .footer-links-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem 1rem;
    }

    .footer-links-list li {
        margin-bottom: 0;
    }

    .social-links,
    .cert-badges {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }

    .contact-info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    /* Process steps: smaller number circle */
    .process-num {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
        margin-right: 1rem;
    }

    /* Page hero */
    .page-hero-title {
        font-size: 1.5rem;
    }

    /* Btn portal full width on open menu */
    .btn-portal {
        width: calc(100% - 1.5rem);
        text-align: center;
    }
}

/* ====================================================
   PREFERS-REDUCED-MOTION
   Desactiva animaciones para usuarios que lo prefieran
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    #btn-top {
        transition: none;
    }

    .tns-navbar {
        transition: none;
    }

    .tns-card,
    .value-card,
    .iso-badge {
        transition: none;
    }
}

/* =====================================================
   Feed de Noticias (público)
   ===================================================== */
.tns-feed { max-width: 820px; margin: 0 auto; }

.tns-feed-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: .02em;
    margin-bottom: 1.5rem;
}
.tns-feed-header::before {
    content: "";
    width: 5px;
    height: 28px;
    background: #e11d48;
    border-radius: 2px;
    flex-shrink: 0;
}

.tns-feed-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eceef1;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
    border-radius: 8px;
    padding-left: .5rem;
    padding-right: .5rem;
}
.tns-feed-item:hover { background: #f8f9fb; }
.tns-feed-item:last-child { border-bottom: 0; }

.tns-feed-thumb {
    flex: 0 0 280px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tns-primary), var(--tns-accent));
}
.tns-feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tns-feed-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.45);
}

.tns-feed-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tns-feed-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 .5rem 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tns-feed-item:hover .tns-feed-title { color: var(--tns-primary); }
.tns-feed-excerpt {
    color: #6b7280;
    font-size: .93rem;
    line-height: 1.55;
    margin: 0 0 .75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tns-feed-meta {
    color: #9ca3af;
    font-size: .82rem;
    margin-top: auto;
}
.tns-feed-meta i { margin-right: .35rem; }

@media (max-width: 768px) {
    .tns-feed-item { flex-direction: column; }
    .tns-feed-thumb { flex: 0 0 auto; width: 100%; height: 200px; }
}

/* ===================== NOTICIA DETALLE ===================== */
.tns-noticia-detalle {
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}
.tns-noticia-hero-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
}
.tns-noticia-excerpt {
    font-size: 1.1rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    border-left: 3px solid var(--tns-accent);
    padding-left: 1rem;
}
.tns-noticia-body { line-height: 1.8; color: #374151; }
.tns-noticia-body p { margin-bottom: 1rem; }
.tns-noticia-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.tns-noticia-body h2,
.tns-noticia-body h3,
.tns-noticia-body h4 { color: var(--tns-primary); margin: 1.5rem 0 .75rem; }
.tns-noticia-body ul,
.tns-noticia-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.tns-noticia-body a { color: var(--tns-accent); }
.tns-noticia-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }

.tns-linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #0A66C2;
    font-weight: 600;
    text-decoration: none;
    padding: .6rem 1.2rem;
    border: 2px solid #0A66C2;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.tns-linkedin-link:hover { background: #0A66C2; color: #fff; }
.tns-linkedin-link i { font-size: 1.4rem; }

.tns-back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--tns-primary);
    font-weight: 600;
    text-decoration: none;
    padding: .6rem 1.4rem;
    border: 2px solid var(--tns-primary);
    border-radius: 30px;
    transition: background .2s, color .2s;
}
.tns-back-link:hover {
    background: var(--tns-primary);
    color: #fff;
}

/* Cards Home → Detalle */
.tns-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.tns-card-link:hover .tns-card {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    transition: transform .2s, box-shadow .2s;
}

/* ===================== NOTICIA TAGS ===================== */
.tns-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.tns-tag-badge {
    display: inline-block;
    padding: .25rem .7rem;
    background: #eef2ff;
    color: var(--tns-primary);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: capitalize;
    text-decoration: none;
    line-height: 1.4;
    transition: background .2s, color .2s;
}
a.tns-tag-badge:hover {
    background: var(--tns-primary);
    color: #fff;
}
.tns-tag-badge-sm {
    padding: .15rem .55rem;
    font-size: .68rem;
}
.tns-tag-badge-hero {
    background: rgba(255,255,255,.2);
    color: #fff;
    backdrop-filter: blur(2px);
}
a.tns-tag-badge-hero:hover {
    background: #fff;
    color: var(--tns-primary);
}

/* Filter chips en /Noticias */
.tns-tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    padding: 1rem 0;
}
.tns-tag-chip {
    display: inline-block;
    padding: .4rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.tns-tag-chip:hover {
    border-color: var(--tns-primary);
    color: var(--tns-primary);
}
.tns-tag-chip.active {
    background: var(--tns-primary);
    border-color: var(--tns-primary);
    color: #fff;
}

/* ===================== NOTICIA TIPO ===================== */
.tns-tipo-badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.4;
    margin-bottom: .5rem;
}
.tns-tipo-badge-noticia {
    background: #dbeafe;
    color: #1d4ed8;
}
.tns-tipo-badge-articulo {
    background: #dcfce7;
    color: #166534;
}
.tns-tipo-badge-hero {
    background: rgba(255,255,255,.25);
    color: #fff;
    backdrop-filter: blur(3px);
}

/* Chips filtro por tipo (estilo pill m\u00e1s prominente) */
.tns-tipo-chip {
    display: inline-block;
    padding: .45rem 1.2rem;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.tns-tipo-chip:hover { background: #e5e7eb; }
.tns-tipo-chip.active {
    background: var(--tns-accent);
    color: #fff;
}
.tns-tipo-chip-noticia.active { background: #1d4ed8; }
.tns-tipo-chip-articulo.active { background: #166534; }


/* =====================================================
   Tenesin — Chat Widget
   ===================================================== */

/* Botón flotante */
#tenesin-btn {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    border: none;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0,86,179,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1050;
    transition: background .2s, transform .2s;
    overflow: hidden;
}
#tenesin-btn:hover { transform: scale(1.08); }
#tenesin-btn img#tns-icon-open {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* Cuando el panel está abierto (mostrando X), volver al fondo azul */
#tenesin-btn:has(#tns-icon-close:not(.d-none)) {
    background: var(--tns-primary);
}
#tenesin-btn:has(#tns-icon-close:not(.d-none)):hover {
    background: var(--tns-secondary);
}

/* Avatar en el header del panel */
#tenesin-header .tns-agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Panel */
#tenesin-panel {
    position: fixed;
    bottom: 9.5rem;
    right: 1.5rem;
    width: 330px;
    max-height: 480px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    display: none;
    flex-direction: column;
    z-index: 1049;
    overflow: hidden;
    animation: tns-slidein .2s ease;
}
#tenesin-panel.open { display: flex; }
@keyframes tns-slidein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
#tenesin-header {
    background: var(--tns-primary);
    color: #fff;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
#tenesin-header .tns-agent-info { display: flex; align-items: center; gap: .5rem; }
#tenesin-header .tns-agent-info strong { font-size: .95rem; }
#tenesin-header .tns-agent-info small {
    display: block;
    font-size: .72rem;
    opacity: .8;
    font-weight: 400;
}
#tenesin-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: .8;
    padding: 0 .25rem;
    line-height: 1;
}
#tenesin-close-btn:hover { opacity: 1; }

/* Mensajes */
#tenesin-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    background: #f4f7fb;
}
.tns-msg { display: flex; }
.tns-msg-bot { justify-content: flex-start; }
.tns-msg-user { justify-content: flex-end; }
.tns-msg-bubble {
    max-width: 82%;
    padding: .55rem .85rem;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.tns-msg-bot .tns-msg-bubble {
    background: #fff;
    color: #1a1a2e;
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.tns-msg-user .tns-msg-bubble {
    background: var(--tns-primary);
    color: #fff;
    border-bottom-right-radius: 3px;
}
.tns-msg-typing .tns-msg-bubble { color: #6c757d; font-style: italic; }

/* Input */
#tenesin-input-area {
    display: flex;
    padding: .6rem .75rem;
    gap: .5rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}
#tenesin-input {
    flex: 1;
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    padding: .45rem .9rem;
    font-size: .88rem;
    outline: none;
    transition: border-color .2s;
}
#tenesin-input:focus { border-color: var(--tns-accent); }
#tenesin-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tns-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
    transition: background .2s;
}
#tenesin-send:hover { background: var(--tns-secondary); }
#tenesin-send:disabled { background: #adb5bd; cursor: not-allowed; }

@media (max-width: 480px) {
    #tenesin-panel { width: calc(100vw - 2rem); right: 1rem; bottom: 8.5rem; }
}
