/* =========================================================
   KEYSCITI - AGENTE DE OPORTUNIDADES
   Paleta oficial KeysCITI Construcción
   Amarillo usado SOLO como acento
========================================================= */

:root{
    --blue:#0E3A6B;
    --blue-dark:#122A50;
    --blue-deep:#112763;

    --yellow:#FFC900;

    --white:#FFFFFF;
    --offwhite:#FAFBFC;
    --light:#F4F6F8;

    --text:#122A50;
    --grey:#687482;
    --line:#E8EDF2;

    --success:#1E7E34;
    --success-bg:#2EA043;
    --danger:#D0342C;

    --shadow:
        0 18px 50px rgba(18,42,80,.10);

    --shadow-soft:
        0 10px 30px rgba(18,42,80,.07);

    --shadow-card:
        0 14px 35px rgba(18,42,80,.08);

    --max-width:1380px;
    --radius:18px;
}

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:"Manrope",sans-serif;
    color:var(--text);
    background:#fff;
    overflow-x:hidden;
}

body.no-scroll{
    overflow:hidden;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
select,
textarea{
    font-family:inherit;
}

img{
    display:block;
    width:100%;
}

.container{
    width:min(92%,var(--max-width));
    margin:auto;
}

.visually-hidden{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
}

/* =========================================================
   ELEMENTOS DECORATIVOS
========================================================= */

.dots{
    position:absolute;
    width:120px;
    height:120px;
    background-image:
        radial-gradient(rgba(14,58,107,.18) 1.25px, transparent 1.25px);
    background-size:11px 11px;
    pointer-events:none;
    z-index:1;
}

.dots-yellow{
    background-image:
        radial-gradient(rgba(255,201,0,.28) 1.1px, transparent 1.1px);
}

.soft-yellow-circle{
    position:absolute;
    width:84px;
    height:84px;
    border-radius:50%;
    background:rgba(255,201,0,.10);
    pointer-events:none;
}

.blue-organic{
    position:absolute;
    background:var(--blue-deep);
    border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;
    transform:rotate(-18deg);
    pointer-events:none;
}

.hero-blue-shape{
    width:240px;
    height:320px;
    right:-120px;
    bottom:20px;
    opacity:.14;
}

.circuit{
    position:absolute;
    z-index:1;
    pointer-events:none;
    fill:none;
    stroke:rgba(255,201,0,.65);
    stroke-width:1.4;
    stroke-linecap:round;
}

.eyebrow{
    display:inline-block;
    font-size:.78rem;
    font-weight:800;
    letter-spacing:.18em;
    text-transform:uppercase;
    color:var(--blue);
    background:rgba(14,58,107,.06);
    padding:6px 14px;
    border-radius:999px;
    margin-bottom:14px;
}

.title{
    font-size:clamp(1.7rem,3.4vw,2.5rem);
    font-weight:800;
    line-height:1.12;
    color:var(--blue-dark);
    letter-spacing:-.02em;
}

.title span{
    color:var(--blue);
}

.copy{
    color:var(--grey);
    font-size:1.02rem;
    line-height:1.6;
    margin-top:12px;
}

.section-center{
    text-align:center;
    max-width:720px;
    margin:0 auto 40px;
}

/* =========================================================
   BOTONES
========================================================= */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:none;
    cursor:pointer;
    font-weight:700;
    font-size:.95rem;
    padding:13px 22px;
    border-radius:12px;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
    white-space:nowrap;
}

.btn-primary{
    background:var(--yellow);
    color:var(--blue-dark);
    box-shadow:0 10px 24px rgba(255,201,0,.35);
}

.btn-primary:hover{
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(255,201,0,.42);
}

.btn-outline{
    border:1.5px solid var(--blue-dark);
    color:var(--blue-dark);
    background:transparent;
}

.btn-outline:hover{
    background:var(--blue-dark);
    color:#fff;
}

.btn-light{
    background:#fff;
    color:var(--blue-dark);
}

.btn-light:hover{
    background:var(--light);
}

