/* ==========================================================
   CAMPUSSAFETRACK
   Hoja de estilos principal
   ========================================================== */


/* ==========================================================
   1. VARIABLES
   ========================================================== */

:root {

    --cst-primary: #002b3b;
    --cst-primary-dark: #001d28;
    --cst-accent: #12a5a5;

    --cst-background: #f8f9fc;
    --cst-text: #263238;
    --cst-muted: #68777e;

    --cst-border: #e5ebee;
    --cst-white: #ffffff;

    --cst-success: #28b47b;
    --cst-whatsapp: #25d366;

    --cst-radius-sm: 12px;
    --cst-radius-md: 18px;
    --cst-radius-lg: 22px;
    --cst-radius-xl: 28px;
    --cst-radius-xxl: 30px;

    --cst-shadow-sm: 0 8px 22px rgba(0, 43, 59, .07);
    --cst-shadow-md: 0 18px 45px rgba(0, 43, 59, .11);
    --cst-shadow-lg: 0 20px 55px rgba(0, 43, 59, .16);
    --cst-shadow-xl: 0 28px 80px rgba(0, 43, 59, .20);

}


/* ==========================================================
   2. ESTILOS GENERALES
   ========================================================== */

html {

    scroll-behavior: smooth;

}

body {

    margin: 0;

    font-family: Arial, Helvetica, sans-serif;

    color: var(--cst-text);
    background: var(--cst-white);

    overflow-x: hidden;

}

section {

    scroll-margin-top: 105px;

}

a {

    text-decoration: none;

}

img {

    max-width: 100%;
    height: auto;

}

h1,
h2,
h3,
h4,
h5,
h6 {

    margin-top: 0;

}

.space {

    padding: 95px 0;

}

.soft {

    background: var(--cst-background);

}


/* ==========================================================
   3. NAVBAR
   ========================================================== */

.navbar {

    min-height: 92px;

    background: rgba(255, 255, 255, .96);

    border-bottom: 1px solid var(--cst-border);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow: 0 4px 18px rgba(0, 43, 59, .04);

}

.navbar-brand {

    display: flex;
    align-items: center;
    gap: 14px;

    color: var(--cst-primary) !important;

    font-size: 1.15rem;
    font-weight: 800;

}

.navbar-brand:hover {

    color: var(--cst-primary-dark) !important;

}

.logo {

    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 2px;

    background: var(--cst-white);

    border: 1px solid rgba(0, 43, 59, .08);
    border-radius: 50%;

    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, .15);

}

.logo img {

    width: 58px;
    height: 58px;

    object-fit: contain;

    border-radius: 50%;

}

.navbar-toggler {

    width: 46px;
    height: 46px;

    padding: 0;

    color: var(--cst-primary);

    background: var(--cst-background);

    border: 1px solid var(--cst-border);
    border-radius: 12px;

    box-shadow: none !important;

}

.navbar-toggler i {

    font-size: 1.2rem;

}

.navbar-nav {

    align-items: center;

}

.nav-link {

    position: relative;

    padding: 12px 14px !important;

    color: var(--cst-text);

    font-size: .95rem;
    font-weight: 600;

    transition: color .25s ease;

}

.nav-link::after {

    content: "";

    position: absolute;
    right: 14px;
    bottom: 4px;
    left: 14px;

    height: 2px;

    background: var(--cst-accent);

    border-radius: 999px;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform .25s ease;

}

.nav-link:hover,
.nav-link:focus {

    color: var(--cst-primary);

}

.nav-link:hover::after,
.nav-link:focus::after {

    transform: scaleX(1);

}


/* ==========================================================
   4. BOTONES
   ========================================================== */

.btn {

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background-color .25s ease,
        color .25s ease,
        border-color .25s ease;

}

.btn:hover {

    transform: translateY(-2px);

}

.btn-cst {

    padding: 12px 20px;

    color: var(--cst-white);

    background: var(--cst-primary);

    border: 1px solid var(--cst-primary);
    border-radius: var(--cst-radius-sm);

    font-weight: 700;

    box-shadow: 0 10px 24px rgba(0, 43, 59, .15);

}

.btn-cst:hover,
.btn-cst:focus {

    color: var(--cst-white);

    background: var(--cst-primary-dark);

    border-color: var(--cst-primary-dark);

    box-shadow: 0 14px 28px rgba(0, 43, 59, .22);

}

