/* Óptima Cloud Solutions - sitio principal e Insights */
:root {
    --navy: #09263b;
    --blue: #0b70ba;
    --blue-dark: #07558d;
    --teal: #13a89e;
    --mint: #e9f7f5;
    --sky: #f3f8fc;
    --white: #ffffff;
    --text: #294355;
    --muted: #607789;
    --border: #d9e6ef;
    --shadow: 0 12px 32px rgba(9, 38, 59, 0.08);
    --radius: 18px;
    --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, "Helvetica Neue", sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--white);
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(19, 168, 158, .35);
    outline-offset: 2px;
}
.container { width: min(var(--container), calc(100% - 44px)); margin: 0 auto; }
.narrow { max-width: 760px; text-align: center; }
.eyebrow {
    margin: 0 0 10px;
    color: var(--teal);
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.nav-content {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}
.brand { font-size: 1.26rem; font-weight: 700; color: var(--navy); }
.brand span { color: var(--blue); }
.site-nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
    font-weight: 600;
    font-size: .94rem;
}
.site-nav li a:hover, .text-link:hover, .read-link:hover { color: var(--blue); }
.nav-cta {
    display: inline-flex;
    border: 1px solid var(--blue);
    color: var(--blue);
    padding: 9px 17px;
    border-radius: 999px;
}
.hero {
    background: radial-gradient(circle at 92% 16%, rgba(19,168,158,.16), transparent 29%),
                linear-gradient(115deg, var(--sky), var(--white));
    padding: 80px 0 88px;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(290px, .72fr);
    align-items: center;
    gap: 62px;
}
.hero h1 {
    color: var(--navy);
    font-size: clamp(2.55rem, 5vw, 3.7rem);
    letter-spacing: -.055em;
    line-height: 1.08;
    margin: 0 0 22px;
}
.hero-copy {
    max-width: 640px;
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 0 34px;
}
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 23px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(11,112,186,.22);
}
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { border: 1px solid var(--border); color: var(--navy); background: var(--white); }
.hero-card {
    background: var(--white);
    padding: 29px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.hero-card h2 { color: var(--navy); margin: 7px 0 21px; font-size: 1.48rem; line-height: 1.3; }
.card-label { color: var(--blue); font-size: .75rem; font-weight: 700; letter-spacing: .13em; }
.metric { padding: 15px 0; border-top: 1px solid var(--border); display: grid; gap: 3px; }
.metric strong { color: var(--navy); }
.metric span { color: var(--muted); font-size: .91rem; }
.section { padding: 76px 0; }
.section-title { color: var(--navy); margin: 0 0 40px; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.22; letter-spacing: -.035em; }
.cards { display: grid; gap: 22px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.service-card, .article-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .2s, box-shadow .2s;
}
.article-card:hover, .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card h3, .article-card h3 {
    margin: 0 0 13px;
    color: var(--navy);
    font-size: 1.22rem;
    line-height: 1.42;
}
.service-card p, .article-card p { margin: 0; color: var(--muted); }
.muted { background: var(--sky); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.steps span {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--blue);
    background: #deeffb;
    font-weight: 700;
    margin-bottom: 15px;
}
.steps h3 { color: var(--navy); margin: 0 0 7px; }
.steps p { margin: 0; color: var(--muted); }
.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 38px;
}
.section-header .section-title { max-width: 690px; margin-bottom: 0; }
.text-link, .read-link { color: var(--blue); font-weight: 700; white-space: nowrap; }
.tag {
    display: inline-flex;
    padding: 5px 11px;
    background: var(--mint);
    color: #06827a;
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .1em;
    border-radius: 999px;
    margin-bottom: 16px;
}
.article-card p { margin-bottom: 20px; }
.read-link { font-size: .93rem; }
.dark { color: #e7f2f7; background: var(--navy); }
.dark h2 { color: var(--white); margin: 0 0 18px; font-size: clamp(1.8rem, 3vw, 2.45rem); line-height: 1.25; }
.dark p:last-child { color: #c3d7e1; font-size: 1.06rem; }
.contact-grid { display: grid; grid-template-columns: .9fr .85fr; gap: 64px; align-items: start; }
.contact-grid .section-title { margin-bottom: 16px; }
.contact-grid div > p:last-child { color: var(--muted); }
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border);
    padding: 29px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-form label { color: var(--navy); font-size: .93rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px 13px;
    margin: 0 0 11px;
    border-radius: 9px;
    border: 1px solid var(--border);
    font: inherit;
}
.contact-form button {
    border: 0;
    padding: 13px 18px;
    color: var(--white);
    background: var(--blue);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
}
.contact-form button:hover { background: var(--blue-dark); }
.form-note { margin: 8px 0 0; color: var(--muted); font-size: .79rem; }
.site-footer {
    border-top: 1px solid var(--border);
    padding: 27px 0;
    color: var(--muted);
    font-size: .91rem;
}
.footer-row { display: flex; justify-content: space-between; gap: 20px; }
.footer-row p { margin: 0; }
.footer-row a { color: var(--blue); font-weight: 700; }

/* Insights hub */
.page-header {
    padding: 68px 0 56px;
    background: var(--sky);
    text-align: center;
}
.page-header h1 {
    max-width: 780px;
    margin: 0 auto 17px;
    color: var(--navy);
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -.05em;
}
.page-header .lead { max-width: 700px; margin: 0 auto; font-size: 1.08rem; color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 35px; }
.filter-pill {
    display: inline-flex;
    padding: 7px 15px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .89rem;
    color: var(--muted);
}
.filter-pill.active { color: var(--white); background: var(--blue); border-color: var(--blue); }
.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.insights-grid .article-card { min-height: 280px; display: flex; flex-direction: column; }
.article-meta { color: var(--muted); font-size: .83rem; margin-bottom: 14px; }
.insights-grid .read-link { margin-top: auto; }

/* Individual article */
.article-header {
    max-width: 850px;
    margin: 0 auto;
    padding: 62px 22px 32px;
    text-align: center;
}
.article-header h1 {
    color: var(--navy);
    font-size: clamp(2.1rem, 5vw, 3.1rem);
    letter-spacing: -.045em;
    line-height: 1.15;
    margin: 14px 0 18px;
}
.article-header .article-meta { font-size: .94rem; }
.article-layout {
    width: min(820px, calc(100% - 44px));
    margin: 0 auto;
    padding: 24px 0 76px;
}
.article-body { color: var(--text); font-size: 1.05rem; }
.article-body h2 { color: var(--navy); margin: 39px 0 13px; line-height: 1.3; }
.article-body p, .article-body ul { margin: 0 0 21px; }
.article-body ul { padding-left: 23px; }
.article-callout {
    border-left: 4px solid var(--teal);
    background: var(--mint);
    padding: 21px 24px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
    color: var(--navy);
}
.share-box {
    margin-top: 48px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
}
.share-box strong { display: block; color: var(--navy); }
.share-box p { margin: 3px 0 0; font-size: .92rem; color: var(--muted); }
.linkedin-share {
    background: #0a66c2;
    color: var(--white);
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}
.linkedin-share:hover { background: #084f96; }
.article-cta {
    margin-top: 48px;
    padding: 35px;
    text-align: center;
    color: var(--white);
    background: var(--navy);
    border-radius: var(--radius);
}
.article-cta h2 { color: var(--white); margin: 0 0 12px; }
.article-cta p { color: #c3d7e1; margin: 0 0 23px; }

@media (max-width: 900px) {
    .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 42px; }
    .cards.three, .insights-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .container { width: min(var(--container), calc(100% - 32px)); }
    .nav-content { display: block; padding: 17px 0; }
    .site-nav ul { margin-top: 16px; flex-wrap: wrap; gap: 13px 18px; }
    .hero { padding: 54px 0; }
    .hero-grid { grid-template-columns: 1fr; }
    .section { padding: 55px 0; }
    .cards.three, .insights-grid, .steps { grid-template-columns: 1fr; }
    .section-header, .footer-row, .share-box { display: block; }
    .section-header .text-link { display: inline-block; margin-top: 22px; }
    .share-box .linkedin-share { display: inline-flex; margin-top: 18px; }
}

/* =========================================================
   Selector de idioma ES | EN
   ========================================================= */
.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 8px;
    font-size: .86rem;
}

.language-switch span {
    color: var(--border);
}

.language-switch a {
    color: var(--muted);
    font-weight: 700;
    transition: color .2s ease;
}

.language-switch a:hover,
.language-switch .active-lang {
    color: var(--teal);
}

.language-note {
    color: var(--muted);
    font-size: .82rem;
    margin-top: 18px;
}

@media (max-width: 680px) {
    .language-switch {
        margin-left: 0;
    }
}


/* =========================================================
   Identidad visual con color - compatible con sitio ES | EN
   ========================================================= */

:root {
    --navy: #102846;
    --blue: #3566c8;
    --blue-dark: #2450a6;
    --azure: #24a5df;
    --teal: #12a79a;
    --green: #39b98a;
    --gold: #f3b548;
    --mint: #e7f8f5;
    --sky: #f3f7ff;
    --white: #ffffff;
    --text: #294355;
    --muted: #607789;
    --border: #d6e4f1;
    --shadow: 0 15px 34px rgba(16, 40, 70, 0.10);
}

/* Menú superior y selector de idioma */
.site-nav::after {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--azure), var(--teal));
}

