/* ════════════════════════════════════════════════════
   INTRANET CLÍNICA EL CONCHI — Portal Web
   Paleta: Azul (#0D47A1 / #1565C0 / #42A5F5)
════════════════════════════════════════════════════ */
:root {
    --blue-dark:  #0D47A1;
    --blue-main:  #1565C0;
    --blue-mid:   #1976D2;
    --blue-light: #42A5F5;
    --blue-pale:  #E3F2FD;
    --nav-h:      70px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: #F0F4F8; color: #1a2340; }

/* ════════════
   NAVBAR
════════════ */
.navbar-portal {
    position: fixed; top: 0; left: 0; right: 0; z-index: 999;
    height: var(--nav-h);
    background: #fff;
    box-shadow: 0 2px 16px rgba(13,71,161,.12);
    display: flex; align-items: center;
    padding: 0 2rem;
    gap: 2rem;
}
.nav-brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.nav-brand img { height: 42px; }
.nav-brand-text { line-height: 1.15; }
.nav-brand-text .clinic-name { font-size: .9rem; font-weight: 800; color: var(--blue-dark); }
.nav-brand-text .clinic-sub  { font-size: .65rem; color: #64748b; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: .25rem; flex: 1; margin-left: 1.5rem; }
.nav-link-item {
    display: flex; align-items: center; gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: .82rem; font-weight: 600;
    color: #4a5568;
    transition: background .18s, color .18s;
    white-space: nowrap;
}
.nav-link-item i { font-size: .9rem; }
.nav-link-item:hover  { background: var(--blue-pale); color: var(--blue-main); }
.nav-link-item.active { background: var(--blue-pale); color: var(--blue-dark); }
.nav-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.nav-user {
    display: flex; align-items: center; gap: .6rem;
    background: var(--blue-pale); border-radius: 30px;
    padding: .35rem .85rem .35rem .45rem;
    cursor: pointer;
}
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-main), var(--blue-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: .85rem;
}
.nav-user-name { font-size: .78rem; font-weight: 700; color: var(--blue-dark); }
.nav-user-rol  { font-size: .65rem; color: #64748b; }
.btn-logout {
    background: none; border: 1.5px solid #e2e8f0;
    border-radius: 8px; padding: .4rem .75rem;
    font-size: .78rem; font-weight: 600; color: #64748b;
    cursor: pointer; font-family: 'Poppins', sans-serif;
    transition: border-color .18s, color .18s;
    text-decoration: none; display: flex; align-items: center; gap: .35rem;
}
.btn-logout:hover { border-color: #ef4444; color: #ef4444; }
.nav-hamburger {
    display: none; background: none; border: none;
    font-size: 1.5rem; color: var(--blue-main); cursor: pointer;
    margin-left: auto;
}

/* ════════════
   HERO
════════════ */
.hero {
    margin-top: var(--nav-h);
    min-height: 420px;
    background: linear-gradient(120deg, #082C6E 0%, #0D47A1 35%, #1565C0 65%, #0288D1 100%);
    display: flex; align-items: center;
    position: relative; overflow: hidden;
    padding: 3rem 2.5rem;
}
.hero::before {
    content: '';
    position: absolute; top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: rgba(255,255,255,.05); border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute; bottom: -80px; left: 30%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.04); border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 3rem; }
.hero-text { flex: 1; color: #fff; }
.hero-eyebrow {
    font-size: .75rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: rgba(255,255,255,.65);
    display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem;
}
.hero-eyebrow span { width: 28px; height: 2px; background: var(--blue-light); border-radius: 2px; }
.hero-title { font-size: 2.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; letter-spacing: -.02em; }
.hero-title em { color: var(--blue-light); font-style: normal; }
.hero-desc { font-size: 1rem; color: rgba(255,255,255,.75); max-width: 480px; line-height: 1.65; margin-bottom: 1.75rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero-primary {
    background: #fff; color: var(--blue-dark);
    border: none; border-radius: 10px;
    padding: .75rem 1.75rem; font-size: .9rem; font-weight: 700;
    cursor: pointer; font-family: 'Poppins', sans-serif;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    display: flex; align-items: center; gap: .5rem; text-decoration: none;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.25); color: var(--blue-dark); }
.btn-hero-ghost {
    background: rgba(255,255,255,.15); color: #fff;
    border: 1.5px solid rgba(255,255,255,.4); border-radius: 10px;
    padding: .75rem 1.75rem; font-size: .9rem; font-weight: 600;
    cursor: pointer; font-family: 'Poppins', sans-serif;
    transition: background .2s;
    display: flex; align-items: center; gap: .5rem; text-decoration: none;
    backdrop-filter: blur(4px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.hero-visual { display: flex; flex-direction: column; gap: 1rem; }
.hero-card-float {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    border-radius: 16px; padding: 1.25rem 1.5rem;
    color: #fff; min-width: 200px;
}
.hero-card-float .hcf-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); margin-bottom: .3rem; }
.hero-card-float .hcf-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.hero-card-float .hcf-sub   { font-size: .78rem; color: rgba(255,255,255,.7); margin-top: .2rem; }
.photo-block {
    width: 280px; height: 180px; border-radius: 16px;
    background: rgba(255,255,255,.1);
    border: 2px dashed rgba(255,255,255,.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: rgba(255,255,255,.55); font-size: .78rem; font-weight: 600; gap: .5rem;
}
.photo-block i { font-size: 2.5rem; color: rgba(255,255,255,.3); }

/* ════════════
   STATS BAR
════════════ */
.stats-bar {
    background: #fff;
    box-shadow: 0 4px 24px rgba(13,71,161,.08);
}
.stats-bar-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat-item {
    padding: 1.5rem 2rem;
    display: flex; align-items: center; gap: 1rem;
    border-right: 1px solid #f0f4f8;
    transition: background .2s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--blue-pale); }
.stat-item-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.stat-item-icon.blue   { background: #DBEAFE; color: var(--blue-main); }
.stat-item-icon.green  { background: #DCFCE7; color: #16A34A; }
.stat-item-icon.orange { background: #FEF3C7; color: #D97706; }
.stat-item-icon.teal   { background: #CCFBF1; color: #0D9488; }
.stat-item-value { font-size: 1.75rem; font-weight: 800; color: #1a2340; line-height: 1; }
.stat-item-label { font-size: .75rem; color: #64748b; font-weight: 500; margin-top: .2rem; }

/* ════════════
   CONTENT
════════════ */
.portal-content { max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem; }

.section-title {
    font-size: .7rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--blue-main);
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .75rem;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, #BFDBFE, transparent); }

/* ════════════
   MODULE CARDS
════════════ */
.module-card {
    background: #fff; border-radius: 18px;
    box-shadow: 0 2px 16px rgba(13,71,161,.07);
    overflow: hidden; text-decoration: none; color: #1a2340;
    display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s;
    border: 2px solid transparent;
}
.module-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(13,71,161,.15); border-color: var(--blue-pale); color: #1a2340; }
.module-card-img {
    height: 140px;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.module-card-img.grad-blue   { background: linear-gradient(135deg, #0D47A1, #42A5F5); }
.module-card-img.grad-green  { background: linear-gradient(135deg, #1B5E20, #66BB6A); }
.module-card-img.grad-purple { background: linear-gradient(135deg, #4527A0, #9575CD); }
.module-card-img.grad-orange { background: linear-gradient(135deg, #BF360C, #FFA726); }
.module-card-img.grad-teal   { background: linear-gradient(135deg, #004D40, #26A69A); }
.module-card-img.grad-indigo { background: linear-gradient(135deg, #1A237E, #5C6BC0); }
.module-card-img i { font-size: 3.5rem; color: rgba(255,255,255,.6); }
.module-card-img .photo-label {
    position: absolute; bottom: 8px; right: 10px;
    font-size: .62rem; font-weight: 700; color: rgba(255,255,255,.5);
    letter-spacing: .06em; text-transform: uppercase;
    border: 1px dashed rgba(255,255,255,.3); border-radius: 4px; padding: .1rem .4rem;
}
.module-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.module-card-title { font-size: .95rem; font-weight: 700; }
.module-card-desc  { font-size: .78rem; color: #64748b; line-height: 1.5; flex: 1; }
.module-card-cta   { font-size: .75rem; font-weight: 700; color: var(--blue-main); display: flex; align-items: center; gap: .3rem; margin-top: .4rem; }

/* ════════════
   NEWS
════════════ */
.news-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 12px rgba(13,71,161,.07);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(13,71,161,.13); }
.news-card-img {
    height: 120px;
    background: linear-gradient(135deg, var(--blue-pale), #BFDBFE);
    display: flex; align-items: center; justify-content: center;
    color: #90CAF9; font-size: 3rem;
    position: relative;
}
.news-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--blue-dark); color: #fff;
    font-size: .62rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; padding: .2rem .65rem; border-radius: 20px;
}
.news-card-body { padding: 1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.news-card-title { font-size: .875rem; font-weight: 700; line-height: 1.4; margin-bottom: .4rem; }
.news-card-date  { font-size: .72rem; color: #94a3b8; margin-top: auto; display: flex; align-items: center; gap: .3rem; }

/* ════════════
   DIRECTORIO
════════════ */
.dir-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 12px rgba(13,71,161,.07);
    overflow: hidden;
}
.dir-card-header {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
    padding: 1.25rem 1.5rem; color: #fff;
    display: flex; align-items: center; gap: .75rem;
    font-size: 1rem; font-weight: 700;
}
.dir-row {
    display: flex; align-items: center; gap: 1rem;
    padding: .9rem 1.5rem; border-bottom: 1px solid #f0f4f8;
    transition: background .15s;
}
.dir-row:last-child { border-bottom: none; }
.dir-row:hover { background: var(--blue-pale); }
.dir-icon-wrap {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--blue-pale); color: var(--blue-main);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.dir-row-name { font-size: .875rem; font-weight: 700; color: #1a2340; }
.dir-row-ext  { font-size: .78rem; color: #64748b; }
.dir-row-ext strong { color: var(--blue-main); }

/* ════════════
   FOOTER
════════════ */
.portal-footer {
    background: linear-gradient(135deg, #082C6E, #0D47A1);
    color: rgba(255,255,255,.7); text-align: center;
    padding: 2rem; font-size: .78rem; margin-top: 1rem;
}
.portal-footer strong { color: #fff; }

/* ════════════
   LOGIN
════════════ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #082C6E 0%, #0D47A1 50%, #0288D1 100%);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    position: relative; overflow: hidden;
}
.login-page::before {
    content: ''; position: absolute; top: -150px; right: -150px;
    width: 500px; height: 500px; background: rgba(255,255,255,.05); border-radius: 50%;
}
.login-card {
    background: #fff; border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,.3);
    padding: 3rem 2.5rem; width: 100%; max-width: 420px;
    text-align: center; position: relative; z-index: 1;
}
.login-card .logo { height: 80px; margin-bottom: 1.25rem; }
.login-card h1 { font-size: 1.3rem; font-weight: 800; color: var(--blue-dark); margin-bottom: .3rem; }
.login-card .subtitle { font-size: .8rem; color: #94a3b8; margin-bottom: 2rem; }
.login-card .form-control {
    border-radius: 10px; border: 1.5px solid #e2e8f0;
    padding: .7rem 1rem; font-size: .9rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color .2s, box-shadow .2s;
}
.login-card .form-control:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(66,165,245,.2); outline: none; }
.btn-login {
    background: linear-gradient(135deg, var(--blue-main), var(--blue-light));
    border: none; border-radius: 10px; color: #fff;
    font-weight: 700; padding: .8rem; width: 100%;
    font-size: .95rem; font-family: 'Poppins', sans-serif;
    cursor: pointer; transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 16px rgba(21,101,192,.4);
}
.btn-login:hover { opacity: .9; transform: translateY(-1px); }

/* ════════════
   RESPONSIVE
════════════ */
@media (max-width: 991px) {
    .hero-title { font-size: 2rem; }
    .hero-visual { display: none; }
    .stats-bar-inner { grid-template-columns: repeat(2,1fr); }
    .stat-item:nth-child(2) { border-right: none; }
}
@media (max-width: 767px) {
    .nav-links, .nav-right { display: none; }
    .nav-hamburger { display: block; }
    .hero { padding: 2rem 1.5rem; min-height: 320px; }
    .hero-title { font-size: 1.6rem; }
    .stats-bar-inner { grid-template-columns: repeat(2,1fr); }
    .portal-content { padding: 1.5rem 1rem; }
}
