@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900&display=swap');

:root {
  --text: #212112;
  --accent: #d27400;
  --accent-light: #ff9521;
  --dark: rgb(25, 23, 22);
  --bg-alt: #f6f7f6;
  --border: #d7d7d9;
  --gray: #647078;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  padding-top: 78px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  padding: 18px 0;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  padding: 8px 0;
  box-shadow: 0 5px 20px rgba(33, 33, 18, 0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  border-radius: 6px;
  transition: height 0.3s ease;
}

.navbar-brand .brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
}

.navbar.scrolled .navbar-brand img {
  height: 32px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-menu a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
}

.nav-item.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* flush against the trigger's box (no gap) so mousing down into the
     menu never leaves the hoverable area — a gap here would close the
     menu before the cursor reaches it */
  margin-top: 0;
  padding-top: 14px;
  padding-bottom: 10px;
  min-width: 240px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(33, 33, 18, 0.12);
}

.nav-item.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

/* ===== Buttons ===== */
.btn-pill {
  display: inline-block;
  margin-top: 30px;
  padding: 16px 40px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Nunito', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--gray);
  border-radius: 50px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-pill:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-pill-light {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ===== Hero carousel ===== */
.hero {
  position: relative;
  height: 92vh;
  min-height: 520px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide .kenburns {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

.hero-slide.active .kenburns img {
  animation: kenburns-top 8s ease-out both;
}

@keyframes kenburns-top {
  0% {
    transform: scale(1) translateY(0);
    transform-origin: 50% 20%;
  }
  100% {
    transform: scale(1.15) translateY(-15px);
    transform-origin: top;
  }
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
  padding: 0 20px;
}

.hero-text h2 {
  color: #fff;
  font-size: 52px;
  line-height: 1.3;
  font-weight: 300;
  max-width: 850px;
}

.hero-slide.active .hero-text h2 {
  animation: focus-in 1.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

@keyframes focus-in {
  0% {
    filter: blur(10px);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    opacity: 1;
  }
}

.hero-text strong {
  color: var(--accent-light);
  font-weight: 800;
}

.hero-text .btn-pill {
  margin-top: 0;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 5;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dots button.active {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

/* ===== Page hero (internal pages) ===== */
.page-hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.32);
}

.page-hero .page-hero-text {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 20px;
}

.page-hero h1 {
  font-size: 38px;
  font-weight: 300;
}

.page-hero h1 strong {
  color: var(--accent-light);
  font-weight: 800;
}

.breadcrumb {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.breadcrumb a {
  color: #fff;
}

/* ===== Section heading ===== */
.section-heading {
  text-align: center;
  margin-bottom: 50px;
}

.section-heading h3 {
  font-size: 32px;
  margin-bottom: 14px;
}

.section-heading .divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 3px;
}

.section-heading p {
  margin-top: 16px;
  color: var(--gray);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Services grid ===== */
.services {
  padding: 90px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* first 3 cards: 4/12 each (3 per row) — last 2 cards: 6/12 each (2 per row) */
.services-grid .service-card:nth-child(-n+3) {
  grid-column: span 4;
}

.services-grid .service-card:nth-child(n+4) {
  grid-column: span 6;
}

.service-card {
  display: block;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(33, 33, 18, 0.1);
}

.service-card .card-image {
  height: 160px;
  overflow: hidden;
}

.service-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .card-image img {
  transform: scale(1.06);
}

.service-card .card-body {
  padding: 24px 24px 28px;
}

.service-card h4 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--accent);
}

.service-card p {
  font-size: 14px;
  color: var(--gray);
  margin: 0;
}

/* ===== Clientes marquee ===== */
.clientes {
  padding: 70px 0 80px;
  background: var(--bg-alt);
}

.clientes-marquee {
  overflow: hidden;
  margin-top: 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.clientes-track {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  animation: clientes-scroll 40s linear infinite;
}

.clientes-marquee:hover .clientes-track {
  animation-play-state: paused;
}

.logo-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 90px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 22px;
}

.logo-chip img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes clientes-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clientes-track {
    animation: none;
  }
}

/* ===== About / Quienes somos ===== */
.about {
  padding: 90px 0;
  background: var(--bg-alt);
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about img {
  border-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 480px;
}

.about .divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 16px 0 24px;
  border-radius: 3px;
}

.about p strong {
  color: var(--text);
}

/* ===== Generic content section (service detail pages) ===== */
.content-page {
  padding: 90px 0;
}

.content-page .content-inner {
  max-width: 780px;
  margin: 0 auto;
}

.content-page p {
  font-size: 16px;
  color: #3a3a3a;
}

.content-page ul {
  padding-left: 20px;
  color: #3a3a3a;
}

.content-page li {
  margin-bottom: 10px;
}

.content-page .tramites-heading {
  margin-top: 46px;
  padding-top: 36px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  font-size: 20px;
}

.content-page .tramites-heading:first-of-type {
  border-top: none;
  padding-top: 0;
}

.content-page .tramites-subheading {
  margin-top: 30px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tramites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tramite-card {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 22px 24px;
}

.tramite-card h4 {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text);
}

.tramite-card p {
  font-size: 13px;
  color: var(--gray);
  margin: 0;
}

.tramite-card.full {
  grid-column: 1 / -1;
}

.provincias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.provincia-tag {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text);
}

.cta-box {
  margin-top: 50px;
  padding: 40px;
  background: var(--bg-alt);
  border-radius: 10px;
  text-align: center;
}

.cta-box h4 {
  font-size: 22px;
  margin-bottom: 8px;
}

.cta-box p {
  color: var(--gray);
  margin-bottom: 0;
}

/* ===== Contact page ===== */
.contact {
  padding: 90px 0;
}

.contact .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-info h4 {
  font-size: 20px;
  margin-bottom: 6px;
  margin-top: 26px;
}

.contact-info h4:first-child {
  margin-top: 0;
}

.contact-info .icon-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--gray);
}

.contact-info .icon-row i {
  color: var(--accent);
  margin-top: 3px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  background: var(--bg-alt);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.form-status {
  margin-top: 16px;
  font-weight: 600;
}

.form-status.success {
  color: #2e7d32;
}

.form-status.error {
  color: #c62828;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: #cfcfcf;
  padding: 60px 0 0;
}

.footer .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-brand img {
  width: 52px;
  border-radius: 6px;
}

.footer-brand .brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.footer h5 {
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer p {
  font-size: 14px;
  line-height: 1.7;
}

.footer .footer-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #cfcfcf;
  font-size: 14px;
  margin-bottom: 12px;
}

.footer .footer-link i {
  color: var(--accent-light);
  margin-top: 3px;
}

.footer .footer-link:hover {
  color: var(--accent-light);
}

.footer-copy {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: #8a8a8a;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid .service-card:nth-child(-n+3),
  .services-grid .service-card:nth-child(n+4) {
    grid-column: span 1;
  }

  .about .container,
  .contact .container {
    grid-template-columns: 1fr;
  }

  .about img {
    max-height: 320px;
    order: -1;
  }

  .footer .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 66px;
  }

  .tramites-grid {
    grid-template-columns: 1fr;
  }

  .navbar-brand img {
    height: 32px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-item.dropdown .dropdown-menu {
    display: none;
    position: static;
    box-shadow: none;
    margin-top: 8px;
    padding: 0;
  }

  .nav-item.dropdown.open .dropdown-menu {
    display: block;
  }

  .hero-text h2 {
    font-size: 32px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer .container {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: 28px;
  }
}
