/* ============================================
   Tecnoteca Web V2 - Pixel-Perfect desde Figma Dev Mode
   Font: Raleway | Bootstrap 5.3
   Base: 1440px desktop
   ============================================ */

:root {
    --bg-main: #010101;
    --bg-dark: #131217;
    --bg-black: #141414;
    --grad-start: #0d0d0f;
    --grad-end: #1a1a1c;
    --magenta: #e40d7e;
    --cyan: #189cd9;
    --yellow: #feeb17;
    --gray: #d9d9d9;
    --white: #fafafa;
    --pure-white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Raleway', sans-serif;
    background: var(--bg-main);
    color: var(--white);
    overflow-x: hidden;
}

/* ============ NAVBAR ============ */

.tec-navbar {
    background: transparent;
    padding: 16px 40px;
    transition: background 0.3s ease;
    z-index: 1000;
}

.tec-navbar.scrolled {
    background: rgba(1, 1, 1, 0.92);
    backdrop-filter: blur(10px);
}

.tec-logo {
    width: 322px;
    height: 77px;
    object-fit: contain;
}

.tec-navbar .nav-link {
    font-weight: 500;
    font-size: 20px;
    line-height: 23.5px;
    color: var(--white);
    text-align: center;
    padding: 8px 14px !important;
    transition: color 0.2s;
}

.tec-navbar .nav-link:hover {
    color: var(--cyan);
}

.tec-btn-aula {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 193px;
    height: 51px;
    background: var(--magenta);
    border-radius: 72px;
    color: var(--white);
    font-weight: 700;
    font-size: 24px;
    line-height: 28.2px;
    text-decoration: none;
    border: none;
    transition: all 0.3s;
}

.tec-btn-aula:hover {
    background: #c00a6a;
    color: var(--pure-white);
    transform: translateY(-1px);
}

/* ============ HERO ============ */

.tec-hero {
    position: relative;
    width: 100%;
}

.tec-hero-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

a.carousel-item {
    text-decoration: none;
}

.tec-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tec-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(128, 0, 128, 0.65) 0%,
        rgba(20, 20, 20, 0.45) 50%,
        rgba(24, 156, 217, 0.45) 100%
    );
}

.tec-hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    padding: 0 clamp(20px, 5vw, 80px);
    max-width: clamp(320px, 50vw, 750px);
}

.tec-hero-logos {
    position: absolute;
    z-index: 2;
    right: clamp(30px, 5vw, 80px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}

.tec-hero-logos a {
    display: block;
    transition: opacity 0.3s;
}

.tec-hero-logos a:hover {
    opacity: 0.8;
}

.tec-hero-logos img {
    max-width: clamp(200px, 28vw, 420px);
    height: auto;
}

.tec-hero-label {
    display: inline-block;
    font-weight: 700;
    font-size: clamp(18px, 1.5vw, 28px);
    line-height: 1.2;
    color: var(--yellow);
    margin-bottom: clamp(10px, 1vw, 16px);
}

.tec-hero-title {
    font-weight: 900;
    font-size: clamp(40px, 5vw, 72px);
    line-height: 1;
    color: var(--white);
    opacity: 0.80;
    margin-bottom: clamp(14px, 1.5vw, 20px);
}

.tec-hero-desc {
    font-weight: 500;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.3;
    color: var(--white);
    font-style: italic;
    margin-bottom: clamp(20px, 2vw, 32px);
}

.tec-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(28px, 2.5vw, 40px);
    height: clamp(50px, 4.5vw, 65px);
    background: var(--magenta);
    border-radius: clamp(10px, 1vw, 15px);
    color: var(--white);
    font-weight: 700;
    font-size: clamp(20px, 1.8vw, 26px);
    line-height: 1.2;
    text-decoration: none;
    border: none;
    transition: all 0.3s;
}

.tec-btn-cta:hover {
    background: #c00a6a;
    color: var(--pure-white);
    transform: translateY(-2px);
}

/* Hero carousel indicators */
.tec-hero .carousel-indicators {
    bottom: 30px;
    margin-bottom: 0;
}

.tec-hero .carousel-indicators button {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gray);
    opacity: 0.20;
    border: none;
    margin: 0 10px;
    transition: opacity 0.3s;
}

