:root {
    --tm-red: #D71920;
    --tm-yellow: #F7C600;
    --tm-blue: #123A7A;
    --tm-blue-dark: #09264f;
    --tm-bg: #f5f7fb;
    --tm-green: #048904;
}

body {
    background: var(--tm-bg);
    color: #172033
}

.navbar-tm {
    background: linear-gradient(90deg, var(--tm-blue-dark), var(--tm-blue) 62%, var(--tm-red));
    box-shadow: 0 3px 18px rgba(9, 38, 79, .18)
}

.navbar-tm .navbar-brand {
    font-weight: 800
}

.navbar-tm .navbar-brand i {
    color: var(--tm-yellow) !important
}

.navbar-tm .nav-link {
    font-weight: 600;
    color: #fff !important
}

.navbar-tm .nav-link:hover {
    color: var(--tm-yellow) !important
}

.navbar-tm .btn-light {
    font-weight: 700;
    border: 0
}

.hero-tm {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--tm-blue-dark), var(--tm-blue) 58%, var(--tm-red));
    color: #fff;
    padding: 76px 0 82px
}

.btn-tm {
    background: var(--tm-red);
    border-color: var(--tm-red);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(215, 25, 32, .25)
}

.btn-tm:hover {
    background: #b9141a;
    border-color: #b9141a;
    color: #fff
}

.btn-wa {
    background: var(--tm-green);
    border-color: var(--tm-green);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(5, 128, 70, 0.25)
}

.btn-wa:hover {
    background: #07a855;
    border-color: #07a855;
    color: #fff
}

.section-title {
    font-weight: 900;
    color: var(--tm-blue-dark)
}

.section-subtitle {
    color: #667085
}

.feature-card,
.tramite-card {
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(9, 38, 79, .07)
}

.feature-card {
    transition: .2s
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(215, 25, 32, .25)
}

.feature-icon,
.tramite-icon {
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--tm-blue), var(--tm-blue-dark));
    color: #fff;
    width: 58px;
    height: 58px;
    font-size: 1.55rem
}

.category-pill {
    background: #fff2b8;
    color: #765d00;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 800;
    display: inline-block
}

.tramite-card {
    height: 100%;
    transition: .2s
}

.tramite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(9, 38, 79, .12)
}

.footer-tm {
    background: var(--tm-blue-dark);
    color: #dbe5f5
}

.tm-slider .carousel-item {
    min-height: 430px
}

.tm-slide {
    min-height: 430px;
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
    background: var(--tm-blue-dark)
}

.tm-slide:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 30%, rgba(247, 198, 0, .45), transparent 22%), radial-gradient(circle at 90% 85%, rgba(215, 25, 32, .45), transparent 28%)
}

.tm-slide .container {
    position: relative;
    z-index: 2
}

.tm-slide-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 60px 0
}

.tm-slide-kicker {
    display: inline-block;
    background: var(--tm-yellow);
    color: #15223d;
    font-weight: 900;
    padding: 7px 12px;
    border-radius: 999px;
    margin-bottom: 16px
}

.tm-slide h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.02
}

.tm-slide p {
    font-size: 1.12rem;
    max-width: 610px;
    color: rgba(255, 255, 255, .88)
}

.tm-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: none;
}

.tm-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(6, 25, 58, .88) 0%,
        rgba(9, 38, 79, .68) 38%,
        rgba(9, 38, 79, .22) 72%,
        rgba(9, 38, 79, .08) 100%
    );
    pointer-events: none;
}

.tm-visual-envios {
    background-image: url('https://images.pexels.com/photos/6169177/pexels-photo-6169177.jpeg?auto=compress&cs=tinysrgb&w=1800');
}

.tm-visual-capacitacion {
    background-image: url('https://images.pexels.com/photos/8197553/pexels-photo-8197553.jpeg?auto=compress&cs=tinysrgb&w=1800');
}

.tm-visual-tramites {
    background-image: url('https://images.pexels.com/photos/8847204/pexels-photo-8847204.jpeg?auto=compress&cs=tinysrgb&w=1800');
}

.tm-visual-evaluaciones {
    background-image: url('https://images.pexels.com/photos/37456293/pexels-photo-37456293.jpeg?auto=compress&cs=tinysrgb&w=1800');
}