.brand span {
    color: var(--blue);
    background: linear-gradient(90deg, var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-cta {
    background: #f7faff;
    transition: background .2s ease, color .2s ease;
}

.nav-cta:hover {
    background: var(--blue);
    color: var(--white) !important;
}

.language-switch .active-lang {
    color: var(--teal);
    background: var(--mint);
    border-radius: 999px;
    padding: 2px 8px;
}

/* Portada */
.hero {
    background:
        radial-gradient(circle at 92% 17%, rgba(36, 165, 223, .18), transparent 28%),
        radial-gradient(circle at 8% 88%, rgba(18, 167, 154, .12), transparent 29%),
        linear-gradient(118deg, #eef5ff 0%, #ffffff 54%, #eefaf7 100%);
}

.button.primary {
    background: linear-gradient(105deg, var(--blue), #4679d6);
    box-shadow: 0 12px 25px rgba(53, 102, 200, .25);
}

.button.primary:hover {
    background: linear-gradient(105deg, var(--blue-dark), var(--blue));
}

.button.secondary:hover {
    background: #f0f6ff;
    border-color: #b9cff0;
}

/* Tarjeta Cloud Optimization */
.hero-card {
    position: relative;
    overflow: hidden;
    padding-top: 35px;
    background: linear-gradient(155deg, #ffffff 0%, #f3f8ff 100%);
    border-color: #cfe0f0;
}

.hero-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7px;
    background: linear-gradient(90deg, var(--blue), var(--azure), var(--teal));
}

.metric {
    position: relative;
    padding-left: 15px;
}

.metric::before {
    content: "";
    position: absolute;
    left: 0;
    top: 19px;
    height: 27px;
    width: 5px;
    border-radius: 8px;
    background: var(--blue);
}

.metric:nth-of-type(2)::before { background: var(--teal); }
.metric:nth-of-type(3)::before { background: var(--gold); }

/* Tarjetas de servicios y artículos */
.service-card,
.article-card {
    position: relative;
    overflow: hidden;
    padding-top: 33px;
}

.service-card::before,
.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 5px;
    width: 100%;
    background: var(--blue);
}

.service-card:nth-child(2)::before,
.article-card:nth-child(2)::before { background: var(--teal); }

.service-card:nth-child(3)::before { background: var(--azure); }
.article-card:nth-child(3)::before { background: var(--gold); }

.service-card:hover,
.article-card:hover {
    border-color: #c5d9ed;
}

/* Metodología */
.muted {
    background: linear-gradient(112deg, #f1f6ff 0%, #effaf8 100%);
}

.steps span {
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 8px 17px rgba(53, 102, 200, .18);
}

.steps div:nth-child(2) span { background: var(--azure); }
.steps div:nth-child(3) span { background: var(--teal); }
.steps div:nth-child(4) span { background: var(--green); }

/* Cloud Insights */
.insights-preview {
    background:
        radial-gradient(circle at 100% 0%, rgba(36, 165, 223, .10), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.tag {
    background: linear-gradient(90deg, #e5f8f4, #e9f2ff);
    color: #087e83;
}

/* Banda institucional */
.dark {
    background:
        radial-gradient(circle at 11% 22%, rgba(36, 165, 223, .18), transparent 27%),
        radial-gradient(circle at 87% 78%, rgba(18, 167, 154, .18), transparent 27%),
        linear-gradient(116deg, #102846, #09334f);
}

/* Contacto y footer */
.contact-form {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.contact-form button {
    background: linear-gradient(105deg, var(--blue), #4679d6);
}

.contact-form button:hover {
    background: linear-gradient(105deg, var(--blue-dark), var(--blue));
}

.site-footer {
    background: #f8fbfe;
}

/* Páginas internas de Insights */
.page-header {
    background:
        radial-gradient(circle at 84% 12%, rgba(18, 167, 154, .15), transparent 29%),
        radial-gradient(circle at 13% 92%, rgba(36, 165, 223, .16), transparent 27%),
        linear-gradient(120deg, #eef5ff, #f4fffc);
}

.article-callout {
    border-left-color: var(--teal);
    background: linear-gradient(90deg, #e8f8f5, #f4fbff);
}

.article-cta {
    background:
        radial-gradient(circle at 100% 0%, rgba(18, 167, 154, .28), transparent 35%),
        linear-gradient(115deg, #102846, #11496c);
}


/* =========================================================
   Optima Cloud Advisor - botón flotante y ventana de chat
   ========================================================= */
.optima-chat-launcher {
    position: fixed; right: 28px; bottom: 27px; z-index: 40;
    display: inline-flex; align-items: center; gap: 9px;
    border: 0; padding: 14px 20px; border-radius: 999px;
    color: var(--white); background: linear-gradient(105deg, var(--blue), #4679d6);
    box-shadow: 0 14px 30px rgba(16, 40, 70, .25);
    font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.optima-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(16, 40, 70, .31); }
.optima-chat-launcher-icon {
    display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--teal); background: var(--white);
}
.optima-chat-widget {
    position: fixed; right: 28px; bottom: 86px; z-index: 41;
    width: min(390px, calc(100vw - 32px)); overflow: hidden;
    border: 1px solid var(--border); border-radius: 21px; background: var(--white);
    box-shadow: 0 19px 48px rgba(16, 40, 70, .20);
}
.optima-chat-widget[hidden] { display: none; }
.optima-chat-header {
    display: flex; align-items: start; justify-content: space-between; gap: 15px;
    padding: 17px 18px; color: var(--white); background: linear-gradient(110deg, var(--navy), #17466e);
}
.optima-chat-title { margin: 0; font-size: .99rem; font-weight: 700; }
.optima-chat-subtitle { margin: 3px 0 0; color: #cadce9; font-size: .77rem; }
.optima-chat-close {
    width: 32px; height: 32px; border: 0; border-radius: 50%;
    color: #d9e6ef; background: transparent; font-size: 1.55rem; line-height: 1; cursor: pointer;
}
.optima-chat-close:hover { background: rgba(255,255,255,.12); color: var(--white); }
.optima-chat-messages { height: 345px; overflow-y: auto; padding: 17px; background: #fbfdff; }
.optima-chat-message {
    max-width: 88%; margin-bottom: 12px; padding: 10px 13px; border-radius: 15px;
    font-size: .91rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word;
}
.optima-chat-message.agent {
    margin-right: auto; color: var(--text); background: var(--white);
    border: 1px solid var(--border); border-bottom-left-radius: 5px;
}
.optima-chat-message.user { margin-left: auto; color: var(--white); background: var(--blue); border-bottom-right-radius: 5px; }
.optima-chat-message.pending { color: var(--muted); font-style: italic; }
.optima-chat-message.error { color: #8e2430; background: #fff3f5; border-color: #f1c7ce; }
.optima-chat-form { padding: 13px 14px 14px; border-top: 1px solid var(--border); background: var(--white); }
.optima-chat-input {
    display: block; width: 100%; min-height: 57px; max-height: 100px; resize: vertical;
    padding: 10px 11px; border: 1px solid var(--border); border-radius: 11px; color: var(--text);
    font: inherit; font-size: .9rem;
}
.optima-chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 9px; }
.optima-chat-note { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.optima-chat-send {
    flex-shrink: 0; border: 0; padding: 9px 15px; border-radius: 9px;
    color: var(--white); background: var(--blue); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.optima-chat-send:hover { background: var(--blue-dark); }
.optima-chat-send:disabled { opacity: .58; cursor: not-allowed; }
.optima-sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* =========================================================
   Canal comercial por WhatsApp
   ========================================================= */
.contact-channel-card {
    display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border);
    padding: 29px; border-radius: var(--radius); background: linear-gradient(180deg, #ffffff 0%, #f7fffc 100%);
    box-shadow: var(--shadow);
}
.contact-channel-label {
    margin: 0; color: var(--teal); font-size: .76rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
}
.contact-channel-card h3 { margin: 0 0 2px; color: var(--navy); font-size: 1.34rem; line-height: 1.35; }
.contact-channel-card > p:not(.contact-channel-label):not(.contact-privacy-note) { margin: 0 0 12px; color: var(--muted); }
.whatsapp-button {
    display: inline-flex; width: fit-content; align-items: center; gap: 10px; padding: 13px 21px;
    border-radius: 999px; color: var(--white); background: #148c58; font-weight: 700;
    transition: transform .2s ease, background .2s ease;
}
.whatsapp-button:hover { color: var(--white); background: #107548; transform: translateY(-2px); }
.whatsapp-button span {
    display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px;
    border-radius: 50%; color: #148c58; background: var(--white); font-size: .72rem;
}
.contact-privacy-note { margin: 11px 0 0; color: var(--muted); font-size: .78rem; }
.optima-chat-whatsapp {
    display: block; margin: 0 14px 14px; padding: 10px 14px; border-radius: 10px;
    color: var(--white); background: #148c58; text-align: center; font-size: .88rem; font-weight: 700;
}
.optima-chat-whatsapp:hover { color: var(--white); background: #107548; }

@media (max-width: 680px) {
    .optima-chat-launcher { right: 16px; bottom: 16px; }
    .optima-chat-widget { right: 16px; bottom: 76px; width: calc(100vw - 32px); }
    .optima-chat-messages { height: min(49vh, 340px); }
}