.tec-hero .carousel-indicators button.active {
    background: var(--gray);
    opacity: 1;
}

/* ============ CARDS PRINCIPALES ============ */

.tec-cards-main {
    padding: 80px 0;
    background: var(--bg-main);
}

.tec-cards-main .container {
    max-width: 1280px;
}

.tec-card-main-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.tec-card-main-col {
    display: flex;
    width: calc(50% - 15px);
    max-width: 600px;
}

.tec-card-accent {
    width: 15px;
    flex-shrink: 0;
    border-radius: 3px 0 0 3px;
}

.tec-accent-yellow { background: var(--yellow); }
.tec-accent-blue {
    background: var(--cyan);
    width: 16px;
}

.tec-card-main-body {
    flex: 1;
    padding: 0 0 0 24px;
    display: flex;
    flex-direction: column;
}

.tec-card-main-title {
    font-weight: 700;
    font-size: 42px;
    line-height: 49.3px;
    color: var(--white);
    margin-bottom: 8px;
}

.tec-card-main-desc {
    font-weight: 400;
    font-size: 30px;
    line-height: 44px;
    color: var(--white);
    margin-bottom: 16px;
}

.tec-card-main-img {
    position: relative;
    width: 564px;
    max-width: 100%;
    height: 273px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-black);
    border-radius: 11px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.tec-card-main-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 11px;
}

.tec-card-icon {
    position: relative;
    z-index: 2;
    width: 179px;
    height: 177px;
    object-fit: contain;
}

.tec-card-icon-aliados {
    width: 175px;
    height: 173px;
}

.tec-card-main-link {
    font-weight: 700;
    font-size: 32px;
    line-height: 44px;
    color: var(--pure-white);
    text-decoration: none;
    transition: color 0.2s;
}

.tec-card-main-link:hover {
    color: var(--cyan);
}

/* ============ CARDS SECUNDARIAS ============ */

.tec-cards-secondary {
    padding: 40px 0 80px;
    background: var(--bg-main);
}

.tec-cards-secondary .container {
    max-width: 1280px;
}

.tec-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.tec-card-sec {
    background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
    border-radius: 10px;
    padding: 36px 30px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}
a.tec-card-sec *,
a.tec-card-sec:hover * {
    text-decoration: none !important;
    color: inherit;
}

.tec-card-sec:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.tec-card-sec-lg {
    min-height: 256px;
}

.tec-card-sec-sm {
    min-height: 213px;
}

.tec-card-sec-icon {
    width: 124px;
    height: 124px;
    flex-shrink: 0;
    object-fit: contain;
}

.tec-card-sec-icon-sm {
    width: 110px;
    height: 110px;
}

.tec-card-sec-title {
    font-weight: 700;
    font-size: 40px;
    line-height: 47px;
    color: var(--white);
    margin-bottom: 10px;
}

.tec-card-sec-desc {
    font-weight: 400;
    font-size: 26px;
    line-height: 44px;
    color: var(--white);
    margin-bottom: 0;
}

/* ============ CARRUSEL ALIADOS ============ */

.tec-aliados {
    padding: 80px 0;
    background: var(--bg-main);
}

.tec-aliados .container {
    max-width: 1280px;
}

.tec-aliados-title {
    font-weight: 700;
    font-size: 42px;
    line-height: 49.3px;
    color: var(--white);
    font-style: italic;
    margin-bottom: 10px;
}

.tec-aliados-desc {
    font-weight: 400;
    font-size: 26px;
    line-height: 44px;
    color: var(--white);
    margin-bottom: 30px;
}

.tec-aliados-belt {
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
    padding: 24px 0;
}

.tec-aliados-track {
    display: flex;
    gap: 32px;
    width: max-content;
    animation: aliados-scroll 40s linear infinite;
}

.tec-aliados-belt:hover .tec-aliados-track {
    animation-play-state: paused;
}

@keyframes aliados-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.tec-aliado-slide {
    flex-shrink: 0;
    width: 160px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tec-aliado-slide img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.tec-aliado-slide img:hover {
    opacity: 1;
}

.tec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray);
    opacity: 0.20;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.tec-dot.active {
    opacity: 1;
}

/* ============ CONTACTO ============ */

.tec-contacto {
    padding: 80px 0;
    background: var(--bg-main);
}

.tec-contacto .container {
    max-width: 1280px;
}

