/* ERS.control — acabado visual sobrio y profesional */
:root {
  --ers-navy: #0b2138;
  --ers-navy-soft: #123452;
  --ers-blue: #1976b9;
  --ers-blue-deep: #125a91;
  --ers-sky: #4a9fcf;
  --ers-ink: #172433;
  --ers-muted: #627487;
  --ers-line: #dce5ec;
  --ers-surface: #ffffff;
  --ers-canvas: #f4f7f9;
  --ers-success: #2f886c;
  --ers-shadow: 0 10px 30px rgba(19, 45, 68, .09);
}

body, button, input, textarea, select {
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sitio público y acceso: elimina brillos y degradados excesivos. */
body { background: var(--ers-canvas); color: var(--ers-ink); }
header, .navbar, nav {
  background: rgba(11, 33, 56, .97) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.10);
}
header a, nav a, .logo, .brand { text-shadow: none !important; }
header a:hover, nav a:hover { color: #9cc9e1 !important; }

#inicio, .hero, .hero-section { background: #123b59 !important; }
#inicio::before, .hero::before, .hero-section::before { opacity: .12 !important; }

h1, h2, h3 { letter-spacing: -.025em; text-shadow: none !important; }
h1 { font-weight: 700 !important; }
p { line-height: 1.65; }

.btn, button, .button, input[type="submit"] {
  background: var(--ers-blue) !important;
  border-color: var(--ers-blue) !important;
  box-shadow: none !important;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn:hover, button:hover, .button:hover, input[type="submit"]:hover {
  background: var(--ers-blue-deep) !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}
.btn-outline, .secondary-btn, .btn-secondary {
  background: transparent !important;
  color: var(--ers-blue) !important;
  border: 1px solid var(--ers-blue) !important;
  box-shadow: none !important;
}

/* Portada sobria: contraste alto y sin estética neón. */
#inicio .hero-text h1, .hero .hero-text h1, .hero h1 { color: #ffffff !important; text-shadow: none !important; }
#inicio .hero-text h1 span, .hero .hero-text h1 span, .hero h1 span { color: #8fc6e2 !important; text-shadow: none !important; }
#inicio .hero-text h2, .hero .hero-text h2, .hero h2 { color: #e4eff6 !important; text-shadow: none !important; }
#inicio .hero-text p, .hero .hero-text p, .hero p { color: #d1e0ea !important; }
#inicio .hero-image img, .hero .hero-image img { box-shadow: none !important; filter: none !important; }
#inicio .btn-primary, .hero .btn-primary { background: #1b719f !important; border-color: #1b719f !important; }
#inicio .btn-secondary, .hero .btn-secondary { color: #e7f2f8 !important; border-color: #8bbbd4 !important; }

/* Acceso: conserva su fondo original y reduce los brillos de la tarjeta. */
.login-container { background: transparent !important; }
.login-card { background: rgba(255,255,255,.96) !important; border: 1px solid #d7e1e8 !important; box-shadow: 0 14px 34px rgba(4,24,43,.18) !important; }
.login-card h1 { color: #173b59 !important; text-shadow: none !important; }
.login-card h2, .login-card .welcome, .login-card label { color: #526779 !important; text-shadow: none !important; }
.login-card .logo { filter: none !important; box-shadow: none !important; }
.login-card .input-box input { background: #fff !important; color: #172433 !important; border: 1px solid #c9d7e2 !important; }
.login-card .options a, .login-card .request a { color: #17669b !important; text-shadow: none !important; }
.login-card button, .login-card #loginBtn { background: #1b719f !important; border-color: #1b719f !important; box-shadow: none !important; }

.card, .project-card, .service-card, .login-card, .login-box, form {
  border: 1px solid var(--ers-line) !important;
  box-shadow: var(--ers-shadow) !important;
  border-radius: 14px !important;
}
input, select, textarea {
  border: 1px solid #cbd7e1 !important;
  background: #fff !important;
  color: var(--ers-ink) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ers-blue) !important;
  outline: 3px solid rgba(25,118,185,.14) !important;
}

/* Dashboard: tarjetas de métricas compactas, legibles y sin aspecto neón. */
.app-shell, .dashboard, .main-content { background: #f5f7f9 !important; }
.sidebar { background: #102c49 !important; box-shadow: none !important; }
.brand-home-link { display: inline-block; color: inherit; text-decoration: none; cursor: pointer; }
.brand-home-link:hover { opacity: .9; }
.brand-home-link:focus-visible { outline: 2px solid #8fc6e2; outline-offset: 6px; border-radius: 5px; }
.sidebar .nav-item, .sidebar-nav .nav-item { color: #d7e3ed !important; }
.sidebar .nav-item:hover, .sidebar .nav-item.active, .sidebar-nav .active {
  background: rgba(122, 181, 216, .18) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #6aaed3 !important;
}
.topbar, .header, .main-header { background: #fff !important; border-bottom: 1px solid var(--ers-line) !important; }
.main-content h1, .main-content h2, .main-content h3, .page-title { color: var(--ers-ink) !important; }
.card, .metric-card, .stat-card, .dashboard-card {
  background: var(--ers-surface) !important;
  border: 1px solid var(--ers-line) !important;
  box-shadow: 0 5px 16px rgba(20, 48, 73, .06) !important;
}
.metric-value, .stat-value, .kpi-value { color: var(--ers-navy) !important; font-weight: 720 !important; }
.metric-label, .stat-label, .text-muted, .muted { color: var(--ers-muted) !important; }
.status-connected, .status-online { color: var(--ers-success) !important; background: #e7f3ee !important; }

/* Historia, contacto y redes: una zona final ordenada y fácil de recorrer. */
.contact { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.contact > p { margin: 0; }
.social-icon { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid #c9d8e3; border-radius: 50%; color: #234a68 !important; background: #fff !important; font: 700 16px/1 Arial, sans-serif; text-decoration: none; box-shadow: none !important; transform: none !important; }
.social-icon:hover { color: #fff !important; background: #1b6598 !important; border-color: #1b6598; }
.social-youtube:hover { background: #b52b2b !important; border-color: #b52b2b; }
.social-linkedin { font-size: 15px; }
.company-story { margin-top: 0; text-align: left; }
.company-story > h2, .company-story > .section-kicker { text-align: center; }
.section-kicker { margin: 0 0 8px; color: #477c9f; font-size: 12px; font-weight: 750; letter-spacing: .14em; }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.story-grid article { padding: 26px; border: 1px solid var(--ers-line); border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(20,48,73,.05); }
.story-grid h3 { margin-top: 0; color: var(--ers-navy); font-size: 20px; }
.story-grid p { margin-bottom: 0; color: #46596b; }
.story-link { display: inline-flex; gap: 8px; margin-top: 16px; color: #17669b; font-weight: 700; text-decoration: none; }
.story-link:hover { color: #0f4d78; }

/* Contenido reservado para futuras imágenes y demostraciones. */
.multimedia-coming-soon { position: relative; overflow: hidden; }
.coming-soon-badge { display: inline-flex; margin: -4px 0 22px; padding: 7px 12px; border-radius: 999px; color: #496b82; background: #e8f0f5; font-size: 12px; font-weight: 750; letter-spacing: .1em; }
.media-preview { filter: blur(2px); opacity: .48; pointer-events: none; user-select: none; }
.multimedia-coming-soon::after { content: "Contenido multimedia en preparación"; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 1; width: max-content; max-width: calc(100% - 40px); padding: 12px 17px; border: 1px solid #cbdce7; border-radius: 10px; color: #294e68; background: rgba(255,255,255,.93); font-size: 15px; font-weight: 700; box-shadow: 0 7px 18px rgba(20,48,73,.10); }

/* Pie corporativo inspirado en una estructura de información industrial. */
#contacto-legacy, body > footer { display: none !important; }
.company-footer {
  margin-top: 56px; padding: 64px 24px 22px; color: #e6eff6;
  background: #0c385a; border-top: 5px solid #164b70;
}
.company-footer-inner { max-width: 1280px; margin: 0 auto; }
.brand-story { max-width: 850px; }
.footer-kicker { margin: 0 0 10px; color: #8fc0df; font-size: 12px; letter-spacing: .16em; font-weight: 750; }
.partner-logos { display: flex; align-items: stretch; gap: 14px; margin-bottom: 28px; }
.partner-logo { display: inline-flex; align-items: center; gap: 13px; min-height: 76px; padding: 12px 18px; text-decoration: none; color: #f5f9fc; border: 1px solid rgba(230,239,246,.22); border-radius: 12px; }
.partner-logo img { display: block; object-fit: contain; }
.ers-logo { background: rgba(255,255,255,.06); }
.ers-logo img { width: 75px; height: 54px; }
.ers-logo span { font-size: 23px; line-height: 1; font-weight: 750; letter-spacing: -.04em; }
.ers-logo small { color: #8fc0df; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.partnership-mark { align-self: center; color: #7daac6; font-size: 21px; font-weight: 300; }
.group-logo { color: #e6eff6; background: rgba(255,255,255,.06); }
.group-logo:hover { color: #fff; background: rgba(255,255,255,.11); border-color: #8fccec; }
.group-service-wordmark { display: block; width: 250px; height: 60px; }
.group-service-emblem { display: block; width: 58px; height: 58px; }
.company-footer h2 { max-width: 720px; margin: 0 0 14px; color: #fff; font-size: clamp(27px, 3vw, 39px); letter-spacing: -.035em; }
.brand-story > p:not(.footer-kicker) { max-width: 780px; margin: 0 0 10px; color: #c1d4e2; line-height: 1.72; }
.mission-vision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 780px; margin: 24px 0 18px; }
.mission-vision-grid article { padding: 18px; border: 1px solid rgba(230,239,246,.18); border-radius: 12px; background: rgba(255,255,255,.055); }
.mission-vision-grid h3 { margin: 0 0 8px; color: #9bc7e1; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.mission-vision-grid p { margin: 0; color: #e1edf5; line-height: 1.58; }
.group-service-summary { max-width: 780px; margin-top: 16px; padding: 17px 0 0; border-top: 1px solid rgba(230,239,246,.19); }
.group-service-summary strong { display: block; color: #fff; font-size: 16px; }
.group-service-summary p { margin: 6px 0 0; color: #bdd2e1; line-height: 1.62; }
.footer-columns { display: grid; grid-template-columns: 1.35fr 1fr 1fr .8fr; gap: 32px; padding: 42px 0 36px; }
.footer-column { min-width: 0; }
.footer-column h3 { margin: 0 0 15px; color: #9bc7e1; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.footer-column a, .footer-column p { display: block; margin: 0 0 10px; color: #edf5fa; font-size: 15px; line-height: 1.45; text-decoration: none; }
.footer-column a:hover { color: #8fccec; }
.footer-column p { color: #bad0df; }
.company-footer .social-links { display: flex; gap: 10px; }
.company-footer .social-icon { width: 36px; height: 36px; border-color: rgba(230,239,246,.4); color: #fff !important; background: transparent !important; }
.social-icon svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.company-footer .social-icon:hover { background: #1c6c9e !important; border-color: #1c6c9e; }
.company-footer .social-youtube:hover { background: #b53030 !important; border-color: #b53030; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 21px; border-top: 1px solid rgba(230,239,246,.22); color: #b8cedd; font-size: 14px; }
.footer-bottom a { color: #d9edf8; text-decoration: none; }
.footer-bottom a:hover { color: #8fccec; }
.footer-group-link { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; font-weight: 650; }
.footer-group-link .group-service-emblem { width: 27px; height: 27px; }

@media (max-width: 720px) {
  h1 { font-size: clamp(2rem, 9vw, 2.7rem) !important; }
  .card, .project-card, .service-card { border-radius: 12px !important; }
  .story-grid { grid-template-columns: 1fr; }
  .company-footer { margin-top: 36px; padding-top: 46px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mission-vision-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .partner-logos { gap: 10px; }
  .partner-logo { padding: 10px; min-height: 66px; }
  .ers-logo img { width: 58px; }
  .ers-logo span { font-size: 18px; }
  .group-service-emblem { width: 48px; height: 48px; }
  .group-service-wordmark { width: 180px; height: 45px; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