.btn-small{
    padding:9px 16px;
    font-size:.87rem;
    border-radius:10px;
}

/* =========================================================
   HEADER
========================================================= */

.header{
    position:sticky;
    top:0;
    z-index:100;
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(14px);
    border-bottom:1px solid var(--line);
}

.nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:16px 0;
}

.logo-img{
    height:52px;
    width:auto;
}

.logo-img-dark{
    display:none;
}

.menu{
    display:flex;
    align-items:center;
    gap:26px;
    list-style:none;
}

.menu-link{
    font-size:.92rem;
    font-weight:600;
    color:var(--blue-dark);
    opacity:.82;
    transition:opacity .2s ease, color .2s ease;
}

.menu-link:hover,
.menu-link.active{
    opacity:1;
    color:var(--blue);
}

.header-cta{
    padding:11px 18px;
    font-size:.9rem;
}

.menu-toggle{
    display:none;
    background:none;
    border:none;
    font-size:1.6rem;
    color:var(--blue-dark);
    cursor:pointer;
    line-height:1;
    padding:4px 8px;
}

/* =========================================================
   HERO
========================================================= */

.hero{
    position:relative;
    background:linear-gradient(180deg, #fff 0%, var(--offwhite) 100%);
    padding:64px 0 96px;
    overflow:hidden;
}

.hero-grid{
    position:relative;
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:48px;
    align-items:center;
}

.hero-title{
    font-size:clamp(2.3rem,5.4vw,3.9rem);
    font-weight:800;
    line-height:1.08;
    letter-spacing:-.03em;
    color:var(--blue-dark);
}

.hero-title span{
    color:var(--blue);
}

.hero-text{
    margin-top:20px;
    color:var(--grey);
    font-size:1.08rem;
    line-height:1.65;
    max-width:480px;
}

.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:30px;
}

/* visual decorativo */
.hero-visual{
    position:relative;
    min-height:340px;
}

.hero-card{
    position:absolute;
    display:flex;
    align-items:center;
    gap:12px;
    background:#fff;
    border-radius:16px;
    padding:16px 20px;
    box-shadow:var(--shadow);
    z-index:2;
    animation:float 6s ease-in-out infinite;
}

.hero-card strong{
    display:block;
    font-size:1rem;
    color:var(--blue-dark);
}

.hero-card small{
    color:var(--grey);
    font-size:.82rem;
}

.hero-card-icon{
    width:44px;
    height:44px;
    flex:none;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-size:1.25rem;
    color:var(--blue-dark);
    background:rgba(14,58,107,.08);
}

.hero-card-tender{
    top:26px;
    left:4%;
}

.hero-card-tender .hero-card-icon{
    background:rgba(255,201,0,.18);
}

.hero-card-project{
    top:46%;
    right:2%;
    animation-delay:-3s;
}

.hero-card-project .hero-card-icon{
    background:rgba(14,58,107,.10);
}

.hero-map-ring{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    display:grid;
    place-items:center;
    width:290px;
    height:290px;
}

.hero-map-ring svg{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    fill:none;
    stroke:rgba(14,58,107,.22);
    stroke-width:1.4;
    animation:spin 40s linear infinite;
}

.hero-map-ring span{
    position:relative;
    font-weight:800;
    color:var(--blue);
    letter-spacing:.14em;
    text-transform:uppercase;
    font-size:.85rem;
}

@keyframes float{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-14px); }
}

@keyframes spin{
    to{ transform:rotate(360deg); }
}

.hero-wave{
    position:absolute;
    left:0;
    right:0;
    bottom:-2px;
    height:70px;
    background:
        radial-gradient(circle at 12px -6px, transparent 14px, #fff 15px) 0 0/24px 24px repeat-x,
        linear-gradient(180deg, transparent 20%, #fff 21%);
}

/* =========================================================
   BUSCADOR
========================================================= */

.search-section{
    position:relative;
    background:#fff;
    padding:80px 0;
}

.search-panel{
    max-width:900px;
    margin:0 auto;
}

.search-row{
    display:grid;
    grid-template-columns:1fr 220px auto;
    gap:12px;
    background:var(--blue-dark);
    background:linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-deep) 100%);
    padding:18px;
    border-radius:20px;
    box-shadow:var(--shadow);
}