.tec-contacto-title {
    font-weight: 700;
    font-size: 42px;
    line-height: 49.3px;
    color: var(--white);
    font-style: italic;
    margin-bottom: 12px;
}

.tec-contacto-desc {
    font-weight: 400;
    font-size: 26px;
    line-height: 44px;
    color: var(--white);
    font-style: italic;
    margin-bottom: 40px;
}

.tec-form-grid {
    display: grid;
    grid-template-columns: 453px 1fr;
    gap: 30px;
    align-items: start;
}

.tec-form-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tec-input {
    width: 100%;
    height: 50px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    color: var(--pure-white);
    padding: 14px 18px;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 21.1px;
    transition: border-color 0.2s;
}

.tec-input::placeholder {
    color: rgba(255, 255, 255, 0.30);
    font-weight: 400;
}

.tec-input:focus {
    background: var(--bg-dark);
    border-color: var(--cyan);
    color: var(--pure-white);
    box-shadow: 0 0 0 2px rgba(24, 156, 217, 0.15);
    outline: none;
}

.tec-textarea {
    height: 100%;
    min-height: 185px;
    resize: none;
}

.tec-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.tec-btn-enviar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 193px;
    height: 51px;
    background: var(--cyan);
    border-radius: 72px;
    color: var(--white);
    font-weight: 700;
    font-size: 24px;
    line-height: 28.2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.tec-btn-enviar:hover {
    background: #1486bb;
    color: var(--pure-white);
    transform: translateY(-2px);
}

/* ============ FOOTER ============ */

.tec-footer {
    background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
    padding: 60px 0 30px;
}

.tec-footer .container {
    max-width: 1280px;
}

.tec-footer-grid {
    display: grid;
    grid-template-columns: 385px 1fr auto;
    gap: 40px;
    align-items: start;
}

.tec-footer-map {
    width: 385px;
    height: 405px;
    border-radius: 10px;
    overflow: hidden;
}

.tec-footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
}

.tec-footer-datos {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
}

.tec-footer-dato {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tec-footer-dato-text {
    font-weight: 500;
    font-size: 21px;
    line-height: 27px;
    color: var(--white);
}

.tec-footer-icon {
    width: 35px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.tec-footer-social {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.tec-social-icon {
    width: 37px;
    height: 37px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.tec-social-icon:hover {
    opacity: 1;
}

.tec-footer-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
}

.tec-footer-logo-muni {
    width: 399px;
    max-width: 100%;
    height: auto;
}

.tec-footer-logo-sf {
    width: 390px;
    max-width: 100%;
    height: auto;
}

.tec-footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
    margin: 30px 0 20px;
}

.tec-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tec-footer-copy {
    font-weight: 400;
    font-size: 20px;
    line-height: 27px;
    color: var(--white);
    opacity: 0.44;
}

.tec-footer-legal {
    font-weight: 400;
    font-size: 20px;
    line-height: 27px;
    color: var(--white);
    opacity: 0.44;
}

/* ============ DROPDOWN NAVBAR ============ */

.tec-dropdown {
    background: rgba(13, 13, 15, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 220px;
    margin-top: 0 !important;
    padding-top: 12px;
}

.tec-dropdown .dropdown-item {
    color: var(--white);
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 20px;
    transition: all 0.2s;
}

.tec-dropdown .dropdown-item:hover,
.tec-dropdown .dropdown-item:focus {
    background: rgba(228, 13, 126, 0.15);
    color: var(--magenta);
}

.tec-navbar .dropdown-toggle::after {
    display: none;
}

/* Hover show en desktop */
@media (min-width: 992px) {
    .tec-navbar .nav-item.dropdown:hover > .tec-dropdown {
        display: block;
    }
    .tec-navbar .dropdown-toggle {
        white-space: normal;
    }
}

/* ============ PAGINAS INSTITUCIONALES ============ */

.tec-page-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, #131217 0%, #1a1a2e 50%, #131217 100%);
    text-align: center;
}

.tec-page-hero-title {
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 12px;
}

.tec-page-hero-desc {
    font-size: 1.1rem;
    color: #999;
    max-width: 700px;
    margin: 0 auto;
}

.tec-inst-content {
    padding: 60px 0 80px;
    background: var(--bg-black);
}

.tec-inst-content .container {
    max-width: 900px;
}

.tec-inst-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 20px;
}

.tec-inst-content h2 {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--white);
    margin: 40px 0 16px;
}

