:root {
  --azul: #0077C8;
  --gris-oscuro: #4D4D4D;
  --gris-medio: #7A7A7A;
  --gris-claro: #BFBFBF;
  --blanco: #FFFFFF;
  --fondo: #F5F8FB;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--gris-oscuro);
  background: var(--fondo);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* Encabezado / Hero */
header {
  background: linear-gradient(135deg, var(--azul), #0a8fe9);
  color: var(--blanco);
  padding: 1rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("CAIDEN SERVICIOS EMPRESARIALES.png");
  background-repeat: no-repeat;
  background-position: right 3% center;
  background-size: clamp(260px, 32vw, 440px);
  transform: translateY(var(--wm-shift, 0px));
  opacity: 0.1;
  filter: grayscale(1) brightness(1.7);
  pointer-events: none;
  will-change: transform;
}

header .container {
  position: relative;
  z-index: 1;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--blanco);
  font-weight: 500;
  opacity: 0.95;
  transition: opacity 0.25s ease;
}

.nav-links a:hover { opacity: 1; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2rem;
  padding-top: 1.2rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 60ch;
  margin-bottom: 1.4rem;
  color: #eaf6ff;
}

.hero .cta-group {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--blanco);
  color: var(--azul);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: transparent;
  border-color: #d2ecff;
  color: var(--blanco);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

.hero-card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.hero-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: #f0f9ff;
}

.hero-card ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.hero-card li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
}

.hero-card strong { color: #fff; }

/* Secciones generales */
section { padding: 4rem 0; }

.section-title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--gris-oscuro);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--gris-medio);
  margin-bottom: 1.6rem;
}

/* Actividades */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.activity {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-left: 5px solid var(--azul);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 16px rgba(12, 43, 67, 0.05);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
  color: var(--gris-oscuro);
}

.activity p {
  font-size: 0.95rem;
  color: var(--gris-medio);
  margin-bottom: 0.65rem;
}

.badge {
  display: inline-block;
  background: #e9f6ff;
  color: var(--azul);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.stats-note {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  padding: 1rem;
  color: var(--gris-medio);
  box-shadow: 0 8px 16px rgba(12, 43, 67, 0.05);
}

/* Formulario */
.form-section {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

form {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: 0 8px 16px rgba(12, 43, 67, 0.05);
  display: grid;
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--gris-oscuro);
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d7dde5;
  border-radius: 10px;
  padding: 0.72rem 0.78rem;
  font: inherit;
  color: var(--gris-oscuro);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(0, 119, 200, 0.12);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-submit {
  background: var(--azul);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(0, 119, 200, 0.25);
}

.note {
  font-size: 0.85rem;
  color: var(--gris-medio);
}

/* Contacto */
.contact-section {
  background: #fff;
}

.section-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.section-header h3 {
  color: var(--gris-oscuro);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin-bottom: 0.45rem;
  letter-spacing: 0.8px;
  font-weight: 800;
}

.section-header p {
  color: var(--gris-medio);
  font-size: 0.98rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.contact-panel {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(12, 43, 67, 0.05);
  padding: 1.1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "address address"
    "email phone";
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.info-item {
  background: #f9fbfd;
  border: 1px solid #edf2f6;
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 96px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.info-item:nth-child(1) { grid-area: address; }
.info-item:nth-child(2) { grid-area: email; }
.info-item:nth-child(3) { grid-area: phone; }

.info-item:hover {
  transform: translateY(-3px);
  border-color: #cfe7fb;
  box-shadow: 0 10px 18px rgba(12, 43, 67, 0.08);
}

.info-item h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--azul);
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  color: var(--azul);
  background: #e8f5ff;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.info-icon svg {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.25s ease;
}

.info-item:hover .info-icon {
  background: #d8eeff;
  transform: scale(1.06);
}

.info-item:hover .info-icon svg {
  transform: rotate(-8deg);
}

@media (prefers-reduced-motion: reduce) {
  .info-item,
  .info-icon,
  .info-icon svg {
    transition: none;
  }

  .info-item:hover,
  .info-item:hover .info-icon,
  .info-item:hover .info-icon svg {
    transform: none;
  }
}

.info-item p {
  font-size: 0.94rem;
  color: var(--gris-oscuro);
  line-height: 1.5;
  margin: 0;
}

.info-item a {
  color: var(--azul);
  text-decoration: none;
  word-break: break-word;
  font-weight: 600;
}

.info-item a:hover {
  text-decoration: underline;
}

.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.map-wrap,
.contact-form-wrap {
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(12, 43, 67, 0.05);
  overflow: hidden;
}

.map-wrap h3,
.contact-form-wrap h3 {
  background: #f8fbff;
  color: var(--gris-oscuro);
  font-size: 1.02rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef1f4;
}

.map-embed {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

.contact-form-wrap .inner {
  padding: 1.05rem;
}

.form-status {
  display: none;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  color: #0f5132;
  background: #d1e7dd;
  border: 1px solid #badbcc;
}

.form-status.error {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
}

/* Pie de página */
footer {
  background: #1f2730;
  color: #dce3ea;
  text-align: center;
  padding: 1.1rem 0.8rem;
  font-size: 0.92rem;
}

/* Animación de entrada */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .activities-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .info-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "address address"
      "email phone";
  }
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .activities-grid { grid-template-columns: 1fr; }
  nav { flex-direction: column; align-items: flex-start; }
  .brand img { width: 50px; height: 50px; }
  .info-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "address"
      "email"
      "phone";
  }
  .info-item { min-height: auto; }
}