.search-input,
.search-select{
    border:none;
    border-radius:12px;
    padding:15px 18px;
    font-size:.98rem;
    color:var(--text);
    background:#fff;
    outline:none;
    width:100%;
}

.search-select{
    cursor:pointer;
    appearance:none;
    background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23687482' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 16px center;
    padding-right:38px;
}

.search-submit{
    border-radius:12px;
}

.search-hint{
    margin-top:12px;
    font-size:.88rem;
    color:var(--grey);
    min-height:18px;
}

.search-hint.error{
    color:var(--danger);
    font-weight:600;
}

/* tabs */
.tabs{
    display:flex;
    gap:10px;
    margin-top:22px;
    flex-wrap:wrap;
}

.tab{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:1.5px solid var(--line);
    background:#fff;
    color:var(--grey);
    font-weight:700;
    font-size:.9rem;
    padding:10px 16px;
    border-radius:999px;
    cursor:pointer;
    transition:all .18s ease;
}

.tab:hover{
    border-color:var(--blue);
    color:var(--blue);
}

.tab.active{
    background:var(--blue-dark);
    border-color:var(--blue-dark);
    color:#fff;
}

.tab-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:currentColor;
    opacity:.55;
}

.tab.active .tab-dot{
    background:var(--yellow);
    opacity:1;
}

/* =========================================================
   ESTADO DE BÚSQUEDA
========================================================= */

.results-area{
    margin-top:36px;
}

.status-box{
    display:flex;
    align-items:center;
    gap:14px;
    background:var(--light);
    border:1px solid var(--line);
    border-left:4px solid var(--blue);
    border-radius:14px;
    padding:18px 20px;
    max-width:900px;
    margin:0 auto;
}

.status-box strong{
    color:var(--blue-dark);
    font-size:1rem;
}

.status-box p{
    color:var(--grey);
    font-size:.9rem;
    margin-top:3px;
    line-height:1.5;
}

.status-icon{
    width:38px;
    height:38px;
    flex:none;
    display:grid;
    place-items:center;
    border-radius:50%;
    font-size:1.1rem;
}

.status-box.loading .status-icon{
    background:rgba(14,58,107,.08);
    color:var(--blue);
}

.status-box.loading .status-icon::before{
    content:"";
    width:18px;
    height:18px;
    border-radius:50%;
    border:3px solid rgba(14,58,107,.2);
    border-top-color:var(--blue);
    animation:spin .8s linear infinite;
}

.status-box.success .status-icon{
    background:rgba(46,160,67,.12);
    color:var(--success);
}

.status-box.success .status-icon::before{
    content:"\2713";
    font-weight:800;
}

.status-box.warn .status-icon{
    background:rgba(208,52,44,.1);
    color:var(--danger);
}

.status-box.warn .status-icon::before{
    content:"\26A0";
    font-weight:800;
}

/* cabecera resultados */
.results-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:16px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.results-title{
    font-size:1.25rem;
    font-weight:800;
    color:var(--blue-dark);
}

.results-subtitle{
    color:var(--grey);
    font-size:.9rem;
    margin-top:4px;
}

.results-filters{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.filter-chip{
    border:1.5px solid var(--line);
    background:#fff;
    color:var(--grey);
    font-weight:700;
    font-size:.82rem;
    padding:7px 13px;
    border-radius:999px;
    cursor:pointer;
    transition:all .18s ease;
}

.filter-chip:hover{
    border-color:var(--blue);
    color:var(--blue);
}

.filter-chip.active{
    background:rgba(14,58,107,.08);
    border-color:var(--blue);
    color:var(--blue);
}

/* =========================================================
   TARJETAS DE RESULTADOS
========================================================= */

.results-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
    gap:18px;
}

