/*
 * assets/css/pages/inicio.css
 * AGEJ v4 limpia: archivo conservado y documentado.
 */

/* INICIO AGEJ */
.agej-home{background:var(--agej-bg); color:var(--agej-text);}

.agej-hero{
    position:relative;
    min-height:720px;
    display:flex;
    align-items:center;
    overflow:hidden;
    background:
        linear-gradient(115deg, rgba(31,35,39,.86), rgba(31,35,39,.62) 48%, rgba(31,35,39,.20)),
        url('../../../images/inicio/hero-agej.jpg') center/cover no-repeat;
}
.agej-hero::after{
    content:"";
    position:absolute;
    inset:auto -8% -18% -8%;
    height:260px;
    background:var(--agej-bg);
    transform:skewY(-3deg);
}
.agej-hero-pattern{
    position:absolute;
    inset:0;
    background-image:linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size:46px 46px;
    opacity:.40;
}
.agej-hero-inner{
    position:relative;
    z-index:2;
    width:min(1180px, calc(100% - 40px));
    margin:0 auto;
    padding:105px 0 125px;
}
.agej-mini-line{color:rgba(255,255,255,.64); text-transform:uppercase; letter-spacing:.18em; font-size:.80rem; font-weight:800; margin-bottom:18px;}
.agej-hero h1{
    max-width:920px;
    margin:0 0 22px;
    font-size:clamp(2.7rem, 6vw, 5.3rem);
    line-height:.98;
    letter-spacing:-.06em;
    font-weight:900;
    color:#fff;
    text-shadow:0 4px 18px rgba(0,0,0,.34);
}
.agej-hero p{max-width:790px; margin:0 0 30px; font-size:1.18rem; line-height:1.75; color:rgba(255,255,255,.94); text-shadow:0 2px 12px rgba(0,0,0,.35);}
.agej-hero-actions{display:flex; flex-wrap:wrap; gap:14px; margin-top:28px;}