.btn-outline-cst {

    padding: 12px 20px;

    color: var(--cst-primary);

    background: transparent;

    border: 1px solid var(--cst-primary);
    border-radius: var(--cst-radius-sm);

    font-weight: 700;

}

.btn-outline-cst:hover,
.btn-outline-cst:focus {

    color: var(--cst-white);

    background: var(--cst-primary);

    border-color: var(--cst-primary);

    box-shadow: 0 12px 26px rgba(0, 43, 59, .16);

}


/* ==========================================================
   5. ETIQUETAS Y ENCABEZADOS
   ========================================================== */

.tag {

    display: inline-flex;
    align-items: center;

    padding: 8px 13px;

    color: var(--cst-primary);

    background: #e8f2f5;

    border: 1px solid rgba(0, 43, 59, .06);
    border-radius: 999px;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1px;

}

.heading {

    max-width: 760px;

    margin: 0 auto 48px;

    text-align: center;

}

.heading h2 {

    margin-bottom: 15px;

    color: var(--cst-primary);

    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;

}

.heading p {

    margin-bottom: 0;

    color: var(--cst-muted);

    line-height: 1.8;

}


/* ==========================================================
   6. HERO
   ========================================================== */

.hero {

    position: relative;

    padding: 165px 0 95px;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(18, 165, 165, .14),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 85%,
            rgba(0, 43, 59, .08),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #fbfdfe,
            #f3f8fa
        );

    overflow: hidden;

}

.hero::before {

    content: "";

    position: absolute;
    top: -180px;
    right: -160px;

    width: 420px;
    height: 420px;

    background: rgba(18, 165, 165, .05);

    border-radius: 50%;

}

.hero .container {

    position: relative;
    z-index: 2;

}

.hero h1 {

    margin: 18px 0 0;

    color: var(--cst-primary);

    font-size: clamp(2.6rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -2px;

}

.hero h1 span {

    color: var(--cst-accent);

}

.lead2 {

    max-width: 650px;

    color: var(--cst-muted);

    font-size: 1.08rem;
    line-height: 1.8;

}


/* ==========================================================
   7. MOCKUP DEL DASHBOARD
   ========================================================== */

.mock {

    position: relative;

    padding: 18px;

    background: var(--cst-white);

    border: 1px solid rgba(0, 43, 59, .06);
    border-radius: var(--cst-radius-xl);

    box-shadow: var(--cst-shadow-xl);

    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);

    transition:
        transform .35s ease,
        box-shadow .35s ease;

}

.mock:hover {

    transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-5px);

    box-shadow: 0 32px 90px rgba(0, 43, 59, .24);

}

.screen {

    background: var(--cst-background);

    border: 1px solid var(--cst-border);
    border-radius: var(--cst-radius-md);

    overflow: hidden;

}

.top {

    position: relative;

    height: 42px;

    background: var(--cst-white);

    border-bottom: 1px solid var(--cst-border);

}

.top::before {

    content: "";

    position: absolute;
    top: 50%;
    left: 16px;

    width: 9px;
    height: 9px;

    background: #ff6b6b;

    border-radius: 50%;

    transform: translateY(-50%);

    box-shadow:
        16px 0 0 #ffc857,
        32px 0 0 #4ecb71;

}

.dash {

    display: grid;
    grid-template-columns: 76px 1fr;

    min-height: 390px;

}

.side {

    padding: 22px 13px;

    background: var(--cst-primary);

}

.side i {

    display: block;

    margin: 0 0 22px;

    color: rgba(255, 255, 255, .45);

    text-align: center;

    transition:
        color .25s ease,
        transform .25s ease;

}

.side i:first-child {

    color: var(--cst-white);

}

.side i:hover {

    color: var(--cst-white);

    transform: scale(1.12);

}

.main {

    padding: 22px;

}

.kpi {

    height: 100%;

    padding: 16px;

    background: var(--cst-white);

    border: 1px solid rgba(0, 43, 59, .04);
    border-radius: 16px;

    box-shadow: var(--cst-shadow-sm);

}

.kpi i {

    margin-bottom: 8px;

    color: var(--cst-accent);

    font-size: 22px;

}

.kpi strong {

    display: block;

    color: var(--cst-primary);

    font-size: 22px;
    line-height: 1.2;

}

.kpi small {

    color: var(--cst-muted);

}