.result-card{
    display:flex;
    flex-direction:column;
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:20px;
    box-shadow:var(--shadow-card);
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.result-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--shadow);
    border-color:rgba(14,58,107,.22);
}

.card-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
}

.card-source{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:.74rem;
    font-weight:800;
    letter-spacing:.1em;
    text-transform:uppercase;
    color:var(--grey);
}

.card-source::before{
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--blue);
}

.result-card[data-source="web"] .card-source::before{ background:var(--yellow); }
.result-card[data-source="empleos"] .card-source::before{ background:var(--success-bg); }

.card-badges{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.badge{
    font-size:.72rem;
    font-weight:800;
    letter-spacing:.04em;
    padding:4px 9px;
    border-radius:999px;
    border:1px solid var(--line);
    color:var(--grey);
    background:var(--light);
    white-space:nowrap;
}

.badge.tipo{
    background:rgba(255,201,0,.16);
    border-color:rgba(255,201,0,.4);
    color:#7a5d00;
}

.badge.zona{
    background:rgba(14,58,107,.08);
    border-color:rgba(14,58,107,.15);
    color:var(--blue);
}

.badge.monto{
    background:rgba(46,160,67,.1);
    border-color:rgba(46,160,67,.28);
    color:var(--success);
}

.badge.fb{
    background:rgba(14,58,107,.1);
    border-color:rgba(14,58,107,.2);
    color:var(--blue);
}

.card-title{
    font-size:1.06rem;
    font-weight:800;
    line-height:1.35;
    color:var(--blue-dark);
    margin-bottom:8px;
    letter-spacing:-.01em;
}

.card-title a:hover{
    color:var(--blue);
}

.card-org{
    display:flex;
    align-items:center;
    gap:6px;
    color:var(--grey);
    font-size:.88rem;
    margin-bottom:12px;
}

.card-org svg{
    flex:none;
}

.card-desc{
    color:var(--grey);
    font-size:.9rem;
    line-height:1.55;
    flex:1;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
    margin-bottom:14px;
}

.card-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px 14px;
    padding-top:12px;
    border-top:1px solid var(--line);
    margin-bottom:14px;
    font-size:.84rem;
    color:var(--grey);
}

.card-meta span{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.card-meta strong{
    color:var(--blue-dark);
    font-weight:700;
}

.card-link{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-weight:700;
    font-size:.9rem;
    color:var(--blue);
}

.card-link:hover{
    color:var(--blue-dark);
}

/* vacío */
.empty-state{
    grid-column:1 / -1;
    text-align:center;
    padding:48px 20px;
    background:var(--light);
    border:1.5px dashed var(--line);
    border-radius:var(--radius);
}

.empty-state .empty-icon{
    font-size:2.4rem;
    margin-bottom:10px;
}

.empty-state h3{
    color:var(--blue-dark);
    font-size:1.15rem;
}

.empty-state p{
    color:var(--grey);
    margin-top:8px;
    font-size:.95rem;
    max-width:460px;
    margin-inline:auto;
}

/* =========================================================
   FUENTES
========================================================= */

.sources{
    background:linear-gradient(180deg, #fff 0%, var(--offwhite) 100%);
    padding:80px 0;
}

.sources-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:20px;
}

.source-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:28px;
    box-shadow:var(--shadow-card);
    transition:transform .18s ease;
}

.source-card:hover{
    transform:translateY(-4px);
}

.source-icon{
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    border-radius:14px;
    font-size:1.4rem;
    background:rgba(255,201,0,.16);
    color:var(--blue-dark);
    margin-bottom:18px;
}

.source-card:nth-child(2) .source-icon{
    background:rgba(14,58,107,.09);
}

.source-card:nth-child(3) .source-icon{
    background:rgba(46,160,67,.12);
    color:var(--success);
}

.source-card:nth-child(4) .source-icon{
    background:rgba(14,58,107,.1);
    color:var(--blue);
}

.source-card h3{
    font-size:1.15rem;
    font-weight:800;
    color:var(--blue-dark);
    margin-bottom:8px;
}

