/* ===== VARIABLES ===== */
:root {
  --primary: #1a3c6e;
  --secondary: #2563b0;
  --dark: #0d1b2a;
  --light: #f0f4fa;
  --gray: #6c757d;
  --light-gray: #e8eef6;
  --white: #ffffff;
  --danger: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(26,60,110,0.18);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border-bottom-color: var(--primary);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.header__logo span {
  color: var(--secondary);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__link {
  font-weight: 500;
  color: var(--dark);
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover { color: var(--secondary); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3c6e 40%, #2563b0 100%);
  color: white;
  padding: 100px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__title span { color: #a8c8ff; }

.hero__subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 35px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: white;
  color: var(--secondary);
}

.btn-primary:hover {
  background: #a8c8ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

.btn-green {
  background: var(--secondary);
  color: white;
}

.btn-green:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ===== SECTIONS ===== */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-eyebrow {
  display: inline-block;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== CATEGORIES ===== */
.categories { background: var(--light-gray); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.category-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.category-card__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-card__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
}

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.why-card {
  background: white;
  border-radius: var(--radius);
  padding: 35px 25px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--primary);
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.why-card__icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.4rem;
  color: white;
}

.why-card__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.why-card__desc {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== PRODUCTS / SERVICES ===== */
.products-section { background: var(--light-gray); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 25px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e8eef6;
}

.product-card__body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.badge-civil       { background: #e3f2fd; color: #1565c0; }
.badge-laboral     { background: #fff9c4; color: #b45309; }
.badge-societario  { background: #ede7f6; color: #6d28d9; }
.badge-penal       { background: #fce4ec; color: #be185d; }
.badge-familia     { background: #e8f5e9; color: #166534; }
.badge-comercial   { background: #f3e5f5; color: #7c3aed; }

.product-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 6px;
  flex: 1;
}

.product-card__price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.product-card__btn {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.product-card__btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

/* ===== FILTER BUTTONS ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 35px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 25px;
  border: 2px solid var(--light-gray);
  background: white;
  color: var(--gray);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark);
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
  border-left: 4px solid var(--secondary);
  min-width: 260px;
}

.toast i { color: var(--secondary); font-size: 1rem; }

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(30px); opacity: 0; }
}

.toast.hide { animation: slideDown 0.3s ease forwards; }

/* ===== CONTACT ===== */
.contact-section { background: var(--light-gray); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.contact-form h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--dark);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark);
  margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  color: var(--dark);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37,99,176,0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-info-card {
  background: white;
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-left: 4px solid var(--secondary);
}

.contact-info-card__icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-info-card__value {
  font-weight: 700;
  color: var(--dark);
  font-size: 0.95rem;
}

.contact-info-card__sub {
  color: var(--gray);
  font-size: 0.85rem;
}

.map-placeholder {
  background: linear-gradient(135deg, #e8eef6, #c7d7ef);
  border-radius: var(--radius);
  padding: 40px 25px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px dashed var(--secondary);
}

.map-placeholder i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 12px; }
.map-placeholder p { color: var(--secondary); font-weight: 700; font-size: 1rem; }
.map-placeholder small { color: var(--gray); font-size: 0.85rem; }

/* ===== TERMS PAGE ===== */
.terms-page { background: var(--light-gray); }

.terms-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.terms-toc {
  background: white;
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}

.terms-toc h3 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-gray);
}

.terms-toc ul { display: flex; flex-direction: column; gap: 4px; }

.terms-toc a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
}

.terms-toc a:hover {
  background: #e8eef6;
  color: #1a3c6e;
}

.terms-content {
  background: white;
  border-radius: var(--radius);
  padding: 45px;
  box-shadow: var(--shadow);
}

.terms-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.terms-date {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--light-gray);
}

.terms-section {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.terms-section h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 4px solid var(--secondary);
}

.terms-section p {
  color: #444;
  font-size: 0.93rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.terms-section ul {
  list-style: disc;
  padding-left: 22px;
  color: #444;
  font-size: 0.93rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.terms-section .data-box {
  background: #e8eef6;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 15px 0;
  border-left: 4px solid #2563b0;
}

.terms-section .data-box p { margin: 0 0 6px; font-weight: 600; color: var(--dark); }
.terms-section .data-box p:last-child { margin-bottom: 0; }

/* ===== FOOTER ===== */
.footer {
  background: #0a1628;
  color: #ccc;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid #1e2f48;
}

.footer-brand__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #4a9eff;
  margin-bottom: 12px;
}

.footer-brand__desc {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #aaa;
}

.footer-brand__fiscal {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.7;
  background: rgba(255,255,255,0.04);
  padding: 12px 15px;
  border-radius: 8px;
  border-left: 3px solid var(--secondary);
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4a9eff;
  margin-bottom: 18px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col a {
  font-size: 0.88rem;
  color: #aaa;
  transition: var(--transition);
}

.footer-col a:hover { color: #4a9eff; padding-left: 5px; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 5px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #666;
}

.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #4a9eff; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 800; margin-bottom: 8px; }
.page-hero p { opacity: 0.85; font-size: 1rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease forwards; }
.fade-in-delay-1 { animation: fadeIn 0.6s ease 0.1s both; }
.fade-in-delay-2 { animation: fadeIn 0.6s ease 0.2s both; }
.fade-in-delay-3 { animation: fadeIn 0.6s ease 0.3s both; }

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .terms-layout { grid-template-columns: 1fr; }
  .terms-toc { position: static; }
}

@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 30px;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1);
    transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
  }
  .header__nav.open { left: 0; }
  .nav__link { font-size: 1.1rem; }
  .hamburger { display: flex; z-index: 1000; }
  .hero { padding: 70px 20px; }
  .hero__cta { flex-direction: column; }
  section { padding: 60px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 25px; }
  .terms-content { padding: 25px; }
  .filters { gap: 7px; }
  .filter-btn { padding: 6px 14px; font-size: 0.82rem; }
}