.agej-stats{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; max-width:1040px; margin-top:40px;}
.agej-stat{
    padding:26px 24px;
    border:1px solid rgba(255,255,255,.18);
    background:#fff;
    border-radius:22px;
    color:#30363c !important;
    box-shadow:0 18px 45px rgba(0,0,0,.12);
    position:relative;
    overflow:hidden;
}
.agej-stat::before{content:""; position:absolute; top:0; left:0; right:0; height:6px; background:linear-gradient(90deg,#59636d,#c7cdd3);}
.agej-stat strong{display:block; font-size:2.35rem; line-height:1; margin-bottom:10px; letter-spacing:-.05em; color:#30363c !important; font-weight:900;}
.agej-stat span{display:block; color:#5f6972 !important; font-size:.95rem; line-height:1.4; font-weight:650;}

.agej-quick{margin-top:-38px; position:relative; z-index:5;}
.agej-quick-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:16px;}
.agej-quick-card{min-height:155px; background:#fff; border:1px solid var(--agej-line); border-radius:22px; padding:24px; color:#30363c !important; box-shadow:var(--agej-shadow-soft); transition:.25s ease; display:block;}
.agej-quick-card:hover{transform:translateY(-6px); box-shadow:var(--agej-shadow);}
.agej-quick-card .icon{width:46px; height:46px; display:grid; place-items:center; border-radius:14px; background:#eef0f3; color:#3d4852; font-size:1.45rem; margin-bottom:16px;}
.agej-quick-card h3{margin:0 0 8px; color:#30363c; font-size:1.08rem; font-weight:800;}
.agej-quick-card p{margin:0; color:#68717a; line-height:1.5; font-size:.95rem;}

.agej-about-grid{display:grid; grid-template-columns:1.05fr .95fr; gap:36px; align-items:stretch;}
.agej-card.feature{background:linear-gradient(135deg, rgba(255,255,255,.96), rgba(245,247,250,.96)), url('../../../images/inicio/textura-documental.jpg') center/cover no-repeat;}
.agej-card p{color:#5c6670; line-height:1.75; margin:0 0 14px;}
.agej-about-photo{min-height:430px; border-radius:28px; background:linear-gradient(rgba(31,35,39,.10), rgba(31,35,39,.10)), url('../../../images/inicio/que-es-agej.jpg') center/cover no-repeat; box-shadow:var(--agej-shadow); border:1px solid #dde2e7;}

.agej-services-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:32px;}
.agej-service{background:#fff; border:1px solid var(--agej-line); border-radius:22px; padding:26px; box-shadow:var(--agej-shadow-soft); transition:.25s ease;}
.agej-service:hover{transform:translateY(-6px); box-shadow:var(--agej-shadow);}
.agej-service .icon{width:48px; height:48px; display:grid; place-items:center; border-radius:14px; background:#eef0f3; color:#3d4852; font-size:1.45rem; margin-bottom:18px;}
.agej-service h3{margin:0 0 10px; color:#30363c; font-size:1.12rem; font-weight:800;}
.agej-service p{margin:0; color:#68717a; line-height:1.6; font-size:.95rem;}

.agej-feature-banner{position:relative; overflow:hidden; border-radius:30px; min-height:360px; background:linear-gradient(90deg, rgba(31,35,39,.86), rgba(31,35,39,.45)), url('../../../images/inicio/rna-banner.jpg') center/cover no-repeat; box-shadow:var(--agej-shadow);}
.agej-feature-banner.ceaj{background:linear-gradient(90deg, rgba(31,35,39,.86), rgba(31,35,39,.42)), url('../../../images/inicio/ceaj-home.jpg') center/cover no-repeat;}
.agej-feature-content{max-width:720px; padding:48px; color:#fff; position:relative; z-index:2;}
.agej-feature-content h2{color:#fff; font-size:clamp(2rem,4vw,3rem); line-height:1.1; margin:0 0 18px; letter-spacing:-.04em;}
.agej-feature-content p{color:rgba(255,255,255,.90); line-height:1.75; margin:0 0 24px;}

.agej-tabs{display:flex; flex-wrap:wrap; gap:9px; margin-top:26px;}
.agej-tabs button{border:1px solid #d3d9df; background:#fff; color:#555f69 !important; border-radius:999px; padding:10px 16px; cursor:pointer; font-weight:750; font-size:.9rem; transition:.2s ease;}
.agej-tabs button.active,.agej-tabs button:hover{background:#30363c; color:#fff !important; border-color:#30363c;}
.agej-news-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-top:28px;}
.agej-news-card{background:#fff; border:1px solid var(--agej-line); border-radius:24px; overflow:hidden; box-shadow:var(--agej-shadow-soft); display:flex; flex-direction:column; min-height:390px; transition:.25s ease;}
.agej-news-card:hover{transform:translateY(-6px); box-shadow:var(--agej-shadow);}
.agej-news-img{height:190px; background:#dfe3e8 center/cover no-repeat;}
.agej-news-body{padding:22px; display:flex; flex-direction:column; flex:1;}
.agej-news-body small{color:#77818b; font-weight:800; text-transform:uppercase; letter-spacing:.06em; margin-bottom:9px;}
.agej-news-body h3{margin:0 0 10px; color:#30363c; font-size:1.14rem; line-height:1.35;}
.agej-news-body p{color:#68717a; line-height:1.6; margin:0 0 18px; font-size:.95rem;}
.agej-news-body a{margin-top:auto; color:#30363c !important; font-weight:800;}

.agej-gallery{display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:190px; gap:16px; margin-top:34px;}
.agej-gallery-item{position:relative; border-radius:22px; overflow:hidden; background:#dfe3e8 center/cover no-repeat; box-shadow:var(--agej-shadow-soft); cursor:pointer; border:0; width:100%; padding:0; text-align:left; transition:.25s ease;}
.agej-gallery-item:hover{transform:translateY(-4px); box-shadow:var(--agej-shadow);}
.agej-gallery-item.large{grid-column:span 2; grid-row:span 2;}
.agej-gallery-item.wide{grid-column:span 2;}
.agej-gallery-item::before{content:"⌕"; position:absolute; right:14px; top:14px; width:40px; height:40px; display:grid; place-items:center; background:rgba(255,255,255,.88); color:#30363c; border-radius:50%; font-size:1.25rem; font-weight:900; opacity:0; transform:scale(.92); transition:.2s ease;}
.agej-gallery-item:hover::before{opacity:1; transform:scale(1);}
.agej-gallery-item::after{content:attr(data-title); position:absolute; left:14px; right:14px; bottom:14px; padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.88); color:#30363c; font-weight:800; transform:translateY(12px); opacity:0; transition:.25s ease;}
.agej-gallery-item:hover::after{opacity:1; transform:translateY(0);}

.agej-contact-editorial{position:relative; overflow:hidden; border-radius:32px; background:linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.86) 44%, rgba(31,35,39,.84) 68%, rgba(31,35,39,.92)), url('../../../images/inicio/contacto-agej.jpg') center/cover no-repeat; border:1px solid var(--agej-line); box-shadow:var(--agej-shadow); min-height:420px; display:grid; grid-template-columns:1fr 1fr;}
.agej-contact-copy{padding:48px; display:flex; flex-direction:column; justify-content:center;}
.agej-contact-copy h2{font-size:clamp(2rem,4vw,3rem); line-height:1.08; letter-spacing:-.04em; margin:0 0 18px; color:#2f3337;}
.agej-contact-copy p{color:#5f6972; line-height:1.75; max-width:610px; margin:0;}
.agej-contact-data{padding:48px; color:#fff; display:flex; flex-direction:column; justify-content:center; gap:24px;}
.agej-contact-line{display:grid; grid-template-columns:48px 1fr; gap:16px; align-items:start; border-bottom:1px solid rgba(255,255,255,.18); padding-bottom:18px;}
.agej-contact-line:last-child{border-bottom:0; padding-bottom:0;}
.agej-contact-line .icon{width:48px; height:48px; border-radius:50%; border:1px solid rgba(255,255,255,.34); display:grid; place-items:center; color:#fff; font-size:1.2rem;}
.agej-contact-line strong{display:block; color:#fff; margin-bottom:4px; font-weight:850;}
.agej-contact-line span{display:block; color:rgba(255,255,255,.82); line-height:1.55;}

@media(max-width:1100px){
    .agej-stats,.agej-quick-grid{grid-template-columns:repeat(2,1fr);}
    .agej-services-grid,.agej-news-grid{grid-template-columns:repeat(2,1fr);}
    .agej-gallery{grid-template-columns:repeat(2,1fr);}
    .agej-contact-editorial{grid-template-columns:1fr;}
    .agej-contact-data{background:rgba(31,35,39,.92);}
}
@media(max-width:820px){
    .agej-section{padding:45px 0;}
    .agej-hero{min-height:auto;}
    .agej-hero-inner{padding:110px 0 110px;}
    .agej-stats,.agej-quick-grid,.agej-services-grid,.agej-news-grid{grid-template-columns:1fr;}
    .agej-about-grid{grid-template-columns:1fr;}
    .agej-about-photo{min-height:300px;}
    .agej-feature-content,.agej-contact-copy,.agej-contact-data{padding:34px 24px;}
    .agej-gallery{grid-template-columns:1fr; grid-auto-rows:220px;}
    .agej-gallery-item.large,.agej-gallery-item.wide{grid-column:span 1; grid-row:span 1;}
}


/* Servicios v3: encabezado con imagen lateral */
.agej-services-head{
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:34px;
    align-items:stretch;
    margin-bottom:32px;
}

.agej-services-copy{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.agej-services-photo{
    min-height:310px;
    border-radius:28px;
    background:
        linear-gradient(rgba(31,35,39,.08), rgba(31,35,39,.08)),
        url('../../../images/inicio/servicios-agej.jpg') center/cover no-repeat;
    border:1px solid #dde2e7;
    box-shadow:var(--agej-shadow);
    overflow:hidden;
}

.agej-services-grid{
    margin-top:0;
}

@media(max-width:900px){
    .agej-services-head{
        grid-template-columns:1fr;
    }
    .agej-services-photo{
        min-height:260px;
    }
}


/* ==========================================================
   AGEJ v8 - Inicio como portal informativo
   Estas reglas sustituyen el hero estático por slider visual
   y agregan bloques de avisos, accesos por perfil y micrositios.
   ========================================================== */
.agej-home-slider{
    position:relative;
    min-height:720px;
    overflow:hidden;
    background:#25292d;
}
.agej-slide{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    opacity:0;
    pointer-events:none;
    transition:opacity .65s ease;
    background-position:center;
    background-size:cover;
    background-repeat:no-repeat;
}
.agej-slide.active{opacity:1; pointer-events:auto;}
.agej-slide::after{
    content:"";
    position:absolute;
    inset:auto -8% -18% -8%;
    height:260px;
    background:var(--agej-bg);
    transform:skewY(-3deg);
    z-index:2;
}
.agej-slide-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(115deg, rgba(31,35,39,.88), rgba(31,35,39,.62) 48%, rgba(31,35,39,.20)),
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size:auto, 46px 46px, 46px 46px;
}
.agej-slide-content{
    position:relative;
    z-index:3;
    width:min(1180px, calc(100% - 40px));
    margin:0 auto;
    padding:135px 0 155px;
}
.agej-slide h1,
.agej-slide h2{
    max-width:920px;
    margin:0 0 22px;
    font-size:clamp(2.7rem, 6vw, 5.3rem);
    line-height:.98;
    letter-spacing:-.06em;
    font-weight:900;
    color:#fff;
    text-shadow:0 4px 18px rgba(0,0,0,.34);
}
.agej-slide p{
    max-width:790px;
    margin:0 0 30px;
    font-size:1.18rem;
    line-height:1.75;
    color:rgba(255,255,255,.94);
    text-shadow:0 2px 12px rgba(0,0,0,.35);
}
.agej-slider-controls{
    position:absolute;
    left:50%;
    bottom:72px;
    z-index:4;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 14px;
    border:1px solid rgba(255,255,255,.24);
    border-radius:999px;
    background:rgba(31,35,39,.38);
    backdrop-filter:blur(10px);
}
.agej-slider-prev,
.agej-slider-next{
    width:38px;
    height:38px;
    border:1px solid rgba(255,255,255,.34);
    border-radius:50%;
    background:rgba(255,255,255,.12);
    color:#fff;
    font-size:1.6rem;
    line-height:1;
    cursor:pointer;
}
.agej-slider-dots{display:flex; gap:8px; align-items:center;}
.agej-slider-dots button{
    width:9px;
    height:9px;
    border:0;
    border-radius:50%;
    background:rgba(255,255,255,.42);
    cursor:pointer;
    padding:0;
}
.agej-slider-dots button.active{background:#fff; width:22px; border-radius:99px;}

.agej-section-head{margin-bottom:28px;}
.agej-alerts-section{padding-top:72px;}
.agej-alerts-grid,
.agej-profile-grid,
.agej-microsites-grid{
    display:grid;
    gap:18px;
}
.agej-alerts-grid{grid-template-columns:repeat(4,1fr);}
.agej-profile-grid{grid-template-columns:repeat(3,1fr);}
.agej-microsites-grid{grid-template-columns:repeat(4,1fr);}
.agej-alert-card,
.agej-profile-card{
    display:block;
    background:#fff;
    border:1px solid var(--agej-line);
    border-radius:24px;
    padding:24px;
    color:#30363c!important;
    box-shadow:var(--agej-shadow-soft);
    transition:.25s ease;
}
.agej-alert-card:hover,
.agej-profile-card:hover{transform:translateY(-5px); box-shadow:var(--agej-shadow);}
.agej-alert-card strong,
.agej-profile-card h3{display:block; margin:0 0 8px; color:#30363c; font-weight:800;}
.agej-alert-card span,
.agej-profile-card p{display:block; margin:0; color:#66717c; line-height:1.6;}
.agej-profile-links{display:grid; gap:8px; margin-top:18px;}
.agej-profile-links a{
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:38px;
    padding:0 12px;
    border:1px solid #d9dde2;
    border-radius:999px;
    background:#f7f8fa;
    color:#30363c!important;
    font-weight:750;
}
.agej-profile-links a::after{content:"→"; color:#7a848e;}

.agej-microsite-card{
    position:relative;
    min-height:230px;
    display:flex;
    align-items:flex-end;
    padding:22px;
    border-radius:26px;
    overflow:hidden;
    background:#fff;
    color:#fff!important;
    box-shadow:var(--agej-shadow-soft);
    transition:.25s ease;
}

.agej-microsite-card img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:contain;
    padding:15px;
    transform:translateY(-15px);
}

.agej-microsite-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        180deg,
        rgba(31,35,39,.03),
        rgba(31,35,39,.30)
    );
    z-index:1;
}

.agej-microsite-card span{
    position:relative;
    z-index:2;
    font-size:1.25rem;
    font-weight:850;
}
.agej-microsite-card:hover{transform:translateY(-5px); box-shadow:var(--agej-shadow);}
.agej-microsite-card span{position:relative; z-index:1; font-size:1.25rem; font-weight:850;}
.agej-indicators{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    background:#fff;
    border:1px solid var(--agej-line);
    border-radius:28px;
    padding:24px;
    box-shadow:var(--agej-shadow-soft);
}
.agej-indicators div{padding:18px; border-radius:18px; background:#f6f7f9; border:1px solid #e2e6ea;}
.agej-indicators strong{display:block; color:#30363c; font-size:1.8rem; letter-spacing:-.04em; margin-bottom:5px; text-align: center;}
.agej-indicators span{display:block; color:#66717c; line-height:1.45; text-align: center;}
@media(max-width:1050px){
    .agej-alerts-grid,.agej-microsites-grid{grid-template-columns:repeat(2,1fr);} 
    .agej-profile-grid{grid-template-columns:1fr;}
    .agej-indicators{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:720px){
    .agej-home-slider{min-height:auto;}
    .agej-slide{position:relative; min-height:650px; display:flex;}
    .agej-slide:not(.active){display:none;}
    .agej-slide-content{padding:120px 0 120px;}
    .agej-slider-controls{bottom:30px;}
    .agej-alerts-grid,.agej-microsites-grid,.agej-indicators{grid-template-columns:1fr;}
}