.chart {

    height: 150px;

    display: flex;
    align-items: flex-end;
    gap: 12px;

    margin-top: 15px;
    padding: 18px;

    background: var(--cst-white);

    border: 1px solid rgba(0, 43, 59, .04);
    border-radius: 16px;

    box-shadow: var(--cst-shadow-sm);

}

.chart span {

    flex: 1;

    min-width: 12px;

    background: linear-gradient(
        180deg,
        var(--cst-accent),
        var(--cst-primary)
    );

    border-radius: 8px 8px 2px 2px;

    opacity: .92;

    animation: chart-rise .9s ease both;

}

.chart span:nth-child(2) {

    animation-delay: .08s;

}

.chart span:nth-child(3) {

    animation-delay: .16s;

}

.chart span:nth-child(4) {

    animation-delay: .24s;

}

.chart span:nth-child(5) {

    animation-delay: .32s;

}

.chart span:nth-child(6) {

    animation-delay: .40s;

}

@keyframes chart-rise {

    from {

        transform: scaleY(0);
        transform-origin: bottom;

    }

    to {

        transform: scaleY(1);
        transform-origin: bottom;

    }

}


/* ==========================================================
   8. TARJETAS GENERALES
   ========================================================== */

.cardx {

    height: 100%;

    padding: 28px;

    background: var(--cst-white);

    border: 1px solid var(--cst-border);
    border-radius: var(--cst-radius-lg);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;

}

.cardx:hover {

    border-color: rgba(18, 165, 165, .25);

    transform: translateY(-6px);

    box-shadow: var(--cst-shadow-md);

}

.icon {

    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    color: var(--cst-primary);

    background: #e8f2f5;

    border-radius: 17px;

    font-size: 24px;

    transition:
        transform .25s ease,
        background-color .25s ease,
        color .25s ease;

}

.cardx:hover .icon {

    color: var(--cst-white);

    background: var(--cst-primary);

    transform: rotate(-4deg) scale(1.04);

}

.cardx h3 {

    margin-bottom: 10px;

    color: var(--cst-primary);

    font-size: 1.08rem;
    font-weight: 800;

}

.cardx p {

    margin-bottom: 0;

    color: var(--cst-muted);

    font-size: .93rem;
    line-height: 1.7;

}


/* ==========================================================
   9. BLOQUE OSCURO
   ========================================================== */

.darkbox {

    padding: 42px;

    color: var(--cst-white);

    background: linear-gradient(
        135deg,
        var(--cst-primary-dark),
        var(--cst-primary)
    );

    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--cst-radius-xxl);

    box-shadow: var(--cst-shadow-lg);

}

.darkbox h2,
.darkbox h3 {

    color: var(--cst-white);

}

.darkbox p {

    color: rgba(255, 255, 255, .75);

}

.darkbox .tag {

    color: var(--cst-primary);

    background: rgba(255, 255, 255, .92);

}

.item {

    display: flex;
    align-items: flex-start;
    gap: 15px;

    padding: 16px 0;

    border-bottom: 1px solid rgba(255, 255, 255, .12);

}

.item:last-child {

    border-bottom: 0;

}

.item > i {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    color: var(--cst-white);

    background: rgba(255, 255, 255, .12);

    border-radius: 13px;

}

.item strong {

    color: var(--cst-white);

}

.item small {

    color: rgba(255, 255, 255, .68);

    line-height: 1.5;

}


/* ==========================================================
   10. PLANES
   ========================================================== */

.plan {

    position: relative;

    display: flex;
    flex-direction: column;

}

.plan .price {

    margin: 18px 0;

}

.plan .check {

    flex-grow: 1;

}

.featured {

    border: 2px solid var(--cst-primary);

    box-shadow: 0 18px 48px rgba(0, 43, 59, .13);

}

.featured:hover {

    border-color: var(--cst-primary);

}

.badge2 {

    position: absolute;
    top: 18px;
    right: 18px;

    padding: 6px 10px;

    color: var(--cst-white);

    background: var(--cst-primary);

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;

}

.price {

    color: var(--cst-primary);

    font-size: 1.35rem;
    font-weight: 800;

}

.check {

    margin: 20px 0 26px;
    padding: 0;

    list-style: none;

}

.check li {

    display: flex;
    align-items: flex-start;

    margin-bottom: 13px;

    color: #56656c;

    line-height: 1.5;

}

.check i {

    margin-top: 4px;
    margin-right: 9px;

    color: var(--cst-success);

}


/* ==========================================================
   11. CONTACTO
   ========================================================== */

