﻿/* ===== Theme Variables ===== */
:root,
[data-bs-theme="light"] {
    --ct-bg: #ffffff;
    --ct-bg-alt: #f8f9fa;
    --ct-text: #2c3e50;
    --ct-text-muted: #4a5568;
    --ct-heading: #1a1a2e;
    --ct-border: #dee2e6;
    --ct-accent: #0d6efd;
    --ct-navbar-bg: #f4f5f7;
    --ct-navbar-text: #4a5568;
    --ct-navbar-hover: #0d6efd;
    --ct-navbar-toggler: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    --ct-hero-from: #f8f9fa;
    --ct-hero-mid: #eff0f3;
    --ct-hero-to: #e5e7eb;
    --ct-hero-text: #2c3e50;
    --ct-card-bg: #ffffff;
    --ct-footer-bg: #f4f5f7;
    --ct-footer-text: #4a5568;
    --ct-shadow: rgba(0, 0, 0, 0.08);
    --ct-toggle-color: #4a5568;
    --ct-toggle-border: rgba(44, 62, 80, 0.3);
    --ct-toggle-hover: #2c3e50;
    --ct-banner-bg: #f4f5f7;
}

[data-bs-theme="dark"] {
    --ct-bg: #0f1219;
    --ct-bg-alt: #161b27;
    --ct-text: #c8d2e0;
    --ct-text-muted: #8896ad;
    --ct-heading: #e4eaf4;
    --ct-border: #1e2a3e;
    --ct-accent: #60a5fa;
    --ct-navbar-bg: #0a0d15;
    --ct-navbar-text: rgba(200, 215, 235, 0.9);
    --ct-navbar-hover: #ffffff;
    --ct-navbar-toggler: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28200, 215, 235, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    --ct-hero-from: #0a0d17;
    --ct-hero-mid: #101d38;
    --ct-hero-to: #0f3460;
    --ct-hero-text: #ffffff;
    --ct-card-bg: #161b27;
    --ct-footer-bg: #0a0d15;
    --ct-footer-text: rgba(200, 215, 235, 0.85);
    --ct-shadow: rgba(0, 0, 0, 0.45);
    --ct-toggle-color: rgba(200, 215, 235, 0.85);
    --ct-toggle-border: rgba(200, 215, 235, 0.3);
    --ct-toggle-hover: #ffffff;
    --ct-banner-bg: #0a0d15;
}

/* ===== Base ===== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    background-color: var(--ct-bg);
    color: var(--ct-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--ct-bg), 0 0 0 0.25rem var(--ct-accent);
}

/* ===== Navbar (handled by Phoenix _NavbarTopPartial) ===== */

/* ===== Navbar Logo (theme-aware via Phoenix d-dark-none / d-light-none) ===== */

/* ===== Theme Toggle Button (handled by Phoenix theme-control-toggle) ===== */

/* ===== Uniform Section Spacing ===== */
.section-block {
    padding: 2.5rem 0;
    background-color: var(--ct-bg);
}

    .section-block.bg-light {
        background-color: var(--ct-bg-alt) !important;
    }

@media (min-width: 768px) {
    .section-block {
        padding: 3.5rem 0;
    }
}

/* ===== Uniform Typography ===== */
.section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ct-heading);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ct-accent);
    display: inline-block;
}

@media (min-width: 768px) {
    .section-heading {
        font-size: 1.5rem;
    }
}

.subsection-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ct-heading);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ct-accent);
    display: inline-block;
}

@media (min-width: 768px) {
    .subsection-heading {
        font-size: 1.2rem;
    }
}

.body-text {
    font-size: 0.95rem;
    color: var(--ct-text-muted);
    line-height: 1.75;
}

@media (min-width: 768px) {
    .body-text {
        font-size: 1rem;
    }
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--ct-hero-from) 0%, var(--ct-hero-mid) 50%, var(--ct-hero-to) 100%);
    color: var(--ct-hero-text);
    padding: 2.5rem 0;
    transition: background 0.3s ease, color 0.3s ease;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 3.5rem 0;
    }
}

.hero-section h1 {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

@media (min-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 2.4rem;
    }
}

@media (min-width: 992px) {
    .hero-section h1 {
        font-size: 2.8rem;
    }
}

.hero-text {
    opacity: 0.9;
    line-height: 1.8;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .hero-text {
        font-size: 1.1rem;
    }
}

