﻿/* 
  Abogados Previsionales - High Contrast & Elegant Redesign 
  Base variables focused on accessibility and corporate look.
*/
:root {
  /* Colors - High Contrast Corporate */
  --primary: #003366; /* Navy Blue */
  --primary-light: #004b87; 
  --primary-dark: #001a33;
  --accent: #c5a059; /* Elegant Gold */
  
  /* Backgrounds */
  --bg-main: #ffffff;
  --bg-offset: #f8f9fc;
  --bg-dark: #002244;
  
  /* Text Colors */
  --text-main: #111827; /* Near black for maximum readability */
  --text-muted: #4b5563; /* Dark grey for secondary text */
  --text-inverse: #ffffff; /* White text for dark backgrounds */
  
  /* Utility */
  --border-light: #e5e7eb;
  --whatsapp: #128c7e;
  --whatsapp-hover: #075e54;
  
  /* Typography */
  --font-base: 'Inter', system-ui, sans-serif;
  --font-heading: 'Playfair Display', serif; /* Elegant serif for headings */
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-base);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  font-size: 1.15rem; /* Very legible base size */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Defaults */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Header */
.header {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header__logo img {
  height: 50px;
  width: auto;
}
.header__logo-text {
  display: flex;
  flex-direction: column;
}
.header__logo-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}
.header__logo-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation Desktop */
.nav { display: flex; align-items: center; gap: 2.5rem; }
.nav__list { display: flex; gap: 2rem; }
.nav__link {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1rem;
}
.nav__link:hover, .nav__link.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* Mobile Nav / Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger__line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: 0.3s;
}
.mobile-nav {
  display: none; /* hidden by default */
}

/* Responsive Nav */
@media (max-width: 992px) {
  .nav { display: none; }
  .hamburger { display: block; z-index: 1000; position: relative; }
  /* Hamburger cross animation */
  .hamburger.is-active .hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.is-active .hamburger__line:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-active .hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  /* (Add your favorite mobile nav overlay logic here, handled via JS) */
  .mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    padding: 2rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    z-index: 999;
  }
  .mobile-nav__link {
    font-size: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 600;
  }
  .mobile-nav__cta { margin-top: 1.5rem; }
}

/* Split Hero Section */
.hero {
  padding: 1.5rem 0 1rem 0;
  background-color: var(--bg-offset);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero__content {
  max-width: 600px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 51, 102, 0.1);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.hero__title {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  line-height: 1.15;
}
.hero__title span {
  color: var(--primary);
}
.hero__description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.hero__stats {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}
.hero__stat-number {
  color: var(--primary); 
  font-size: 1.75rem !important; 
  font-weight: 700;
}
.hero__image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.hero__image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Mobile Hero adjustments */
@media (max-width: 992px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero__title { font-size: 2.5rem; }
  .hero__badge { margin: 0 auto 1.5rem auto; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}
.btn--primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}
.btn--primary:hover {
  background-color: var(--primary-light);
  color: var(--text-inverse);
  transform: translateY(-2px);
}
.btn--whatsapp {
  background-color: var(--whatsapp);
  color: var(--primary-dark);
  font-weight: 700;
}
.btn--whatsapp:hover {
  background-color: var(--whatsapp-hover);
  color: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Trust Bar */
.trust-bar {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 2rem 0;
}
.trust-bar__inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}
.trust-bar__icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

/* Section Common */
.section {
  padding: 5rem 0;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-size: 2.5rem;
}
.accent-line {
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  margin: 1rem auto;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  border-color: var(--primary);
}
.service-card__icon {
  width: 50px;
  height: 50px;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.service-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.service-card__text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}
.service-card__link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s;
}
.service-card__link:hover svg {
  transform: translateX(5px);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--text-inverse);
  padding: 5rem 0;
  text-align: center;
}
.cta-banner__title {
  color: var(--text-inverse);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}
.cta-banner__text {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}
.footer__desc { opacity: 0.95;
  font-size: 1rem;
}
.footer__title {
  color: var(--text-inverse);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.5rem;
}
.footer__links li {
  margin-bottom: 0.75rem;
}
.footer__links a { color: var(--text-inverse); opacity: 0.95;
}
.footer__links a:hover {
  opacity: 1;
  color: var(--accent);
}
.footer__contact-info li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.footer__contact-info svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.footer__bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* B2B Brands (Specific) */
.brands-section {
  padding: 4rem 0;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
}
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  justify-content: center;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.brands-grid img {
  height: 90px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: grayscale(100%) opacity(70%);
  transition: all 0.3s ease;
}
.brands-grid img:hover {
  filter: grayscale(0%) opacity(100%);
}

/* Forms */
.form-section {
  padding: 5rem 0;
  background-color: var(--bg-main);
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-offset);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-base);
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.8s ease-in-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ========== WhatsApp Widget ========== */
.wa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
}
.wa-btn {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  flex-shrink: 0;
}
.wa-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,0.55); }
.wa-btn__icon { width: 32px; height: 32px; color: #fff; flex-shrink: 0; }
.wa-btn__notif {
  position: absolute; top: 0; right: 0;
  width: 16px; height: 16px;
  background: #ef4444; border-radius: 50%;
  border: 2.5px solid #fff;
  animation: notif-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
.wa-btn__notif.hidden { display: none; }
@keyframes notif-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.wa-popup {
  position: absolute; bottom: calc(60px + 14px); right: 0;
  width: 300px; max-width: calc(100vw - 48px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: scale(0.85) translateY(16px);
  transform-origin: bottom right;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease, visibility 0.2s;
}
.wa-popup.active { transform: scale(1) translateY(0); opacity: 1; visibility: visible; pointer-events: all; }
.wa-popup__header { background: #075E54; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.wa-popup__info { display: flex; align-items: center; gap: 10px; }
.wa-popup__avatar { width: 40px; height: 40px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-popup__avatar-icon { width: 20px; height: 20px; color: #fff; }
.wa-popup__name { color: #fff; font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.wa-popup__status { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,0.75); font-size: 0.72rem; margin-top: 2px; }
.wa-popup__status-dot { width: 7px; height: 7px; background: #25D366; border-radius: 50%; flex-shrink: 0; }
.wa-popup__close { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.75); padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: color 0.15s; line-height: 0; }
.wa-popup__close:hover { color: #fff; }
.wa-popup__close svg { width: 18px; height: 18px; }
.wa-popup__body { background: #ECE5DD; padding: 16px; min-height: 90px; }
.wa-popup__bubble { background: #fff; border-radius: 0 10px 10px 10px; padding: 10px 12px; max-width: 88%; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.wa-popup__bubble p { margin: 0; font-size: 0.845rem; color: #303030; line-height: 1.5; }
.wa-popup__time { display: block; text-align: right; font-size: 0.68rem; color: #8a8a8a; margin-top: 4px; }
.wa-popup__input-wrap { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f0f0f0; }
.wa-popup__input { flex: 1; border: none; background: #fff; border-radius: 24px; padding: 9px 14px; font-size: 0.875rem; color: #303030; outline: none; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.wa-popup__input::placeholder { color: #aaa; }
.wa-popup__send { width: 38px; height: 38px; background: #25D366; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; line-height: 0; }
.wa-popup__send:hover { background: #20bd5a; }
.wa-popup__send svg { width: 17px; height: 17px; fill: #fff; }

/* ========== Badge Punto Online con Pulso ========== */
.hero__badge-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.hero__badge-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #22c55e;
  opacity: 0.7;
  animation: pulse-halo 2s ease-out infinite;
}
@keyframes pulse-halo {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}