.contact {

    height: 100%;

    padding: 40px;

    background: var(--cst-white);

    border: 1px solid var(--cst-border);
    border-radius: var(--cst-radius-xl);

    box-shadow: 0 20px 55px rgba(0, 43, 59, .12);

}

.form-control,
.form-select {

    min-height: 52px;

    padding: 12px 15px;

    color: var(--cst-text);

    background-color: var(--cst-white);

    border: 1px solid #dce5e8;
    border-radius: var(--cst-radius-sm);

    box-shadow: none;

    transition:
        border-color .25s ease,
        box-shadow .25s ease;

}

textarea.form-control {

    min-height: 130px;

    resize: vertical;

}

.form-control::placeholder {

    color: #8a989e;

}

.form-control:focus,
.form-select:focus {

    border-color: var(--cst-accent);

    box-shadow: 0 0 0 .2rem rgba(18, 165, 165, .12);

}


/* ==========================================================
   12. LLAMADO A LA ACCIÓN
   ========================================================== */

.cta {

    padding: 48px;

    color: var(--cst-white);

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(18, 165, 165, .18),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            var(--cst-primary-dark),
            var(--cst-primary)
        );

    border-radius: var(--cst-radius-xl);

    box-shadow: var(--cst-shadow-lg);

}

.cta h2 {

    margin-bottom: 10px;

}

.cta .btn-light {

    color: var(--cst-primary);

    border: 0;
    border-radius: 12px;

    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);

}


/* ==========================================================
   13. FOOTER
   ========================================================== */

.footer {

    padding: 65px 0 25px;

    color: rgba(255, 255, 255, .72);

    background: var(--cst-primary-dark);

}

.footer h4,
.footer h5 {

    color: var(--cst-white);

}

.footer h5 {

    margin-bottom: 18px;

    font-size: 1rem;
    font-weight: 700;

}

.footer p {

    max-width: 500px;

    line-height: 1.7;

}

.footer a {

    display: inline-block;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, .72);

    transition:
        color .25s ease,
        transform .25s ease;

}

.footer a:hover {

    color: var(--cst-white);

    transform: translateX(3px);

}

.footer .logo {

    width: 56px;
    height: 56px;

    display: inline-flex;

    margin-right: 10px;

    vertical-align: middle;

    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);

}

.footer .logo img {

    width: 46px;
    height: 46px;

}

.footer hr {

    opacity: .25;

}


/* ==========================================================
   14. BOTÓN FLOTANTE DE WHATSAPP
   ========================================================== */

.wa {

    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1050;

    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    color: var(--cst-white);

    background: var(--cst-whatsapp);

    border-radius: 50%;

    font-size: 28px;

    box-shadow: 0 12px 30px rgba(37, 211, 102, .35);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        color .25s ease;

}

.wa:hover {

    color: var(--cst-white);

    transform: translateY(-4px) scale(1.04);

    box-shadow: 0 16px 34px rgba(37, 211, 102, .42);

}


/* ==========================================================
   15. RESPONSIVE
   ========================================================== */

@media (max-width: 1199.98px) {

    .hero {

        padding-top: 145px;

    }

    .hero h1 {

        font-size: clamp(2.4rem, 5vw, 4.1rem);

    }

    .darkbox {

        padding: 36px;

    }

}


@media (max-width: 991.98px) {

    .navbar {

        min-height: 82px;

    }

    .navbar-brand {

        font-size: 1rem;

    }

    .logo {

        width: 58px;
        height: 58px;

    }

    .logo img {

        width: 48px;
        height: 48px;

    }

    .navbar-collapse {

        margin-top: 14px;
        padding: 18px;

        background: var(--cst-white);

        border: 1px solid var(--cst-border);
        border-radius: 16px;

        box-shadow: var(--cst-shadow-md);

    }

    .navbar-nav {

        align-items: stretch;

    }

    .nav-link {

        padding: 12px 8px !important;

    }

    .nav-link::after {

        right: 8px;
        left: 8px;

    }

    .navbar-collapse .btn-cst {

        width: 100%;

        margin-top: 12px;
        margin-left: 0 !important;

    }

    .hero {

        padding-top: 135px;

        text-align: center;

    }

    .lead2 {

        margin-right: auto;
        margin-left: auto;

    }

    .mock {

        margin-top: 50px;

        transform: none;

    }

    .mock:hover {

        transform: translateY(-5px);

    }

    .space {

        padding: 78px 0;

    }

    .cta {

        text-align: center;

    }

}