/* ===== Hero Card ===== */
.hero-card {
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--ct-accent);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .hero-card {
    background-color: rgba(255, 255, 255, 0.55);
    border-color: var(--ct-border);
    border-left-color: var(--ct-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .hero-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: var(--ct-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .hero-card {
        padding: 2rem 2.5rem;
    }
}

/* ===== Content Lists ===== */
.content-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
    color: var(--ct-text-muted);
    line-height: 1.7;
}

@media (min-width: 768px) {
    .content-list li {
        font-size: 1rem;
    }
}

.content-list li::before {
    content: "\2022";
    color: var(--ct-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ===== Contact Form: handled by Bootstrap/Phoenix card + form utilities ===== */

/* ===== Checkbox Grid (Mesa de Ayuda) ===== */
.ct-check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem 1rem;
}

    .ct-check-grid .form-check {
        margin-bottom: 0;
    }

/* ===== Footer (handled by Phoenix _FooterPartial) ===== */

/* ===== Floating Social Buttons ===== */
.social-float {
    position: fixed;
    right: 0.75rem;
    bottom: 5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 1050;
}

a.social-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-icon {
    font-size: 22px;
}

@media (min-width: 768px) {
    .social-float {
        right: 1rem;
        bottom: 5.5rem;
        gap: 0.75rem;
    }

    a.social-float-btn {
        width: 50px;
        height: 50px;
    }

    .social-icon {
        font-size: 28px;
    }
}

a.social-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    color: #fff;
}

.social-whatsapp {
    background-color: #25d366;
}

    .social-whatsapp:hover {
        background-color: #1ebe57;
    }

.social-facebook {
    background-color: #1877f2;
}

    .social-facebook:hover {
        background-color: #0d65d9;
    }

/* ===== Dark theme overrides for Bootstrap components ===== */
[data-bs-theme="dark"] .shadow {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--ct-text-muted) !important;
}

[data-bs-theme="dark"] .border-top {
    border-color: var(--ct-border) !important;
}

[data-bs-theme="dark"] img.rounded {
    opacity: 0.92;
}

/* ===== Clients Carousel ===== */
.clients-carousel {
    overflow: hidden;
    width: 100%;
    padding: 1.5rem 0;
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 5rem;
    width: max-content;
    animation: scrollClients 25s linear infinite;
}

.client-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(30%);
    opacity: 0.85;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

    .client-logo:hover {
        filter: grayscale(0%);
        opacity: 1;
    }

@media (min-width: 768px) {
    .client-logo {
        height: 100px;
    }

    .clients-track {
        gap: 6rem;
    }
}

@keyframes scrollClients {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

[data-bs-theme="dark"] .client-logo {
    filter: grayscale(30%) brightness(1.15);
    opacity: 0.8;
}

    [data-bs-theme="dark"] .client-logo:hover {
        filter: grayscale(0%) brightness(1.15);
        opacity: 1;
    }

/* ===== Cookie Consent (handled by _CookiesPartial) ===== */

/* ===== Cookie Policy Table ===== */
.cookie-table {
    background-color: var(--ct-card-bg);
    color: var(--ct-text);
    border-color: var(--ct-border);
    font-size: 0.9rem;
}

    .cookie-table th {
        background-color: var(--ct-bg-alt);
        color: var(--ct-heading);
        border-color: var(--ct-border);
        font-weight: 600;
    }

    .cookie-table td {
        border-color: var(--ct-border);
    }

/* CARD BASE */
.info-card {
    background: var(--ct-card-bg);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    box-shadow: 0 6px 20px var(--ct-shadow);
    transition: all 0.25s ease;
}

    .info-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 28px var(--ct-shadow);
    }

/* COLORES SUPERIORES */
.card-mission {
    border-top: 4px solid #0d6efd;
}

.card-vision {
    border-top: 4px solid #198754;
}

.card-values {
    border-top: 4px solid #fd7e14;
}

/* HEADER INLINE */
.card-header-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* ICONO */
.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .icon-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Icon theme switching */
[data-theme="light"] .icon-light {
    display: inline-block;
}

[data-theme="light"] .icon-dark {
    display: none;
}

[data-theme="dark"] .icon-light {
    display: none;
}

[data-theme="dark"] .icon-dark {
    display: inline-block;
}

.card-mission .icon-circle {
    background: rgba(13,110,253,0.1);
    color: #0d6efd;
}

.card-vision .icon-circle {
    background: rgba(25,135,84,0.1);
    color: #198754;
}

.card-values .icon-circle {
    background: rgba(253,126,20,0.1);
    color: #fd7e14;
}

[data-theme="dark"] .card-mission .icon-circle {
    background: rgba(96,165,250,0.15);
}

[data-theme="dark"] .card-vision .icon-circle {
    background: rgba(52,211,153,0.15);
}

[data-theme="dark"] .card-values .icon-circle {
    background: rgba(251,191,36,0.15);
}

/* Dark mode card top borders */
[data-theme="dark"] .card-mission {
    border-top-color: #60a5fa;
}

[data-theme="dark"] .card-vision {
    border-top-color: #34d399;
}

[data-theme="dark"] .card-values {
    border-top-color: #fbbf24;
}

/* TÍTULO */
.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ct-heading);
    margin: 0;
}

/* CONTENIDO */
.card-content {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .card-content li {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--ct-text-muted);
        margin-bottom: 0.75rem;
    }

        .card-content li:last-child {
            margin-bottom: 0;
        }

    .card-content strong {
        font-weight: 600;
        color: var(--ct-heading);
    }
