:root {
    --blue-900: #042a57;
    --blue-800: #0a3b73;
    --blue-700: #0f4f9a;
    --orange-500: #f57c00;
    --orange-600: #e96a00;
    --gray-50: #f7f8fb;
    --gray-100: #f1f3f7;
    --gray-300: #d3d7e0;
    --text-main: #18324f;
    --white: #ffffff;
    --whatsapp: #25D366;
    --transition-fast: 0.2s ease-in-out;
    --shadow-soft: 0 10px 30px rgba(15, 40, 80, 0.14);
    --radius-xl: 18px;
    --radius-full: 999px;
    --max-width: 1200px;
    --font-main: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Top Bar */

.top-bar {
    background: var(--blue-900);
    color: var(--white);
    font-size: 0.8rem;
    padding: 4px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.top-bar i {
    width: 14px;
    height: 14px;
}

.social-icon {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    transition: var(--transition-fast);
}

.social-icon i {
    width: 14px;
    height: 14px;
}

.social-icon:hover {
    background: var(--white);
    color: var(--blue-900);
}

/* Navbar */

.navbar {
    background: var(--white);
    border-bottom: 3px solid var(--orange-500);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    height: 46px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--blue-900);
    text-transform: uppercase;
}

.brand-sub {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--orange-500);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #555;
    padding-bottom: 4px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-500);
}

.nav-link.active::after,
.nav-link:hover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: var(--orange-500);
    border-radius: 999px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 23px;
    height: 2px;
    background: var(--blue-900);
    border-radius: 4px;
}

/* Hero */

.hero {
    height: 70vh;
    min-height: 460px;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    padding: 24px;
}

.hero-logo {
    width: 140px;
    margin-bottom: 18px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
}

.hero h1 {
    font-size: 2.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.92;
    margin-bottom: 22px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    background: var(--orange-500);
    color: var(--white);
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--orange-600);
    transform: translateY(-1px);
}

/* Secciones generales */

.section {
    padding: 60px 16px;
}

.section-light {
    background: var(--gray-50);
}

.section-title {
    max-width: var(--max-width);
    margin: 0 auto 32px;
    text-align: center;
}

.section-title h2 {
    font-size: 1.7rem;
    color: var(--blue-800);
    margin-bottom: 4px;
}

.section-title p {
    font-size: 0.9rem;
    color: #6b7585;
}

/* Servicios Complementarios */

.services-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1.6fr 1.3fr;
    grid-template-rows: auto auto;
    gap: 24px 40px;
    align-items: center;
}

.service-item {
    text-align: center;
    padding: 10px;
}

.service-item h3 {
    font-size: 1rem;
    margin: 8px 0 4px;
    color: var(--blue-900);
}

.service-item p {
    font-size: 0.85rem;
    color: #555;
}

.service-image {
    grid-row: 1 / span 2;
    display: flex;
    justify-content: center;
}

.service-image img {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    object-fit: cover;
}

.icon-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(245,124,0,0.09);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-500);
}

.icon-circle i {
    width: 30px;
    height: 30px;
}

/* Oferta Académica */

.cards-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-fast);
}

.card-img {
    width: 100%;
    height: 155px;
    overflow: hidden;
}

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

.card h3 {
    font-size: 0.98rem;
    padding: 10px 14px 2px;
    color: var(--blue-900);
}

.card p {
    font-size: 0.8rem;
    padding: 0 14px 10px;
    color: #555;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}

/* Plataformas */

.platforms-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.platform-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 18px 16px 16px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(15,79,154,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    color: var(--blue-800);
}

.platform-icon i {
    width: 26px;
    height: 26px;
}

.platform-card h3 {
    font-size: 0.95rem;
    color: var(--blue-900);
}

.platform-card p {
    font-size: 0.78rem;
    color: #666;
    flex-grow: 1;
}

.platform-btn {
    margin-top: 6px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--orange-500);
    color: var(--white);
    font-size: 0.78rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.platform-btn:hover {
    background: var(--orange-600);
}

/* CTA */

.cta-section {
    text-align: center;
    background: var(--gray-50);
}

.cta-section h2 {
    font-size: 1.5rem;
    color: var(--blue-800);
    margin-bottom: 6px;
}

.cta-section p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 16px;
}

/* Contacto */

.contact-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.contact-box {
    text-align: center;
    font-size: 0.9rem;
    color: #4a5668;
}

.contact-box h2 {
    color: var(--blue-800);
    margin-bottom: 4px;
}

.contact-form {
    max-width: 650px;
    width: 100%;
    background: var(--white);
    padding: 18px 18px 14px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid var(--gray-300);
    font-size: 0.85rem;
    font-family: var(--font-main);
    outline: none;
    transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--blue-700);
    box-shadow: 0 0 0 2px rgba(15,79,154,0.12);
}

.contact-form textarea {
    resize: vertical;
    min-height: 90px;
}

.form-note {
    margin-top: 4px;
    font-size: 0.7rem;
    color: #888;
}

/* Footer */

.footer {
    background: var(--blue-900);
    color: var(--white);
    padding: 32px 16px 18px;
    margin-top: 24px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-logo img {
    width: 70px;
    margin-bottom: 8px;
}

.footer h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.footer p {
    font-size: 0.78rem;
    opacity: 0.95;
}

.footer-social {
    margin: 10px 0 4px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.footer-social a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition-fast);
}

.footer-social i {
    width: 16px;
    height: 16px;
}

.footer-social a:hover {
    background: var(--orange-500);
}

.footer-copy {
    margin-top: 4px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Botones flotantes */

.scroll-top-btn {
    position: fixed;
    bottom: 94px;
    right: 26px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue-800);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 60;
}