@media (max-width: 767.98px) {

    .hero {

        padding: 125px 0 75px;

    }

    .hero h1 {

        font-size: 2.65rem;
        letter-spacing: -1.2px;

    }

    .lead2 {

        font-size: 1rem;

    }

    .dash {

        grid-template-columns: 58px 1fr;

    }

    .side {

        padding: 18px 8px;

    }

    .main {

        padding: 16px;

    }

    .chart {

        height: 125px;
        gap: 8px;

    }

    .heading {

        margin-bottom: 36px;

    }

    .cardx,
    .contact,
    .darkbox,
    .cta {

        padding: 28px;

    }

    .footer {

        padding-top: 50px;

    }

}


@media (max-width: 575.98px) {

    .navbar {

        min-height: 76px;

    }

    .navbar-brand {

        gap: 9px;

        font-size: .9rem;

    }

    .logo {

        width: 52px;
        height: 52px;

        padding: 4px;

    }

    .logo img {

        width: 44px;
        height: 44px;

    }

    .navbar-toggler {

        width: 42px;
        height: 42px;

    }

    .hero {

        padding-top: 115px;

    }

    .hero h1 {

        font-size: 2.25rem;
        line-height: 1.08;

    }

    .tag {

        font-size: 11px;

    }

    .dash {

        grid-template-columns: 48px 1fr;

    }

    .side {

        padding: 16px 5px;

    }

    .side i {

        margin-bottom: 18px;

        font-size: .9rem;

    }

    .main {

        padding: 12px;

    }

    .kpi {

        padding: 12px;

    }

    .kpi strong {

        font-size: 18px;

    }

    .kpi small {

        font-size: 10px;

    }

    .chart {

        height: 110px;

        padding: 14px;

    }

    .space {

        padding: 65px 0;

    }

    .cardx,
    .contact,
    .darkbox,
    .cta {

        padding: 24px;

        border-radius: 20px;

    }

    .heading h2 {

        font-size: 2rem;

    }

    .featured {

        border-width: 1px;

    }

    .badge2 {

        position: static;

        display: inline-block;

        width: fit-content;

        margin-bottom: 14px;

    }

    .wa {

        right: 16px;
        bottom: 16px;

        width: 54px;
        height: 54px;

        font-size: 25px;

    }

}


/* ==========================================================
   16. ACCESIBILIDAD
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    html {

        scroll-behavior: auto;

    }

    *,
    *::before,
    *::after {

        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;

    }

}

/* ==========================================================
   CAMPUSSAFETRACK AI
   CORRECCIÓN DE COLORES DEL CHAT
   ========================================================== */

#ia .bg-white {

    color: #002b3b !important;

}

#ia .bg-white h1,
#ia .bg-white h2,
#ia .bg-white h3,
#ia .bg-white h4,
#ia .bg-white h5,
#ia .bg-white h6,
#ia .bg-white p,
#ia .bg-white span,
#ia .bg-white small,
#ia .bg-white strong {

    color: #002b3b;

}

#ia .bg-white .text-muted {

    color: #6c757d !important;

}


/* Pregunta del director */

#ia .bg-white > div:nth-of-type(2) {

    color: #002b3b !important;

}

#ia .bg-white > div:nth-of-type(2) p,
#ia .bg-white > div:nth-of-type(2) small,
#ia .bg-white > div:nth-of-type(2) strong {

    color: #002b3b !important;

}


/* Respuesta de CampusSafeTrack AI */

#ia .bg-white > div:nth-of-type(3) {

    color: #002b3b !important;

}

#ia .bg-white > div:nth-of-type(3) p,
#ia .bg-white > div:nth-of-type(3) small,
#ia .bg-white > div:nth-of-type(3) strong {

    color: #002b3b !important;

}

#ia .bg-white > div:nth-of-type(3) .text-muted {

    color: #5f6f76 !important;

}

/* ==========================================================
   MENSAJES DEL ASISTENTE IA
   ========================================================== */

.ai-message {

    border-radius: 18px;

    padding: 20px;

    color: #002b3b;

}

.ai-message p,
.ai-message small,
.ai-message strong {

    color: #002b3b !important;

}

.ai-message-user {

    background: #f1f5f7;

    margin-bottom: 18px;

}

.ai-message-bot {

    background: #e7f4f4;

}

.ai-message-bot .text-muted {

    color: #5f6f76 !important;

}