:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #0b63b6;
  --accent-2: #2d6a4f;
  --muted: #6b7280;
  --radius: 12px;
  --container: 1100px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
}

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

/* Header Responsivo */
.site-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.2;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 2;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 4px 8px;
  transition: color 0.3s;
}

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

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-align: center;
  justify-content: center;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--accent);
}

/* Hero Responsivo */
.hero {
  position: relative;
  padding: 40px 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-direction: column;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 99, 182, 0.08), rgba(45, 106, 79, 0.06));
  pointer-events: none;
}

.hero-text {
  flex: 1;
  max-width: 100%;
  text-align: center;
  padding: 0 10px;
}

.hero-text h1 {
  font-size: 32px;
  margin: 0 0 16px;
  line-height: 1.2;
  font-weight: 700;
}

.hero-text h1 span {
  color: var(--accent-2);
}

.hero-text p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  width: 100%;
  max-width: 600px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  max-height: 400px;
  object-fit: cover;
}

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

.section.alt {
  background: linear-gradient(180deg, #fff 0%, #f9fbfc 100%);
}

.section-title {
  font-size: 28px;
  margin: 0 0 12px;
  text-align: center;
  font-weight: 700;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 32px;
  text-align: center;
  font-size: 18px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards Responsivo */
.cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
  flex: 1;
  min-width: 280px;
  max-width: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.1);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
}

.card-body p {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: inline-block;
  padding: 8px 0;
}

/* Services Responsivo */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.service {
  background: linear-gradient(180deg, #fff, #fcfeff);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
  text-align: center;
}

.service h4 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--accent);
  font-weight: 600;
}

.service p {
  color: var(--muted);
  line-height: 1.6;
}

/* Contact Responsivo */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: stretch;
}

.contact-form {
  background: var(--card);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05);
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.input-row input {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  font-size: 16px;
  transition: border-color 0.3s;
}

.input-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  margin-bottom: 20px;
  transition: border-color 0.3s;
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.form-actions button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

#formStatus {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  min-height: 24px;
}

.contact-info {
  background: var(--card);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05);
}

.contact-info h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 600;
}

.contact-info p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.contact-info strong {
  color: #0f172a;
}

.map-placeholder {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.map-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer Responsivo */
.site-footer {
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid #eef2f6;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  text-align: center;
}

.socials {
  display: flex;
  gap: 20px;
}

.socials a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid rgba(11, 99, 182, 0.2);
  border-radius: 6px;
  transition: all 0.3s;
}

.socials a:hover {
  background: var(--accent);
  color: white;
}

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  width: 40px;
  height: 40px;
}

/* Responsive para tabletas (768px y más) */
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: left;
  }
  
  .hero-text {
    text-align: left;
    max-width: 600px;
  }
  
  .hero-actions {
    justify-content: flex-start;
  }
  
  .hero-image img {
    max-height: 400px;
  }
  
  .cards {
    flex-direction: row;
  }
  
  .card {
    max-width: calc(33.333% - 14px);
  }
  
  .input-row {
    flex-direction: row;
  }
  
  .form-actions {
    flex-direction: row;
    align-items: center;
  }
  
  .form-actions button {
    width: auto;
  }
  
  .contact-grid {
    flex-direction: row;
  }
  
  .contact-form {
    flex: 2;
  }
  
  .contact-info {
    flex: 1;
  }
  
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Responsive para desktop (1024px y más) */
@media (min-width: 1024px) {
  .container {
    padding: 0 40px;
  }
  
  .hero-text h1 {
    font-size: 40px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .brand-name {
    font-size: 18px;
  }
  
  .logo {
    width: 80px;
    height: 80px;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .hero-inner {
    gap: 60px;
  }
}

/* Responsive para móviles pequeños (480px y menos) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-text h1 {
    font-size: 28px;
  }
  
  .hero-text p {
    font-size: 16px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 16px;
    width: 100%;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .nav {
    gap: 12px;
  }
  
  .nav a {
    font-size: 14px;
    padding: 6px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .section-sub {
    font-size: 16px;
  }
  
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    padding: 10px;
  }
  
  .whatsapp-float img {
    width: 36px;
    height: 36px;
  }
}

/* Ajustes para landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 20px 0;
  }
  
  .hero-image img {
    max-height: 250px;
  }
  
  .section {
    padding: 32px 0;
  }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ajustes para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --card: #1e293b;
    --muted: #94a3b8;
  }
  
  body {
    color: #f1f5f9;
  }
  
  .site-header,
  .site-footer,
  .contact-info,
  .contact-form {
    background: #1e293b;
  }
  
  .section.alt {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  }
  
  .service {
    background: linear-gradient(180deg, #1e293b, #1e293b);
  }
  
  .contact-info strong {
    color: #f1f5f9;
  }
  
  .input-row input,
  .contact-form textarea {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
  }
}