/* ══════════════════════════════════════════════════════════════════════
   COMPONENTS — Buttons, Cards, Nav, Forms
═════════════════════════════════════════════════════════════════════ */

/* ══ NAVIGATION ══ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 14px 56px;
  background: rgba(4, 8, 16, 0.97);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid rgba(245,158,11,0.35);
  box-shadow: 0 1px 0 rgba(245,158,11,0.1), 0 4px 24px rgba(0,0,0,0.5);
  transition: padding var(--transition-normal);
}

nav.slim { padding: 8px 56px; }

/* Logo — sin filtro, tamaño fijo */
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: none !important;
  display: block;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.92);
  font-family: 'Manrope', system-ui, sans-serif;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0; right: 0;
  height: 2px;
  background: var(--sun);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { transform: scaleX(1); }

/* Right side */
.nav-r {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* CTA button */
.btn-cta {
  padding: 9px 22px;
  background: var(--sun);
  color: #000 !important;
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: 8px;
  letter-spacing: 0.3px;
  font-family: 'Manrope', sans-serif;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 12px rgba(245,158,11,0.35);
  white-space: nowrap;
}
.btn-cta:hover {
  background: #ffb020;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,158,11,0.5);
}


/* Theme toggle */
.theme-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  color: rgba(255,255,255,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}
.theme-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(245,158,11,0.4);
  color: var(--sun);
  transform: rotate(12deg);
}
.theme-btn svg {
  display: block;
  transition: transform 0.3s ease;
}

.nav-r {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ══ NAV — LIGHT MODE ══ */
[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(10, 36, 114, 0.14);
  box-shadow: 0 1px 0 rgba(10,36,114,0.06), 0 4px 32px rgba(10,25,41,0.10);
}

[data-theme="light"] .nav-links a {
  color: rgba(10, 25, 41, 0.78);
  text-shadow: none;
}

[data-theme="light"] .nav-links a:hover {
  color: var(--sun);
}

[data-theme="light"] .theme-btn {
  background: rgba(10, 25, 41, 0.05);
  border-color: rgba(10, 25, 41, 0.18);
  color: #0a1929;
}

[data-theme="light"] .theme-btn:hover {
  background: rgba(10, 25, 41, 0.11);
}

[data-theme="light"] .ham span {
  background: #0a1929;
}

/* ══ MOB-MENU — LIGHT MODE ══ */
[data-theme="light"] .mob-menu {
  background: rgba(248, 250, 253, 0.99);
  backdrop-filter: blur(20px);
}

[data-theme="light"] .mob-header {
  border-bottom-color: rgba(10, 25, 41, 0.1);
}

[data-theme="light"] .mob-close {
  background: rgba(10, 25, 41, 0.07);
  border-color: rgba(10, 25, 41, 0.14);
  color: #0a1929;
}

[data-theme="light"] .mob-menu a {
  color: rgba(10, 25, 41, 0.78);
  border-bottom-color: rgba(10, 25, 41, 0.07);
}

[data-theme="light"] .mob-menu a:hover {
  background: rgba(217, 119, 6, 0.08);
  color: var(--sun);
}

/* Ham — oculto en desktop, visible solo en móvil */
.ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.ham span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}



/* Mobile Menu */
.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.98);
  backdrop-filter: blur(20px);
  z-index: 290;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow-y: auto;
  animation: mobFadeIn 0.25s ease;
}

@keyframes mobFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mob-menu.open { display: flex; }

/* Header del menú con logo y botón cerrar */
.mob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(245,158,11,0.15);
  margin-bottom: 12px;
}

