/**
 * style.css — CAINCO El Alto
 * Ruta: assets/css/style.css
 * Estilos globales + responsive completo
 */

/* ========================================
   VARIABLES CSS
======================================== */
:root {
    --color-primario:    #000020;
    --color-secundario:  #eba436;
    --color-blanco:      #FFFFFF;
    --color-gris-claro:  #F8F9FA;
    --color-gris:        #6C757D;
    --color-gris-oscuro: #343A40;

    --font-principal: 'Roboto', 'Segoe UI', Arial, sans-serif;
    --font-titulos:   'Montserrat', 'Helvetica Neue', Arial, sans-serif;

    --border-radius: 8px;
    --box-shadow:    0 2px 10px rgba(0, 0, 32, 0.1);
    --transition:    all 0.3s ease;
}

/* ========================================
   RESET Y BASE
======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* fix iOS Safari horizontal overflow */
}

body {
    font-family: var(--font-principal);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gris-oscuro);
    background-color: var(--color-blanco);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titulos);
    font-weight: 700;
    color: var(--color-primario);
    margin-bottom: 1rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a { color: var(--color-primario); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-secundario); }

img { max-width: 100%; height: auto; display: block; }

/* ========================================
   CONTENEDOR
======================================== */
.container       { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.container-fluid { width: 100%; padding: 0 15px; }

/* ========================================
   BOTONES
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-family: var(--font-principal);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary { background: var(--color-primario); color: var(--color-blanco); }
.btn-primary:hover {
    background: #004d99; color: var(--color-blanco);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,51,102,.3);
}

.btn-secondary { background: var(--color-secundario); color: var(--color-blanco); }
.btn-secondary:hover {
    background: #e8601a; color: var(--color-blanco);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,122,61,.35);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primario);
    border-color: var(--color-primario);
}
.btn-outline-primary:hover { background: var(--color-primario); color: var(--color-blanco); }

.btn-white { background: #fff; color: var(--color-primario); border-color: #fff; }
.btn-white:hover { background: transparent; color: #fff; border-color: #fff; }

.btn-sm { padding: 0.5rem 1.5rem; font-size: 0.9rem; }

/* ========================================
   GRID
======================================== */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
[class*="col-"] { padding: 0 15px; margin-bottom: 30px; }

.col-1  { width: 8.33%; }
.col-2  { width: 16.66%; }
.col-3  { width: 25%; }
.col-4  { width: 33.33%; }
.col-6  { width: 50%; }
.col-8  { width: 66.66%; }
.col-12 { width: 100%; }

/* ========================================
   SECCIONES
======================================== */
.section { padding: 4rem 0; }

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 {
    color: var(--color-primario);
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 4px;
    background: var(--color-secundario);
    border-radius: 2px;
}
.section-title p { color: var(--color-gris); font-size: 1.1rem; margin-top: .5rem; }

/* ícono en títulos de sección */
.section-title h2 i { color: #eba436; margin-right: 10px; }
.section-title p    { color: #6C757D; max-width: 600px; margin: .8rem auto 0; }

.section-gray { background-color: var(--color-gris-claro); }

.section-cta { text-align: center; margin-top: 2rem; }

/* ========================================
   CARDS
======================================== */
.card {
    background: var(--color-blanco);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.card-img { width: 100%; height: 200px; object-fit: cover; transition: transform .5s ease; }

.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-title { color: var(--color-primario); font-size: 1.2rem; margin-bottom: .5rem; }
.card-text  { color: var(--color-gris); margin-bottom: 1rem; flex: 1; }

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--color-gris-claro);
    border-top: 1px solid #dee2e6;
}

/* Card imagen placeholder */
.card-img-placeholder {
    width: 100%; height: 200px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #000020, #000d45);
    font-size: 3rem; color: rgba(255,255,255,.2);
    overflow: hidden;
}

.card-meta  { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.card-fecha { color: var(--color-gris); font-size: .85rem; display: flex; align-items: center; gap: .3rem; }
.card-btn   { margin-top: auto; align-self: flex-start; }

.shadow-hover { transition: all .4s cubic-bezier(.4,0,.2,1); }

/* ========================================
   CARD SERVICIO
======================================== */
.card-servicio { text-align: center; }

.servicio-icono-wrap {
    width: 72px; height: 72px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff;
    margin: 0 auto 1.2rem;
}

/* ========================================
   BADGES
======================================== */
.badge {
    display: inline-block;
    padding: .35rem .85rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-blanco);
}

/* ========================================
   ESTADÍSTICAS
======================================== */
.stat-item       { text-align: center; padding: 1rem; }
.stat-item > i   { color: var(--color-secundario); font-size: 2.6rem; margin-bottom: .5rem; display: block; }
.stat-number     {
    font-size: 2.8rem; font-weight: 700; margin: 0;
    background: linear-gradient(135deg, #000020, #000d45);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-plus       { font-size: 1.5rem; font-weight: 700; color: var(--color-secundario); }
.stat-label      { color: var(--color-gris); font-size: .95rem; margin-top: .3rem; }

/* ========================================
   CTA SECTION
======================================== */
.cta-section { padding: 5rem 0; position: relative; overflow: hidden; }
.cta-content { text-align: center; position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.cta-titulo  { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 1rem; }
.cta-texto   { color: rgba(255,255,255,.88); font-size: clamp(1rem, 1.5vw, 1.2rem); margin-bottom: 2rem; }
.cta-botones { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-btn-grande    { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: 50px; }
.cta-btn-contactar {
    background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.5);
    color: #fff; padding: 1rem 2.2rem; font-size: 1.05rem; border-radius: 50px;
    display: inline-flex; align-items: center; gap: 8px; font-weight: 600;
    transition: var(--transition);
}
.cta-btn-contactar:hover { background: rgba(255,255,255,.28); color: #fff; border-color: #fff; }

/* ========================================
   FOOTER
======================================== */
.footer { background: var(--color-primario); color: var(--color-blanco); padding: 3rem 0 1rem; }
.footer h4   { color: var(--color-blanco); margin-bottom: 1rem; }
.footer p    { color: rgba(255,255,255,.75); font-size: .95rem; line-height: 1.7; }
.footer a    { color: rgba(255,255,255,.8); }
.footer a:hover { color: var(--color-secundario); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 2rem; padding-top: 1.5rem;
    text-align: center; font-size: .9rem;
    color: rgba(255,255,255,.55);
}

.social-links { display: flex; gap: 1rem; list-style: none; flex-wrap: wrap; padding: 0; }
.social-links a {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    background: rgba(255,255,255,.1); border-radius: 50%;
    color: #fff; transition: var(--transition);
}
.social-links a:hover { background: var(--color-secundario); transform: translateY(-3px); color: #fff; }

/* ========================================
   EFECTOS / UTILIDADES CSS
======================================== */
.ripple            { position: relative; overflow: hidden; }
.underline-animated{ position: relative; }
.parallax-section  { background-attachment: fixed; background-size: cover; background-position: center; }


/* ========================================
   UTILIDADES SPACING / COLOR
======================================== */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mt-1{margin-top:.5rem}  .mt-2{margin-top:1rem}
.mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}  .mb-2{margin-bottom:1rem}
.mb-3{margin-bottom:1.5rem} .mb-4{margin-bottom:2rem}
.py-1{padding-top:.5rem;padding-bottom:.5rem}
.py-2{padding-top:1rem;padding-bottom:1rem}
.py-3{padding-top:1.5rem;padding-bottom:1.5rem}
.py-4{padding-top:2rem;padding-bottom:2rem}

.bg-primary   { background: var(--color-primario); }
.bg-secondary { background: var(--color-secundario); }
.bg-white     { background: var(--color-blanco); }
.bg-gray      { background: var(--color-gris-claro); }
.text-primary   { color: var(--color-primario); }
.text-secondary { color: var(--color-secundario); }
.text-white     { color: var(--color-blanco); }

/* ========================================
   RESPONSIVE — TABLET ≤ 992px
======================================== */
@media (max-width: 992px) {

    .col-4 { width: 50%; }
    .col-3 { width: 50%; }

    .section       { padding: 3.5rem 0; }
    .section-title h2 { font-size: 2rem; }

    .stat-item.col-3 { width: 50%; }

    .footer .col-3,
    .footer .col-4 { width: 50%; }

    .parallax-section { background-attachment: scroll; }
}

/* ========================================
   RESPONSIVE — MÓVIL ≤ 768px
======================================== */
@media (max-width: 768px) {

    body { font-size: 15px; }

    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }

    .section       { padding: 3rem 0; }
    .section-title { margin-bottom: 2rem; }
    .section-title h2 { font-size: 1.75rem; }
    .section-title p  { font-size: 1rem; }

    /* Grid móvil — todo a 100% */
    .col-4, .col-3, .col-6 { width: 100%; }

    /* Stats — 2 columnas */
    .stat-item.col-3 { width: 50%; }

    .card-btn { width: 100%; justify-content: center; }

    /* CTA botones apilados */
    .cta-botones        { flex-direction: column; align-items: center; }
    .cta-btn-grande,
    .cta-btn-contactar  { width: 100%; max-width: 320px; justify-content: center; }

    /* Footer 100% */
    .footer [class*="col-"] { width: 100%; margin-bottom: 1.5rem; }
}

/* ========================================
   RESPONSIVE — MÓVIL PEQUEÑO ≤ 480px
======================================== */
@media (max-width: 480px) {

    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.45rem; }

    .container { padding: 0 12px; }
    .section   { padding: 2.5rem 0; }

    .stat-number { font-size: 2.2rem; }

    .btn    { padding: .7rem 1.4rem; font-size: .9rem; }
    .btn-sm { padding: .45rem 1.1rem; font-size: .82rem; }
}