.tec-inst-content h3 {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--cyan);
    margin: 30px 0 12px;
}

.tec-inst-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.tec-inst-content ul li {
    padding: 8px 0 8px 24px;
    color: #ccc;
    font-size: 1rem;
    position: relative;
    line-height: 1.7;
}

.tec-inst-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--magenta);
}

.tec-inst-highlight {
    background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
    border-left: 4px solid var(--magenta);
    border-radius: 12px;
    padding: 28px;
    margin: 30px 0;
    transition: transform 0.3s;
}

.tec-inst-highlight:hover {
    transform: translateY(-3px);
}

.tec-inst-highlight p {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 8px;
}

.tec-inst-highlight p strong {
    color: var(--white);
    font-size: 1.1rem;
}

.tec-inst-highlight p:last-child {
    margin-bottom: 0;
}

.tec-inst-img {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
}

.tec-inst-subnav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.tec-inst-subnav a {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tec-inst-subnav a:hover,
.tec-inst-subnav a.active {
    background: var(--magenta);
    border-color: var(--magenta);
    color: var(--pure-white);
}

/* Cards de servicios */
.tec-serv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 40px 0;
}

.tec-serv-card {
    background: linear-gradient(180deg, var(--grad-start), var(--grad-end));
    border-radius: 12px;
    padding: 28px;
    border-left: 4px solid var(--cyan);
    transition: transform 0.3s;
}

.tec-serv-card:hover {
    transform: translateY(-3px);
}

.tec-serv-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.tec-serv-card p {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 0;
    line-height: 1.6;
}

.tec-serv-card .tec-evento-fecha {
    color: var(--magenta);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Grid aliados logos */
.tec-aliados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px;
    margin: 40px 0;
}

.tec-aliado-logo {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
}