.tm-slide-red {
    background: linear-gradient(120deg, #8d0d13, var(--tm-red) 60%, #a92c00)
}

.tm-slide-yellow {
    background: linear-gradient(120deg, #8d6b00, var(--tm-yellow) 62%, #e5a900);
    color: #16213a
}

.tm-slide-yellow .tm-slide p {
    color: #263653
}

.tm-slide-blue {
    background: linear-gradient(120deg, #071d3d, var(--tm-blue) 60%, #1b5ca8)
}

.tm-slide-dark {
    background: linear-gradient(120deg, #0a1930, #17315d 60%, var(--tm-red))
}

.tm-slider .carousel-indicators [data-bs-target] {
    width: 30px;
    height: 5px;
    border: 0;
    border-radius: 5px
}

.tm-slider .carousel-control-prev,
.tm-slider .carousel-control-next {
    width: 7%
}

@media(max-width:991.98px) {

    .tm-slide,
    .tm-slider .carousel-item {
        min-height: 500px
    }

    .tm-visual {
        right: 5%;
        width: 190px;
        height: 190px;
        font-size: 5rem;
        opacity: .9
    }

    .tm-slide-content {
        padding-right: 170px
    }
}

@media(max-width:575.98px) {
    .hero-tm {
        padding: 55px 0 60px
    }

    .tm-slide,
    .tm-slider .carousel-item {
        min-height: 560px
    }

    .tm-visual {
        width: 125px;
        height: 125px;
        right: 22px;
        top: 28%;
        transform: none;
        font-size: 3.5rem;
        border-radius: 25px
    }

    .tm-slide-content {
        padding: 250px 18px 45px
    }

    .tm-slide h2 {
        font-size: 2.25rem
    }

    .tm-slide p {
        font-size: 1rem
    }

    .tm-slider .carousel-control-prev,
    .tm-slider .carousel-control-next {
        width: 10%
    }
}

.contact-section {
    background: #fff;
}

.contact-card {
    border: 1px solid #e6eaf0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(9, 38, 79, .08);
    height: 100%;
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--tm-blue), var(--tm-blue-dark));
    color: #fff;
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.contact-map {
    width: 100%;
    height: 360px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(9, 38, 79, .10);
}

.contact-link {
    color: var(--tm-blue);
    text-decoration: none;
    font-weight: 700;
}

.contact-link:hover {
    color: var(--tm-red);
}

.footer-contact {
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--tm-yellow);
}

@media(max-width:575.98px) {
    .contact-map {
        height: 300px;
    }
}


.services-section {
    background: #f5f7fb;
}

.service-card {
    position: relative;
    height: 100%;
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e6eaf0;
    box-shadow: 0 10px 30px rgba(9, 38, 79, .07);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    overflow: hidden;
}

.service-card:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--tm-red), var(--tm-yellow), var(--tm-blue));
}

.service-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 40px rgba(9, 38, 79, .13);
    border-color: rgba(18, 58, 122, .18);
}

.service-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.service-card-icon.red {
    background: linear-gradient(135deg, #D71920, #8d0d13);
}

.service-card-icon.yellow {
    background: linear-gradient(135deg, #F7C600, #d89f00);
    color: #16213a;
}

.service-card-icon.blue {
    background: linear-gradient(135deg, #123A7A, #09264f);
}

.service-card-icon.mix {
    background: linear-gradient(135deg, #123A7A, #D71920);
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 850;
    color: var(--tm-blue-dark);
}

.service-card p {
    color: #667085;
    min-height: 52px;
}

.service-card .service-btn {
    font-weight: 800;
    color: var(--tm-blue);
    text-decoration: none;
}

.service-card .service-btn:hover {
    color: var(--tm-red);
}

.curso-card {
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(9, 38, 79, .07);
    transition: transform .22s ease, box-shadow .22s ease;
}

.curso-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 40px rgba(9, 38, 79, .13);
}

.curso-card-media {
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tm-blue-dark), var(--tm-blue));
}

.curso-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.curso-card-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--tm-blue), var(--tm-red));
}

.curso-card-body {
    padding: 24px;
}

.curso-price {
    color: var(--tm-blue);
    font-size: 1.25rem;
    font-weight: 900;
}

.curso-meta {
    color: #667085;
    font-size: .9rem;
}


/* Redes sociales y WhatsApp flotante - añadido sin modificar el diseño existente */
.social-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
}

.social-float a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 7px 20px rgba(0,0,0,.22);
    transition: transform .2s ease, box-shadow .2s ease;
}

.social-float a:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 25px rgba(0,0,0,.30);
}

.social-float .whatsapp {
    width: 58px;
    height: 58px;
    background: #25D366;
    font-size: 1.75rem;
}

.social-float .facebook {
    background: #1877F2;
    font-size: 1.25rem;
}

.social-float .tiktok {
    background: #111;
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .social-float {
        right: 12px;
        bottom: 12px;
        gap: 7px;
    }

    .social-float a {
        width: 44px;
        height: 44px;
    }

    .social-float .whatsapp {
        width: 52px;
        height: 52px;
    }
}