.scroll-top-btn i {
    width: 20px;
    height: 20px;
}

.scroll-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* WhatsApp */

.whatsapp-btn {
    position: fixed;
    bottom: 40px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--whatsapp);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: var(--white);
    z-index: 60;
    transition: var(--transition-fast);
}

.whatsapp-btn i {
    width: 24px;
    height: 24px;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

/* Chatbot */

.chatbot-toggle {
    position: fixed;
    bottom: 100px;
    left: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--orange-500);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    z-index: 60;
    transition: var(--transition-fast);
}

.chatbot-toggle i {
    width: 22px;
    height: 22px;
}

.chatbot-toggle:hover {
    background: var(--orange-600);
    transform: translateY(-2px);
}

.chatbot-container {
    position: fixed;
    bottom: 160px;
    left: 26px;
    width: 280px;
    max-height: 380px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    border-radius: 18px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 70;
}

.chatbot-container.open {
    display: flex;
}

.chatbot-header {
    background: var(--blue-800);
    color: var(--white);
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.chatbot-header strong {
    font-size: 0.85rem;
}

.chatbot-header span {
    font-size: 0.7rem;
    opacity: 0.9;
}

.chatbot-header button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

.chatbot-header i {
    width: 16px;
    height: 16px;
}

.chatbot-body {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    font-size: 0.78rem;
    background: var(--gray-50);
}

.chatbot-message {
    margin-bottom: 6px;
    padding: 6px 8px;
    border-radius: 12px;
    max-width: 92%;
}

.chatbot-message.bot {
    background: var(--blue-800);
    color: var(--white);
    border-bottom-left-radius: 3px;
}

.chatbot-message.user {
    background: var(--white);
    border: 1px solid var(--gray-300);
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.chatbot-input-area {
    display: flex;
    padding: 6px;
    gap: 4px;
    border-top: 1px solid var(--gray-300);
    background: var(--white);
}

.chatbot-input-area input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid var(--gray-300);
    padding: 6px 10px;
    font-size: 0.75rem;
    outline: none;
}

.chatbot-input-area button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--orange-500);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chatbot-input-area i {
    width: 14px;
    height: 14px;
}

/* Utilidades */

.d-none-mobile {
    display: inline-flex;
}

/* Responsivo */

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .service-image {
        order: -1;
        grid-row: auto;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar-container {
        padding: 10px 16px;
    }

    .nav-menu {
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        padding: 10px 0 14px;
        box-shadow: 0 6px 12px rgba(0,0,0,0.06);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
    }

    .nav-menu.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-link {
        padding: 6px 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .d-none-mobile {
        display: none;
    }

    .hero {
        height: 65vh;
    }

    .hero h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .platforms-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chatbot-container {
        left: 12px;
        width: 260px;
    }

    .chatbot-toggle {
        left: 12px;
    }

    .scroll-top-btn,
    .whatsapp-btn {
        right: 16px;
    }

    .top-bar {
        padding: 4px 10px;
    }
}

/* ==== FOOTER FINAL ==== */
.footer-gradient {
    background: linear-gradient(135deg, #00285A, #004A93);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: start;
    padding: 0 5%;
}

.footer-column h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 15px;
}

.footer-column p, .footer-column a {
    color: #f1f1f1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-social a {
    margin-right: 10px;
    color: #f1f1f1;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #ff8c00;
}

/* Logo centrado */
.footer-column.center {
    text-align: center;
}

.footer-logo {
    max-width: 140px;
    margin: 0 auto;
    display: block;
}

/* Formulario */
.footer-column.form {
    text-align: left;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
}

.footer-form textarea {
    resize: none;
}

.footer-form .btn-primary {
    width: 100%;
    border: none;
    background-color: #ff8c00;
    color: #fff;
    font-weight: 600;
    border-radius: 20px;
    padding: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.footer-form .btn-primary:hover {
    background-color: #ffa733;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #ccc;
}

/* ==== BOTONES FLOTANTES ==== */
.scroll-top, .whatsapp-btn {
    position: fixed;
    bottom: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top {
    left: 25px;
    background: #ff8c00;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.scroll-top:hover {
    background: #ffa733;
}

.whatsapp-btn {
    right: 25px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.whatsapp-btn:hover {
    background: #33e67d;
}

/* ==== FOOTER FINAL ==== */
.footer-gradient {
    background: linear-gradient(135deg, #00285A, #004A93);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: start;
    padding: 0 5%;
}

.footer-column h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 15px;
}

.footer-column p, .footer-column a {
    color: #f1f1f1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-social a {
    margin-right: 10px;
    color: #f1f1f1;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #ff8c00;
}

/* Logo centrado */
.footer-column.center {
    text-align: center;
}

.footer-logo {
    max-width: 140px;
    margin: 0 auto;
    display: block;
}

/* Formulario */
.footer-column.form {
    text-align: left;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
}

.footer-form textarea {
    resize: none;
}

.footer-form .btn-primary {
    width: 100%;
    border: none;
    background-color: #ff8c00;
    color: #fff;
    font-weight: 600;
    border-radius: 20px;
    padding: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.footer-form .btn-primary:hover {
    background-color: #ffa733;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #ccc;
}

/* ==== BOTONES FLOTANTES ==== */
.scroll-top, .whatsapp-btn {
    position: fixed;
    bottom: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top {
    left: 25px;
    background: #ff8c00;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.scroll-top:hover {
    background: #ffa733;
}

.whatsapp-btn {
    right: 25px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background 0.3s ease;
}

.whatsapp-btn:hover {
    background: #33e67d;
}
