﻿﻿:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #111111;
  --muted: #6c757d;
  /* Paleta Surtired */
  --brand-blue: #3f6ea9; /* Azul principal del logo */
  --brand-teal: #2aa3a1; /* Verde/azul secundario del isotipo */
  --brand-dark: #0b1b2b; /* Fondo navbar */
  --primary: var(--brand-blue);
  --danger: #dc3545;
  --accent: var(--brand-teal);
}

* { box-sizing: border-box; }
html, body { margin: 0 !important; padding: 0 !important; overflow-x: hidden; height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; line-height: 1.5; }

/* Encabezado: sin recortes arriba */
body { margin-top: 0 !important; }
.site-header { margin-top: 0 !important; padding-top: .01px; position: relative; z-index: 2500; }
.site-header > .bg-primary { margin-top: 0 !important; border-top: 0 !important; }
/* Guard: some environments render a tiny gap above header. Pull up and fill with brand color */
/* Revert guard: avoid increasing blue bar height */
.site-header { margin-top: 0; }
/* Hairline guard to hide any 1px gap above the header without changing layout */
.site-header::before { content: none; }

main h1 { margin-top: 1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: var(--card); padding: 1rem; border: 1px solid #e5e7eb; border-radius: .5rem; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; margin-top: 1rem; }
.price-card { background: var(--card); padding: 1rem; border: 1px solid #e5e7eb; border-radius: .5rem; }
.price-card .speed { color: var(--muted); }
.price-card .price { font-size: 1.25rem; color: var(--primary); font-weight: 700; }
.price-card.featured { outline: 2px solid var(--accent); }

.form { display: grid; gap: .75rem; margin-top: 1rem; }
.field { display: grid; gap: .25rem; }
.actions { margin-top: .5rem; }

.alert { padding: .75rem 1rem; border-radius: .375rem; margin-top: 1rem; }
.alert.success { background: #d1e7dd; border: 1px solid #badbcc; color: #0f5132; }
.alert.error { background: #f8d7da; border: 1px solid #f5c2c7; color: #842029; }
.error-text { color: #842029; }

.site-footer { border-top: 1px solid #e5e7eb; margin-top: 2rem; padding: 1rem 0; color: var(--muted); }
.help { color: var(--muted); font-size: .9rem; }
/* Footer logo sizing and alignment */
.site-footer .footer-logo { height: 60px; width: auto; display: block; margin-left: -12px; }

/* Admin session indicator */
.session { margin-left: auto; color: var(--muted); }
.badge { background: var(--primary); color: #fff; padding: .15rem .5rem; border-radius: 999px; font-weight: 700; font-size: .75rem; letter-spacing: .02em; }
.session-text { color: var(--muted); font-size: .85rem; }
.session-link { color: var(--text); text-decoration: none; opacity: .85; }
.session-link:hover { text-decoration: underline; opacity: 1; }

/* Carousel placeholder sizing (exact 1600x600 ratio -> fixed height 600px) */
.carousel-placeholder {
  height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: .5rem;
}
@media (min-width: 768px) {
  .carousel-placeholder { height: 600px; }
}
@media (min-width: 1200px) {
  .carousel-placeholder { height: 600px; }
}
/* Full-bleed sections spanning viewport width */
.full-bleed { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.full-bleed .carousel-placeholder { border-radius: 0; }
.full-bleed .carousel { border-radius: 0; }

/* Slow zoom (Ken Burns) effect for hero slider */
.carousel-item { overflow: hidden; }
.carousel-placeholder.kenburns {
  will-change: transform;
  transform-origin: center center;
  /* Reverse direction (zoom-out) and a bit faster */
  animation: kb-zoom 12s ease-in-out infinite alternate;
}
@keyframes kb-zoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-placeholder.kenburns { animation: none; }
}

/* Navbar active state in blue */
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link.show {
  color: var(--primary) !important;
}

/* Improve visibility of admin session links on dark navbar */
.navbar-dark .session-text { color: #cfd8e3; }
.navbar-dark .session-link { color: #ffffff; opacity: .9; }
.navbar-dark .session-link:hover { color: #ffffff; opacity: 1; text-decoration: underline; }

/* User menu hamburger (3 lines) */
.hamburger { display: inline-flex; flex-direction: column; gap: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #ffffff; border-radius: 2px; }

/* IntegraciÃ³n con Bootstrap en colores de marca */
.navbar-dark.bg-dark { background-color: var(--brand-dark) !important; padding-top: .15rem; padding-bottom: .15rem; }
.navbar-dark.bg-dark { background-color: var(--brand-dark) !important; padding-top: .15rem; padding-bottom: .15rem; }
.navbar-dark .navbar-nav .nav-link { padding-top: .25rem; padding-bottom: .25rem; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.text-primary { color: var(--primary) !important; }

/* Logo ajustes */
.logo-brand { display: block; height: 28px; }

/* Brand mark sizing: preserve aspect ratio (do NOT set both width+height in markup) */
.brand-mark,
.brand-mark-md,
.brand-mark-lg,
.brand-mark-sm {
  display: inline-block;
  height: auto; /* prefer explicit height via individual rules below */
  width: auto !important;
  max-width: 100%;
  object-fit: contain;
}
.brand-mark { height: 24px; }
.brand-mark-md { height: 36px; }
.brand-mark-lg { height: 84px; }
.brand-mark-sm { height: 20px; }

/* Fallback selector to correct images that hardcode width/height attributes
   (e.g. <img src="assets/img/logo-mark.png" width="72" height="72">)
   This forces the browser to keep the natural aspect ratio by only setting
   height and letting width be automatic. */
img[src$="/logo-mark.png"], img[src$="logo-mark.png"] {
  height: auto !important; /* keep CSS-driven heights below */
  max-height: 84px; /* avoid excessively large occurrences */
  width: auto !important;
  object-fit: contain !important;
  display: inline-block !important;
}

/* Specific override for login small avatar instance that used width/height attrs */
img.mb-2[src$="logo-mark.png"] {
  height: 72px !important;
  width: auto !important;
}

/* Narrow container to center and trim navbar width */
.container-narrow { max-width: 980px; }
/* Extra narrow content container (e.g., PQR) */
.container-pqr { max-width: 760px; margin-left: auto; margin-right: auto; }
/* Centered, trimmed navbar shell */
.navbar-dark.bg-dark > .container.container-narrow { background: var(--brand-dark); border-radius: 0; padding: .18rem .8rem; border-bottom: 3px solid var(--primary); }
.navbar-shell { background: var(--brand-dark); border-radius: 0; padding: .18rem .8rem; border-bottom: 3px solid var(--primary); }
.navbar-dark.bg-dark { background-color: var(--brand-dark) !important; padding-top: .15rem; padding-bottom: .15rem; }
.navbar-dark .navbar-nav .nav-link { padding-top: .4rem; padding-bottom: .4rem; font-weight: 700; }

/* Circular logo badge at navbar start */
.logo-circle { width: 84px; height: 84px; min-width: 84px; border-radius: 50%; background: #ffffff; /* center content precisely */
  display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); border: 3px solid var(--primary); position: relative; margin-top: -14px; margin-bottom: -18px; z-index: 3000; }
.logo-circle img { /* ensure the mark sits exactly centered inside the circle and is larger */
  display: block !important; margin: 0 auto !important;
  width: auto !important; height: auto !important;
  /* increased to 94% as requested so the isotipo is visually larger inside the badge */
  max-width: 94% !important; max-height: 94% !important; object-fit: contain !important;
}
@media (max-width: 575.98px) {
  .logo-circle { width: 66px; height: 66px; min-width: 66px; border-width: 2px; margin-top: -8px; margin-bottom: -12px; }
  .logo-circle img { width: 96%; height: 96%; }
}

/* Ensure header overlays a bit the hero */
.site-header { position: relative; z-index: 2500; }
.hero-underlap { margin-top: -32px; }
/* Fine-tune Hogar slider vertical offset to match Inicio */
.hogar-hero-align { margin-top: -10px; }

/* Top info bar */
.top-info { background: #ffffff; border-bottom: 1px solid #e5e7eb; }
.top-item { display: flex; align-items: center; gap: .5rem; }
.top-item .icon { color: var(--primary); font-size: 1.1rem; }
.top-item .label { line-height: 1.1; }
.top-item .label .muted { color: #6b7280; font-size: .85rem; }
.top-sep { display: none; width: 1px; height: 28px; background: #e5e7eb; }
@media (min-width: 768px) { .top-sep { display: block; } }

/* Social icons in blue bar */
.social-icons a { font-size: 1.1rem; opacity: .95; }
.social-icons a:hover { opacity: 1; filter: brightness(1.1); }
/* Make icon color follow link color (avoid unexpected reds) */
.social-icons a i { color: currentColor; }
.footer-logo { filter: none; }

/* Features (Seguridad, Velocidad, Confianza, Honestidad) */
.features-grid { margin-bottom: 1.25rem; }
.features-section { position: relative; z-index: 15000; margin-bottom: 24px; }
.feature-card { position: relative; background: var(--card); border-radius: .75rem; padding: 1rem 1rem 1.25rem; height: 100%; border: 1px solid #e5e7eb; transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease; cursor: pointer; overflow: visible; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.feature-card.active { transform: translateY(-6px) scale(1.02); box-shadow: 0 16px 32px rgba(0,0,0,.14); }
.feature-content { text-align: left; }
.feature-banner { display: none; }
.feature-circle { width: 96px; height: 96px; border-radius: 999px; display: grid; place-items: center; margin-left: .25rem; background: radial-gradient(65px 65px at 50% 50%, rgba(13,110,253,.18), rgba(13,110,253,.06) 60%, transparent 62%); }
.feature-icon { font-size: 2rem; color: #111; filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)); transition: transform .25s ease; }
.feature-card:hover .feature-icon { transform: scale(1.15); }
.feature-title { margin: .75rem 0 .35rem; font-weight: 800; font-size: 1.35rem; }
.feature-title-underline { width: 36px; height: 3px; background: var(--primary); border-radius: 2px; margin: 0 0 .5rem .1rem; }
.feature-desc { color: var(--muted); font-size: 1rem; }
.feature-divider { border-right: 1px dashed #d8dee6; }
.feature-nav { position: absolute; top: 40%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; background: #e7eef8; color: #111; border: 0; display: grid; place-items: center; z-index: 9999; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.feature-nav.left { left: 4px; }
.feature-nav.right { right: 4px; }
.feature-row { overflow-x: auto; overflow-y: visible; scroll-behavior: smooth; padding: .25rem 2.5rem; display: flex; flex-wrap: nowrap; gap: 1rem; position: relative; z-index: 9991; }

/* PQR loading toast */
.pqr-loading { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; align-items: center; gap: .75rem; padding: .75rem 1rem; background: rgba(11,27,43,.95); color: #fff; border-radius: .5rem; box-shadow: 0 12px 28px rgba(0,0,0,.35); z-index: 11000; pointer-events: none; }
.pqr-loading.show { display: inline-flex; }
.pqr-loading .msg { font-weight: 700; letter-spacing: .2px; }

/* PQR screen overlay (veil) */
.pqr-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; z-index: 10990; }
.pqr-overlay.show { display: block; }
.feature-row::-webkit-scrollbar { display: none; }
.feature-item { flex: 0 0 auto; width: clamp(280px, 30vw, 380px); }

/* Slick-like slider for features (inspiration only, no dependency) */
.features-section { position: relative; z-index: 10000; }
.features-section .slick-list { position: relative; z-index: 10001; overflow: hidden; padding: .25rem 2.5rem; min-height: 220px; }
.features-section .slick-track { position: relative; z-index: 10001; display: flex; gap: 1rem; align-items: stretch; will-change: transform; transition: transform .35s ease; }
.features-section .slick-slide { position: relative; z-index: 10001; flex: 0 0 auto; display: block; min-height: 240px; }
.features-section .slick-slide.slick-active { outline: none; }
.features-section .carousel-item { position: relative; display: block; }
.features-section .slick-slide { width: clamp(280px, 30vw, 380px); }

/* Tiny-slider fallback and base styles */

  

/* Ensure the hero carousel stays below feature banners */
#heroCarousel { position: relative; z-index: 1; }
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next { display: none !important; }
/* Hogar hero carousel, same behavior as Inicio */
#hogarCarousel { position: relative; z-index: 1; }
#hogarCarousel .carousel-control-prev,
#hogarCarousel .carousel-control-next { display: none !important; }

/* Gallery for Hogar */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1rem; margin-top: 1rem; }
.gallery-item { position: relative; display: block; border-radius: .5rem; overflow: hidden; border: 1px solid #e5e7eb; background: #f8fafc; transition: transform .2s ease, box-shadow .2s ease; }
.gallery-item:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.gallery-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: .25rem; opacity: 1; z-index: 2; }
.media-actions .btn { padding: .25rem .4rem; line-height: 1; }

/* Banner preview (no crop) */
.banner-preview { border: 1px solid #e5e7eb; border-radius: .5rem; overflow: hidden; background: #f8fafc; }
.banner-preview img { width: 100%; height: auto; display: block; object-fit: contain; }

/* Hogar: bloque lateral con fondo corporativo */
/* Rectangular background covering image + form */
.hogar-cta { 
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-teal) 100%);
  border-radius: 12px; padding: 1rem; box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.hogar-cta::after { content: ""; position: relative; display:block; }

/* Left illustration smaller than the form */
.hogar-side { 
  position: relative; border-radius: 8px; padding: .5rem; display: grid; place-items: center; min-height: 260px;
}
.hogar-side img { position: relative; max-width: 65%; max-height: 260px; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.2)); }

/* Drag & drop for slider ordering */
.gallery-item[draggable="true"] { cursor: grab; }
.gallery-item.dragging { opacity: .6; box-shadow: 0 0 0 2px var(--primary) inset; }
.gallery-placeholder { border: 2px dashed var(--primary); border-radius: .5rem; min-height: 120px; background: #eef5ff; }
/* Floating banner overlay fixed to viewport to avoid stacking issues */
.feature-float {
  position: fixed;
  width: 320px;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: .5rem;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 100000; /* por encima de carousel y navbar */
  pointer-events: none;
}
.feature-float.show { opacity: 1; transform: translateY(0); }

/* Ensure admin offcanvas overlays everything */
.offcanvas { z-index: 200000 !important; --bs-offcanvas-width: 300px; }
.offcanvas-backdrop { z-index: 199999 !important; }

/* Utility: keep dropdowns above following sections */
.z-up { position: relative; z-index: 12000; overflow: visible; }

/* Avatar in offcanvas header */
.avatar-circle { display:inline-grid; place-items:center; width:36px; height:36px; border-radius:50%; overflow:hidden; background:#1f2937; border:1px solid rgba(255,255,255,.2); }
.avatar-circle img { width:100%; height:100%; object-fit:cover; display:block; }
.avatar-lg { width: 80px; height: 80px; }
/* Small avatar for tables */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: #e5e7eb; }
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Ensure native selects on the update card stack above following cards */
.z-up .form-select { position: relative; z-index: inherit; }
.z-up .form-select:focus { z-index: 13000; }

/* Hogar overlay: form over full-bleed banner */
.hogar-form-wrap { position: relative; }
.hogar-form-overlay { position: absolute; inset: 0; display: flex; align-items: center; z-index: 3000; pointer-events: none; }
.hogar-form-overlay .card { pointer-events: auto; background: transparent; border: 0; box-shadow: none; }
/* White labels over the banner for readability */
.hogar-form-overlay .form-label { color: #ffffff; }
/* Match heading color over the banner */
.hogar-form-overlay h1,
.hogar-form-overlay h2,
.hogar-form-overlay h3,
.hogar-form-overlay h4,
.hogar-form-overlay h5,
.hogar-form-overlay h6,
.hogar-form-overlay .h1,
.hogar-form-overlay .h2,
.hogar-form-overlay .h3,
.hogar-form-overlay .h4,
.hogar-form-overlay .h5,
.hogar-form-overlay .h6 { color: #ffffff; }
/* The banner inside Hogar will follow the form height via JS */
.hogar-form-wrap .carousel-placeholder { height: auto; min-height: 200px; }


/* Responsive: reducir altura de hero/slider y banners en dispositivos móviles */
@media (max-width: 767.98px) {
  /* Make hero sliders much shorter on phones so they fit above the fold */
  .carousel-placeholder {
    height: 220px !important;
    min-height: 160px !important;
    border-radius: .4rem !important;
    background-size: cover !important;
    background-position: center !important;
  }
  /* Full-bleed carousels should also shrink */
  .full-bleed .carousel-placeholder {
    height: 220px !important;
  }

  /* Slightly faster Ken Burns on small screens (less motion but visible) */
  .carousel-placeholder.kenburns { animation-duration: 10s; }

  /* Reduce floating banner size so it doesn't overlap important content */
  .feature-float {
    width: 220px !important;
    height: 110px !important;
    right: 10px !important;
    bottom: 12px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
  }

  /* Hogar form/banners adjustments */
  .hogar-form-wrap .carousel-placeholder { min-height: 180px !important; height: auto !important; }
  .hogar-side { min-height: 160px !important; }
  .hogar-side img { max-width: 80% !important; max-height: 140px !important; height: auto !important; }

  /* Make banner previews crop to fill the available width and keep a consistent height */
  .banner-preview img { width: 100% !important; max-height: 180px !important; height: auto !important; object-fit: cover !important; }

  /* Make gallery items slightly shorter on phones */
  .gallery-item { min-height: 120px !important; }
  .gallery-item img { height: 100% !important; object-fit: cover !important; }
}

@media (max-width: 420px) {
  .carousel-placeholder { height: 180px !important; min-height: 140px !important; }
  .feature-float { width: 180px !important; height: 90px !important; }
  .hogar-side img { max-height: 110px !important; }
  .banner-preview img { max-height: 140px !important; }
}