/* ===== Services Carousel (handled by Bootstrap carousel component) ===== */

/* Contenedor general del hero */
.hero-video {
    width: 100%;
    display: block;
    padding-top: 1.5rem;
    padding-bottom: 0;
}

/* Wrapper con esquinas redondeadas (como el slider) */
.hero-video__wrapper {
    position: relative;
    border: 2px solid var(--phoenix-border-color);
}

/* Mantiene la proporción 1680x720 en cualquier pantalla */
.hero-video__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1680 / 720;
    overflow: hidden;
}

/* Video responsivo */
.hero-video__bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

/* Capa oscura para mejorar contraste */
.hero-video__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    pointer-events: none;
}

/* Caption container (shared base) */
.hero-video__caption {
    text-align: center;
}

/* H1 título del hero */
.hero-video__title {
    font-size: clamp(1.3rem, 2.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

/* Subtítulo del hero */
.hero-video__subtitle {
    font-size: clamp(0.82rem, 1.4vw, 1rem);
    line-height: 1.7;
    margin-bottom: 0;
    opacity: 0.92;
}

/* Variante overlay: dentro del video (>= 1200px) */
.hero-video__caption--overlay {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: none;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    padding: 1.5rem 2.5rem 1.2rem;
    border-radius: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 80%, transparent 100%);
    display: none;
}

    .hero-video__caption--overlay .hero-video__title,
    .hero-video__caption--overlay .hero-video__subtitle {
        color: #ffffff;
    }

/* Variante below: debajo del video (< 1200px) */
.hero-video__caption--below {
    margin-top: 1rem;
    color: var(--ct-heading);
    background: var(--ct-card-bg);
    border: 1px solid var(--ct-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: block;
    box-shadow: 0 2px 12px var(--ct-shadow);
}

    .hero-video__caption--below .hero-video__title {
        color: var(--ct-heading);
    }

    .hero-video__caption--below .hero-video__subtitle {
        color: var(--ct-text-muted);
    }

/* >= 1200px: overlay visible, below oculto */
@media (min-width: 1200px) {
    .hero-video__caption--overlay {
        display: block;
    }

    .hero-video__caption--below {
        display: none !important;
    }
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 600px) {
    .hero-video__caption--below {
        padding: 1rem;
    }

    .hero-video__title {
        font-size: 1.15rem;
    }
}

/* ===== Carousel Slide ===== */

/* Image container: fixed height, images fill via object-fit */
.carousel-slide__media {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background-color: var(--phoenix-body-bg, #f5f5f5);
}

    .carousel-slide__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Shared caption base */
.carousel-slide__caption {
    text-align: center;
}

    .carousel-slide__caption h5 {
        font-size: clamp(1rem, 2vw, 1.35rem);
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }

    .carousel-slide__caption p {
        font-size: clamp(0.8rem, 1.3vw, 0.95rem);
        line-height: 1.6;
        margin-bottom: 0;
    }

/* Overlay variant: inside the slide, gradient bottom */
.carousel-slide__caption--overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    padding: 1.2rem 2rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.15) 80%, transparent 100%);
    display: none;
}

    .carousel-slide__caption--overlay h5,
    .carousel-slide__caption--overlay p {
        color: #ffffff;
    }

/* Below variant: themed card below the carousel (< md) */
.carousel-slide__caption--below {
    margin-top: 1rem;
    color: var(--ct-heading);
    background: var(--ct-card-bg);
    border: 1px solid var(--ct-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: block;
    box-shadow: 0 2px 12px var(--ct-shadow);
}

    .carousel-slide__caption--below h5 {
        color: var(--ct-heading);
    }

    .carousel-slide__caption--below p {
        color: var(--ct-text-muted);
    }

/* >= md (768px): 460px height, overlay visible, below hidden */
@media (min-width: 768px) {
    .carousel-slide__media {
        height: 460px;
    }

    .carousel-slide__caption--overlay {
        display: block;
    }

    .carousel-slide__caption--below {
        display: none !important;
    }
}

/* Small screens: tighter below card */
@media (max-width: 575.98px) {
    .carousel-slide__caption--below {
        padding: 1rem;
    }

    .carousel-slide__caption h5 {
        font-size: 0.95rem;
    }
}

/* ===== FAQ Accordion Theme Integration ===== */
.accordion-item {
    background-color: var(--ct-card-bg);
}

.accordion-button {
    background-color: var(--ct-card-bg);
    color: var(--ct-heading);
}

    .accordion-button:not(.collapsed) {
        color: var(--ct-accent);
        background-color: var(--ct-bg-alt);
        box-shadow: none;
    }

    .accordion-button:focus {
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
        border-color: transparent;
    }

    .accordion-button::after {
        filter: var(--ct-accordion-icon-filter, none);
    }

[data-bs-theme="dark"] .accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(2);
}

.accordion-body {
    background-color: var(--ct-card-bg);
}