.tec-aliado-logo:hover {
    transform: translateY(-3px);
    border-color: rgba(228, 13, 126, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.tec-aliado-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.3s;
}

.tec-aliado-logo:hover img {
    filter: brightness(1.1);
}

/* CTA section */
.tec-inst-cta {
    text-align: center;
    padding: 40px 0;
}

.tec-inst-cta .tec-btn-cta {
    display: inline-flex;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1350px) {
    .tec-aliados-belt { gap: 10px; }
}

@media (max-width: 1199px) {
    .tec-logo { width: 240px; height: auto; }
    .tec-navbar .nav-link { font-size: 16px; padding: 8px 10px !important; }
    .tec-btn-aula { width: 160px; height: 44px; font-size: 20px; }

    .tec-card-main-title { font-size: 34px; line-height: 42px; }
    .tec-card-main-desc { font-size: 24px; line-height: 36px; }
    .tec-card-main-img { height: 230px; }
    .tec-card-icon { width: 140px; height: 138px; }
    .tec-card-main-link { font-size: 26px; }

    .tec-card-sec-title { font-size: 32px; line-height: 40px; }
    .tec-card-sec-desc { font-size: 22px; line-height: 36px; }
    .tec-card-sec-icon { width: 100px; height: 100px; }

    .tec-aliados-title { font-size: 34px; }
    .tec-aliados-desc { font-size: 22px; }

    .tec-contacto-title { font-size: 34px; }
    .tec-contacto-desc { font-size: 22px; }
    .tec-form-grid { grid-template-columns: 1fr 1fr; }

    .tec-footer-grid { grid-template-columns: 300px 1fr auto; gap: 30px; }
    .tec-footer-map { width: 300px; height: 340px; }
    .tec-footer-logo-muni, .tec-footer-logo-sf { width: 300px; }
}

@media (max-width: 991px) {
    /* --- Fullscreen overlay menu --- */
    .tec-navbar .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: rgba(1, 1, 1, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 100px 32px 40px;
        margin: 0;
        overflow-y: auto;
        z-index: 999;
        display: none;
    }
    .tec-navbar .navbar-collapse.collapsing {
        display: flex;
        flex-direction: column;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .tec-navbar .navbar-collapse.show {
        display: flex;
        flex-direction: column;
        animation: menuFadeIn 0.35s ease forwards;
    }
    @keyframes menuFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    /* Stagger de entrada para cada nav-item */
    .tec-navbar .navbar-collapse.show .nav-item {
        animation: navItemSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
    }
    .tec-navbar .navbar-collapse.show .nav-item:nth-child(1) { animation-delay: 0.05s; }
    .tec-navbar .navbar-collapse.show .nav-item:nth-child(2) { animation-delay: 0.1s; }
    .tec-navbar .navbar-collapse.show .nav-item:nth-child(3) { animation-delay: 0.15s; }
    .tec-navbar .navbar-collapse.show .nav-item:nth-child(4) { animation-delay: 0.2s; }
    .tec-navbar .navbar-collapse.show .nav-item:nth-child(5) { animation-delay: 0.25s; }
    .tec-navbar .navbar-collapse.show .tec-btn-aula { animation: navItemSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both; }
    @keyframes navItemSlide {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .tec-navbar .navbar-toggler { z-index: 1001; position: relative; }
    .tec-navbar .navbar-brand { z-index: 1001; position: relative; }

    /* --- Nav items --- */
    .tec-navbar .navbar-nav {
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 0 !important;
        align-items: flex-start !important;
    }
    .tec-navbar .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.06);
        width: 100%;
    }
    .tec-navbar .nav-item:last-child {
        border-bottom: none;
    }
    .tec-navbar .nav-item > .nav-link {
        padding: 18px 0;
        font-size: clamp(18px, 4.5vw, 22px);
        font-weight: 600;
        text-align: left;
        display: block;
        width: 100%;
        white-space: normal;
        word-wrap: break-word;
    }
    .tec-navbar .dropdown-toggle {
        padding: 18px 0;
        font-size: clamp(18px, 4.5vw, 22px);
        font-weight: 600;
        letter-spacing: 0.02em;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 10px;
        white-space: normal;
        word-wrap: break-word;
    }
    .tec-navbar .dropdown-toggle::after {
        display: inline-block !important;
        content: '';
        border: none;
        width: 8px;
        height: 8px;
        border-right: 2px solid rgba(255,255,255,0.3);
        border-bottom: 2px solid rgba(255,255,255,0.3);
        transform: rotate(45deg);
        transition: transform 0.3s ease, border-color 0.3s ease;
        margin-left: 12px;
        flex-shrink: 0;
    }
    .tec-navbar .nav-item.dropdown.open > .dropdown-toggle::after {
        transform: rotate(-135deg);
        border-color: var(--magenta);
    }

    /* --- Dropdown sub-items con slide animation --- */
    .tec-dropdown {
        position: static !important;
        background: transparent;
        border: none;
        backdrop-filter: none;
        padding: 0;
        margin: 0 !important;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        opacity: 0;
        display: block !important;
    }
    .tec-dropdown.show {
        max-height: 400px;
        padding-bottom: 12px;
        opacity: 1;
    }
    .tec-dropdown .dropdown-item {
        font-size: 17px;
        font-weight: 400;
        padding: 11px 0 11px 24px;
        color: rgba(255,255,255,0.55);
        border-left: 2px solid rgba(255,255,255,0.08);
        margin-left: 4px;
        transition: color 0.2s, border-color 0.2s,
                    transform 0.3s ease, opacity 0.3s ease;
        transform: translateX(-8px);
        opacity: 0;
    }
    .tec-dropdown.show .dropdown-item {
        transform: translateX(0);
        opacity: 1;
    }
    .tec-dropdown.show .dropdown-item:nth-child(1) { transition-delay: 0.05s; }
    .tec-dropdown.show .dropdown-item:nth-child(2) { transition-delay: 0.1s; }
    .tec-dropdown.show .dropdown-item:nth-child(3) { transition-delay: 0.15s; }
    .tec-dropdown.show .dropdown-item:nth-child(4) { transition-delay: 0.2s; }
    .tec-dropdown.show .dropdown-item:nth-child(5) { transition-delay: 0.25s; }
    .tec-dropdown .dropdown-item:hover,
    .tec-dropdown .dropdown-item:focus,
    .tec-dropdown .dropdown-item:active {
        color: var(--magenta);
        background: transparent;
        border-left-color: var(--magenta);
    }

    /* --- Aula virtual button mobile --- */
    .tec-navbar .tec-btn-aula {
        margin-top: 28px;
        width: 100%;
        font-size: 20px;
        height: 52px;
    }
    .tec-card-main-wrapper { flex-direction: column; align-items: center; }
    .tec-card-main-col { width: 100%; max-width: 600px; }

    .tec-cards-grid { grid-template-columns: 1fr; }
    .tec-card-sec-lg, .tec-card-sec-sm { min-height: auto; }

    .tec-aliados-belt { gap: 8px; }

    .tec-form-grid { grid-template-columns: 1fr; }

    .tec-footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .tec-footer-map { width: 100%; max-width: 400px; height: 300px; }
    .tec-footer-datos { align-items: center; }
    .tec-footer-social { justify-content: center; }
    .tec-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 767px) {
    .tec-serv-grid { grid-template-columns: 1fr; }
    .tec-page-hero { padding: 120px 0 40px; }
    .tec-page-hero-title { font-size: 1.8rem; }
    .tec-inst-content { padding: 40px 0 60px; }
    .tec-card-main-title { font-size: 28px; }
    .tec-card-main-desc { font-size: 20px; line-height: 30px; }
    .tec-card-main-img { height: 200px; }
    .tec-card-icon { width: 110px; height: 108px; }
    .tec-card-main-link { font-size: 22px; }

    .tec-card-sec { flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; }
    .tec-card-sec-title { font-size: 28px; line-height: 34px; }
    .tec-card-sec-desc { font-size: 20px; line-height: 30px; }
    .tec-card-sec-icon, .tec-card-sec-icon-sm { width: 80px; height: 80px; }

    .tec-aliados-title { font-size: 28px; }
    .tec-aliados-desc { font-size: 18px; line-height: 28px; }
    .tec-aliado-slide { width: 130px; height: 70px; }
    .tec-aliado-slide img { max-height: 55px; }
    .tec-aliados-track { gap: 20px; }

    .tec-contacto-title { font-size: 28px; }
    .tec-contacto-desc { font-size: 18px; line-height: 28px; }

    .tec-footer-dato-text { font-size: 18px; }
    .tec-footer-logo-muni, .tec-footer-logo-sf { width: 250px; }
    .tec-footer-copy, .tec-footer-legal { font-size: 16px; }
}

/* ============ LARGE DESKTOP (>1440px) ============ */

@media (min-width: 1441px) {
    /* Navbar — limitar ancho interno, fondo full-width */
    .tec-navbar .container-fluid { max-width: 1440px; margin: 0 auto; }

    /* Cards principales */
    .tec-cards-main .container { max-width: 1500px; }
    .tec-card-main-col { max-width: 700px; }
    .tec-card-main-title { font-size: 48px; line-height: 56px; }
    .tec-card-main-desc { font-size: 34px; line-height: 48px; }
    .tec-card-main-img { height: 320px; }
    .tec-card-icon { width: 210px; height: 208px; }
    .tec-card-icon-aliados { width: 205px; height: 203px; }
    .tec-card-main-link { font-size: 36px; }

    /* Cards secundarias */
    .tec-cards-secondary .container { max-width: 1500px; }
    .tec-card-sec-title { font-size: 46px; line-height: 54px; }
    .tec-card-sec-desc { font-size: 30px; line-height: 48px; }
    .tec-card-sec-icon { width: 145px; height: 145px; }
    .tec-card-sec-icon-sm { width: 130px; height: 130px; }
    .tec-card-sec-lg { min-height: 300px; }
    .tec-card-sec-sm { min-height: 250px; }

    /* Aliados */
    .tec-aliados .container { max-width: 1500px; }
    .tec-aliados-title { font-size: 48px; line-height: 56px; }
    .tec-aliados-desc { font-size: 30px; }
    .tec-aliado-slide { width: 180px; height: 100px; }
    .tec-aliado-slide img { max-height: 80px; }

    /* Contacto */
    .tec-contacto .container { max-width: 1500px; }
    .tec-contacto-title { font-size: 48px; line-height: 56px; }
    .tec-contacto-desc { font-size: 30px; }
    .tec-form-grid { grid-template-columns: 540px 1fr; }
    .tec-input { height: 56px; font-size: 20px; }
    .tec-textarea { min-height: 210px; }
    .tec-btn-enviar { width: 220px; height: 56px; font-size: 26px; }

    /* Footer */
    .tec-footer .container { max-width: 1500px; }
    .tec-footer-grid { grid-template-columns: 450px 1fr auto; }
    .tec-footer-map { width: 450px; height: 470px; }
    .tec-footer-dato-text { font-size: 24px; line-height: 32px; }
    .tec-footer-icon { width: 40px; }
    .tec-social-icon { width: 42px; height: 42px; }
    .tec-footer-logo-muni { width: 450px; }
    .tec-footer-logo-sf { width: 440px; }
    .tec-footer-copy, .tec-footer-legal { font-size: 22px; }
}

/* ============ MOBILE PORTRAIT (<576px) ============ */

@media (max-width: 576px) {
    /* Navbar */
    .tec-navbar { padding: 10px 12px; }
    .tec-logo { width: 180px; height: auto; }
    .tec-btn-aula { width: 140px; height: 40px; font-size: 16px; }

    /* Hero — fix corte derecha + gap con navbar */
    .tec-hero-slide { border-radius: 0; }
    .tec-hero-overlay { border-radius: 0; }

    /* Logos institucionales arriba del texto */
    .tec-hero-logos {
        top: 18%;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 16px;
    }
    .tec-hero-logos img {
        max-width: 42vw;
    }
    .tec-hero-content {
        top: 55%;
        max-width: 100%;
    }

    .tec-hero .carousel-indicators { bottom: 16px; }
    .tec-hero .carousel-indicators button { width: 10px; height: 10px; margin: 0 6px; }

    /* Cards principales */
    .tec-cards-main { padding: 40px 0; }
    .tec-card-main-wrapper { gap: 20px; }
    .tec-card-main-col { flex-direction: column; }
    .tec-card-accent { width: 100%; height: 6px; border-radius: 3px 3px 0 0; }
    .tec-card-main-body { padding: 16px; }
    .tec-card-main-title { font-size: 22px; line-height: 28px; }
    .tec-card-main-desc { font-size: 16px; line-height: 24px; }
    .tec-card-main-img { height: 160px; }
    .tec-card-icon { width: 80px; height: 78px; }
    .tec-card-icon-aliados { width: 76px; height: 74px; }
    .tec-card-main-link { font-size: 18px; line-height: 28px; }

    /* Cards secundarias — ancho completo */
    .tec-cards-secondary { padding: 20px 0 40px; }
    .tec-cards-grid { gap: 16px; }
    .tec-card-sec { padding: 20px 16px; gap: 16px; }
    .tec-card-sec-title { font-size: 22px; line-height: 28px; }
    .tec-card-sec-desc { font-size: 16px; line-height: 24px; }
    .tec-card-sec-icon, .tec-card-sec-icon-sm { width: 60px; height: 60px; }

    /* Aliados — fix logos no visibles */
    .tec-aliados { padding: 40px 0; }
    .tec-aliados-title { font-size: 22px; line-height: 28px; }
    .tec-aliados-desc { font-size: 16px; line-height: 24px; }
    .tec-aliados-belt { margin: 0; padding: 16px 0; }
    .tec-aliado-slide { width: 110px; height: 60px; padding: 6px; }
    .tec-aliado-slide img { max-height: 45px; }
    .tec-aliados-track { gap: 14px; }

    /* Contacto */
    .tec-contacto { padding: 40px 0; }
    .tec-contacto-title { font-size: 22px; }
    .tec-contacto-desc { font-size: 16px; line-height: 24px; margin-bottom: 24px; }
    .tec-input { height: 44px; font-size: 15px; padding: 10px 14px; }
    .tec-textarea { min-height: 140px; }
    .tec-btn-enviar { width: 160px; height: 44px; font-size: 20px; }

    /* Footer — mapa 100% ancho */
    .tec-footer { padding: 40px 0 20px; }
    .tec-footer-grid { gap: 24px; }
    .tec-footer-map { width: 100%; max-width: 100%; height: 220px; }
    .tec-footer-dato { gap: 12px; }
    .tec-footer-dato-text { font-size: 15px; line-height: 22px; }
    .tec-footer-icon { width: 28px; }
    .tec-footer-logo-muni, .tec-footer-logo-sf { width: 200px; }
    .tec-footer-copy, .tec-footer-legal { font-size: 13px; }
}