.source-card p{
    color:var(--grey);
    font-size:.92rem;
    line-height:1.6;
}

.source-link{
    display:inline-block;
    margin-top:16px;
    font-weight:700;
    font-size:.9rem;
    color:var(--blue);
}

.source-link:hover{
    color:var(--blue-dark);
}

/* =========================================================
   CÓMO FUNCIONA
========================================================= */

.how{
    position:relative;
    background:#fff;
    padding:80px 0;
}

.steps{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
    gap:20px;
}

.step{
    position:relative;
    background:var(--offwhite);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:32px 26px;
    transition:transform .18s ease, box-shadow .18s ease;
}

.step:hover{
    transform:translateY(-4px);
    box-shadow:var(--shadow-card);
}

.step-num{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:var(--blue-dark);
    color:var(--yellow);
    font-weight:800;
    font-size:1.15rem;
    margin-bottom:18px;
}

.step h3{
    font-size:1.08rem;
    font-weight:800;
    color:var(--blue-dark);
    margin-bottom:8px;
}

.step p{
    color:var(--grey);
    font-size:.92rem;
    line-height:1.6;
}

/* =========================================================
   FOOTER
========================================================= */

.footer{
    background:var(--blue-dark);
    background:linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-deep) 100%);
    color:#fff;
    padding:60px 0 30px;
}

.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1.4fr;
    gap:36px;
    padding-bottom:36px;
    border-bottom:1px solid rgba(255,255,255,.12);
}

.footer .logo-img{
    height:58px;
}

.footer-brand-text{
    margin-top:16px;
    color:rgba(255,255,255,.75);
    font-size:.92rem;
    line-height:1.6;
    max-width:300px;
}

.footer-social{
    display:flex;
    gap:12px;
    margin-top:18px;
}

.footer-social a{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:rgba(255,255,255,.1);
    color:#fff;
    transition:background .18s ease;
}

.footer-social a:hover{
    background:var(--yellow);
    color:var(--blue-dark);
}

.footer h4{
    font-size:.95rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin-bottom:16px;
    opacity:.85;
}

.footer p{
    margin-bottom:10px;
    color:rgba(255,255,255,.78);
    font-size:.9rem;
    line-height:1.55;
}

.footer p a{
    transition:color .18s ease;
}

.footer p a:hover{
    color:var(--yellow);
}

.footer-bottom{
    text-align:center;
    padding-top:26px;
    color:rgba(255,255,255,.55);
    font-size:.85rem;
}

/* botón flotante whatsapp */
.chatbot-float-wrap{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:9999;
}

.chatbot-float{
    display:flex;
    align-items:center;
    justify-content:center;
    width:58px;
    height:58px;
    border-radius:50%;
    background:var(--yellow);
    box-shadow:0 12px 30px rgba(255,201,0,.45);
    transition:transform .18s ease;
}

.chatbot-float:hover{
    transform:scale(1.08);
}

.chatbot-float img{
    width:34px;
    height:auto;
    border-radius:6px;
    object-fit:contain;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:1024px){
    .hero-grid{
        grid-template-columns:1fr;
        gap:24px;
    }
    .hero-visual{
        min-height:300px;
    }
    .footer-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:860px){
    .menu{
        position:fixed;
        inset:72px 0 auto 0;
        flex-direction:column;
        align-items:stretch;
        gap:6px;
        background:#fff;
        border-bottom:1px solid var(--line);
        padding:18px 20px 24px;
        transform:translateY(-130%);
        transition:transform .25s ease;
        box-shadow:var(--shadow);
    }
    .menu.open{
        transform:translateY(0);
    }
    .menu-link{
        display:block;
        padding:12px 6px;
    }
    .menu-toggle{
        display:block;
    }
    .search-row{
        grid-template-columns:1fr;
    }
    .search-select{
        padding:15px 18px;
    }
}

@media (max-width:520px){
    .footer-grid{
        grid-template-columns:1fr;
    }
    .hero-card{
        padding:12px 14px;
    }
    .hero-map-ring{
        width:220px;
        height:220px;
    }
}