/* ==============================================
   ORLANDO ROJAS RODRIGUEZ — Sistema de Diseño
   ============================================== */

/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* 2. Variables CSS */
:root {
  --primary:        #1a2f5e;
  --primary-dark:   #0f1d3a;
  --primary-light:  #243f7a;
  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --bg:             #f8fafc;
  --bg-white:       #ffffff;
  --bg-section:     #f1f5f9;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;
  --success:        #059669;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --container:      1140px;
  --header-h:       72px;
  --transition:     0.2s ease;
}

/* 3. Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* 4. Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* 5. Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-header h2 {
  margin-bottom: .5rem;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(37,99,235,.08);
  padding: .25rem .75rem;
  border-radius: 100px;
  margin-bottom: .75rem;
}

/* 6. Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { text-decoration: none; }

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .01em;
}

.logo-tag {
  font-size: .68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--bg-section);
  color: var(--primary);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--accent);
  background: rgba(37,99,235,.07);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: .45rem 1rem !important;
  border-radius: var(--radius-sm) !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  text-decoration: none !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 7. Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #2d5be3 100%);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: .35rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-info {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-info-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: rgba(255,255,255,.78);
}

.hero-info-item strong {
  color: #fff;
  font-weight: 600;
}

/* 8. Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(37,99,235,.45);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.45);
}

.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.7);
}

.btn-outline-dark {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

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

/* 9. Cards de Servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(37,99,235,.25);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(37,99,235,.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: .5rem;
  font-size: 1.1rem;
}

.service-card p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* 10. Sección Nosotros */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.about-content h2 {
  margin-bottom: 1rem;
}

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

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-section);
  border: 1px solid var(--border);
  padding: .35rem .85rem;
  border-radius: 100px;
}

.about-card {
  background: var(--primary);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  color: #fff;
}

.about-card h3 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  opacity: .9;
  font-weight: 500;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.info-value {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
}

.info-value a {
  color: #93c5fd;
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

/* 11. Caja de Contacto */
.contact-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.contact-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-light);
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.contact-value a {
  color: var(--accent);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* 12. Mapa */
.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: none;
}

/* 13. Página Legal */
.legal-page {
  padding: clamp(2rem, 4vw, 4rem) 0;
}

.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.legal-header h1 {
  margin-bottom: .5rem;
}

.legal-meta {
  font-size: .85rem;
  color: var(--text-muted);
}

.legal-content {
  max-width: 800px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--primary);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  color: var(--text);
}

.legal-content ul, .legal-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ol { list-style: decimal; }

.legal-content li {
  margin-bottom: .4rem;
  color: var(--text-muted);
}

.legal-content p {
  color: var(--text-muted);
}

.legal-highlight {
  background: rgba(37,99,235,.06);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.legal-highlight p {
  margin: 0;
  font-size: .9rem;
}

.responsible-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0;
}

.responsible-box p {
  color: rgba(255,255,255,.85);
  margin-bottom: .4rem;
  font-size: .9rem;
}

.responsible-box strong {
  color: #fff;
}

/* 14. Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}

.footer-brand .logo-name {
  color: #fff;
  font-size: 1rem;
  margin-bottom: .35rem;
}

.footer-brand .logo-tag {
  color: rgba(255,255,255,.5);
  font-size: .75rem;
}

.footer-address {
  margin-top: 1rem;
  font-size: .85rem;
  line-height: 1.75;
  color: rgba(255,255,255,.65);
}

.footer-address strong {
  color: rgba(255,255,255,.9);
  font-weight: 600;
}

.footer-col h4 {
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul li + li { margin-top: .5rem; }

.footer-col a {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

.footer-bottom a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}

.footer-bottom a:hover { color: #fff; }

/* 15. Responsive */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root { --header-h: 64px; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: .5rem 1rem 1rem;
    box-shadow: var(--shadow);
    gap: .15rem;
  }

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

  .site-nav a {
    padding: .65rem .75rem;
    border-radius: var(--radius-sm);
  }

  .nav-toggle { display: flex; }

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

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

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

/* 16. Utilidades */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* WhatsApp button */
.btn-whatsapp {
  background: #25d366;
  color: #fff !important;
  border-color: #25d366;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  text-decoration: none !important;
}

/* Contact page specific */
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 720px) {
  .contact-page-grid {
    grid-template-columns: 1fr;
  }
}
