/* ============================================================
   XETAFI CERRAJERO — styles.css
   xetaficerrajero.com
   ============================================================ */

/* 1. CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  --primary:       #1a3560;
  --primary-dark:  #0f2240;
  --primary-light: #2a4d80;
  --accent:        #d94f00;
  --accent-hover:  #b84300;
  --accent-light:  #ff6b1a;
  --white:         #ffffff;
  --light:         #f5f7fa;
  --light-2:       #edf0f6;
  --text:          #1f2937;
  --text-mid:      #4b5563;
  --text-light:    #9ca3af;
  --border:        #e5e7eb;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.07);
  --shadow:        0 2px 10px rgba(0,0,0,0.09);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:     0 8px 36px rgba(0,0,0,0.16);
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     14px;
  --transition:    0.2s ease;
  --max-width:     1140px;
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 2. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* 3. LAYOUT
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--light);
}

.section-dark {
  background: var(--primary);
  color: var(--white);
}

.section-header {
  margin-bottom: 52px;
}

.section-header.centered {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-label-white {
  color: rgba(255,255,255,0.6);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.section-title-white {
  color: var(--white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 580px;
  line-height: 1.7;
}

.section-subtitle-white {
  color: rgba(255,255,255,0.75);
}

/* 4. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--accent);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 18px 38px;
  font-size: 1.1rem;
}

.btn-xl {
  padding: 20px 44px;
  font-size: 1.2rem;
  border-radius: var(--radius-lg);
}

/* 5. ICON UTILITY
   ------------------------------------------------------------ */
.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  display: block;
}

/* 6. HEADER
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

/* Logo */
.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-text em {
  color: var(--accent-light);
  font-style: normal;
}

/* Navigation */
.main-nav {
  flex: 1;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}

.main-nav a {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: block;
}

.main-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
  font-weight: 700;
}

/* Header CTA */
.header-cta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  background: var(--accent);
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: var(--transition);
  line-height: 1;
}

.header-phone:hover {
  background: var(--accent-hover);
}

.header-phone svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Hamburger toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 7. HERO
   ------------------------------------------------------------ */
.hero {
  background: linear-gradient(140deg, var(--primary-dark) 0%, var(--primary) 55%, #22518a 100%);
  color: var(--white);
  padding: 84px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -8%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -5%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(217,79,0,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

.hero-badge svg {
  width: 13px;
  height: 13px;
  color: var(--accent-light);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.07;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.72;
  margin-bottom: 30px;
  max-width: 560px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 38px;
}

.hero-tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  padding: 5px 13px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-meta {
  margin-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* 8. SERVICES SECTION
   ------------------------------------------------------------ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: transparent;
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-ico {
  width: 56px;
  height: 56px;
  background: var(--light-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition);
}

.service-card:hover .service-ico {
  background: var(--primary);
}

.service-ico svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
  transition: var(--transition);
}

.service-card:hover .service-ico svg {
  color: var(--white);
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.65;
}

/* 9. TRUST SECTION
   ------------------------------------------------------------ */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.trust-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
}

.trust-ico {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-ico svg {
  width: 20px;
  height: 20px;
  color: var(--accent-light);
}

.trust-item h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.3;
}

.trust-item p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}

/* 10. WHY SECTION
   ------------------------------------------------------------ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.why-item {
  text-align: center;
  padding: 28px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.why-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.why-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0 auto 16px;
}

.why-item h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.why-item p {
  font-size: 0.83rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* 11. ZONES SECTION
   ------------------------------------------------------------ */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.zone-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  background: var(--white);
}

.zone-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.zone-card.current {
  border-color: var(--accent);
  background: var(--light);
}

.zone-ico {
  width: 48px;
  height: 48px;
  background: var(--light-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.zone-ico svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.zone-card.current .zone-ico {
  background: rgba(217,79,0,0.08);
}

.zone-card.current .zone-ico svg {
  color: var(--accent);
}

.zone-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.zone-card p {
  font-size: 0.87rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 16px;
}

.zone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  padding: 8px 18px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.zone-link:hover {
  background: var(--accent);
  color: var(--white);
}

.zone-current-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(217,79,0,0.08);
  padding: 5px 12px;
  border-radius: 12px;
}

/* 12. CTA SECTION (includes/cta.php)
   ------------------------------------------------------------ */
.cta-section {
  background: var(--accent);
  padding: 64px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.cta-section p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.cta-phone-big {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 28px;
  line-height: 1;
}

.cta-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* 13. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 52px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 44px;
  margin-bottom: 44px;
}

.footer-brand .logo-text {
  font-size: 1.3rem;
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.footer-phone-link svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}

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

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 18px;
}

.footer-col ul li {
  margin-bottom: 9px;
}

.footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  transition: var(--transition);
}

.footer-legal a:hover {
  color: rgba(255,255,255,0.7);
}

/* 14. MOBILE CALL BAR
   ------------------------------------------------------------ */
.mobile-callbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--accent);
  box-shadow: 0 -3px 14px rgba(0,0,0,0.22);
}

.mobile-callbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 15px 20px;
  min-height: 56px;
  letter-spacing: 0.3px;
}

.mobile-callbar svg {
  width: 20px;
  height: 20px;
}

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

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 2.6rem;
  }
}

@media (max-width: 768px) {
  /* Header */
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0 16px;
    z-index: 999;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 13px 24px;
    border-radius: 0;
    font-size: 1rem;
  }

  .header-inner {
    position: relative;
  }

  .header-phone-text {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 52px 0 64px;
  }

  .hero h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  /* Sections */
  .section {
    padding: 52px 0;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .section-header {
    margin-bottom: 36px;
  }

  /* Grids collapse */
  .services-grid,
  .trust-grid,
  .why-grid,
  .zones-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  /* CTA */
  .cta-section h2 {
    font-size: 1.65rem;
  }

  .cta-phone-big {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .btn-xl {
    width: 100%;
  }

  /* Footer */
  .footer-grid {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer-legal {
    justify-content: center;
  }

  /* Mobile call bar */
  .mobile-callbar {
    display: block;
  }

  body {
    padding-bottom: 56px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo img {
    height: 44px;
    max-width: 160px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-badge {
    font-size: 0.78rem;
  }

  .hero-tags {
    gap: 6px;
  }

  .hero-tag {
    font-size: 0.78rem;
  }

  .cta-phone-big {
    font-size: 1.7rem;
    letter-spacing: 0;
  }

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