.mob-close {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.mob-close:hover { background: rgba(255,255,255,0.18); }

/* Links del menú */
.mob-menu a {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease, border-color 0.2s ease;
  display: block;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.mob-menu a:hover {
  color: #fff;
  background: rgba(245,158,11,0.1);
  padding-left: 36px;
  border-bottom-color: rgba(245,158,11,0.3);
}

/* CTA dentro del menú */
.mob-cta {
  margin: 24px 28px 32px !important;
  background: var(--sun) !important;
  color: #000 !important;
  text-align: center !important;
  border-radius: 10px !important;
  padding: 16px 24px !important;
  font-size: 1.1rem !important;
  border-bottom: none !important;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
.mob-cta:hover {
  background: #ffb020 !important;
  padding-left: 24px !important;
}

/* Hamburger visible solo en móvil */
@media (max-width: 1100px) {
  .ham { display: flex !important; }
  .nav-links { display: none !important; }
  .btn-cta { display: none !important; }
  .theme-btn { display: flex; }
}

/* ══ BUTTONS ══ */
.btn-cta {
  background: var(--sun);
  color: var(--tinv);
  padding: 12px 24px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-normal), transform var(--transition-fast),
    box-shadow var(--transition-normal);
  white-space: nowrap;
  font-family: var(--ff-body);
}

.btn-cta:hover {
  background: var(--sun-d);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--sun-glow);
}

.btn-primary {
  background: var(--sun);
  color: var(--tinv);
  padding: 15px 32px;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: transform var(--transition-normal), background var(--transition-normal),
    box-shadow var(--transition-normal);
}

.btn-primary:hover {
  background: var(--sun-d);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--sun-glow);
}

.btn-outline {
  background: transparent;
  color: var(--t0);
  padding: 15px 32px;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--bdr);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: border-color var(--transition-normal), background var(--transition-normal);
}

.btn-outline:hover {
  border-color: var(--sky);
  background: rgba(56, 189, 248, 0.06);
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--bdr);
  background: transparent;
  color: var(--t1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: border-color var(--transition-normal), transform var(--transition-slow),
    background var(--transition-normal);
}

.theme-btn:hover {
  border-color: var(--sun);
  transform: rotate(30deg);
  background: var(--sun-glow);
}

/* ══ CARDS ══ */
.card {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow),
    border-color var(--transition-slow), background var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--sun);
  background: rgba(245, 158, 11, 0.02);
}

/* ══ FORMS ══ */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t2);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--inp);
  border: 1.5px solid var(--bdr);
  border-radius: var(--radius-lg);
  color: var(--t0);
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  resize: none;
  min-height: 44px;
}

.form-field textarea {
  min-height: 120px;
}

.form-field input:placeholder,
.form-field textarea::placeholder {
  color: var(--t2);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--sun);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: var(--card);
}

.form-field select option {
  background: var(--card);
}

/* ══ THEME TOGGLE ══ */
.theme-btn:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 6px;
}

/* ══ FORM VALIDATION ══ */
input.error,
textarea.error,
select.error {
  border-color: #ef5350 !important;
  background: rgba(239, 83, 80, 0.08) !important;
  color: var(--t0);
}

input.error:focus,
textarea.error:focus,
select.error:focus {
  border-color: #ef5350 !important;
}

.form-error {
  font-size: 0.85rem;
  color: #ef5350;
  margin-top: 4px;
  font-weight: 500;
}

/* ══ CALCULATOR RESULT FEEDBACK ══ */
.calc-box {
  transition: box-shadow var(--transition-normal);
}

.calc-box.result-highlight {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.res-card {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.res-card.pulse {
  animation: pulse-scale 0.6s ease-out;
}

@keyframes pulse-scale {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.mob-cta-bar { display: none !important; }

/* ══ VIDEO MODAL CLOSE BUTTON ══ */
.video-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ══ ESTADO CARDS — hover via CSS (replaces onmouseover/onmouseout) ══ */
.estado-card {
  transition: background var(--transition-normal);
}

.estado-primary:hover {
  background: rgba(245, 158, 11, 0.12) !important;
}

.estado-secondary:hover {
  background: rgba(245, 158, 11, 0.09) !important;
}
