﻿/* =========================================================
   1) RESET + BASE
========================================================= */

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

html{ scroll-behavior:smooth; }

body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height:1.5;
  color:#111827;
  background:#f3f4f6;
}

img{ max-width:100%; display:block; }
ul{ list-style:none; }
a{ color:inherit; }

:focus-visible{
  outline:3px solid rgba(14, 0, 97, 0.35);
  outline-offset:3px;
}

/* Accesibilidad */
.skip-link{
  position:absolute;
  left:-999px;
  top:12px;
  background:#fff;
  color:#111827;
  padding:10px 14px;
  border-radius:12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  z-index:999;
}
.skip-link:focus{ left:12px; }

/* =========================================================
   2) VARIABLES (AZUL LOGO)
========================================================= */

:root{
  --brand:#0E0061;
  --brand-dark:#090045;
  --brand-soft: rgba(14, 0, 97, 0.10);

  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shell:#ffffff;

  --max:1200px;
  --header-h:86px;

  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 18px 44px rgba(15, 23, 42, 0.18);

  --radius-xl: 26px;
  --radius-lg: 18px;
}

/* =========================================================
   3) LAYOUT GLOBAL
========================================================= */

.page-shell{
  max-width:100%;
  margin:0;
  background: var(--shell);
}

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

.main-content{ min-height:50vh; }

/* =========================================================
   4) HEADER + NAV
========================================================= */

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.header-bar{ background:#fff; }

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:var(--header-h);
  gap:16px;
}

.brand img{
  height:80px;
  width:auto;
  object-fit:contain;
}

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

.main-nav a{
  font-size:0.98rem;
  font-weight:600;
  color:var(--text);
  text-decoration:none;
  position:relative;
  padding-bottom:6px;
  transition: color .2s ease, opacity .2s ease;
}

.main-nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  height:2px;
  width:0;
  background: var(--brand);
  transition: width .2s ease;
}

.main-nav a:hover{ color:var(--brand); }
.main-nav a:hover::after,
.main-nav a.active::after{ width:100%; }

.nav-toggle{
  display:none;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  width:44px;
  height:44px;
  background:#fff;
  border:1px solid rgba(15, 23, 42, 0.10);
  border-radius:999px;
  cursor:pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.nav-toggle:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.nav-toggle span{
  width:22px;
  height:2px;
  background:#111827;
  transition: transform .2s ease, opacity .2s ease;
}

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

/* =========================================================
   5) HERO CONTACTO
========================================================= */

.hero{
  position:relative;
  width:100%;
  overflow:hidden;
  background:#000;
}

.hero--inner{
  min-height: clamp(260px, 52vh, 380px);
  display:flex;
  align-items:center;
}

.hero--contact{
  background-image: url("../img/slider4.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.86),
    rgba(14, 0, 97, 0.30),
    rgba(15, 23, 42, 0.78)
  );
  pointer-events:none;
}

.hero__inner{
  position:relative;
  z-index:1;
  color:#fff;
  padding-block: 70px;
}

.hero__inner--center{
  max-width: 820px;
  text-align:left;
}

.hero__eyebrow{
  display:inline-flex;
  align-items:center;
  padding:6px 14px;
  border-radius:999px;
  background: rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.18);
  font-size:0.80rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
  margin-bottom: 14px;
}

.hero__title--inner{
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  text-wrap: balance;
}

.hero__subtitle--inner{
  max-width: 60ch;
  font-size: 1.0rem;
  color: #e5e7eb;
}

/* =========================================================
   6) CONTACT (CARD FORM PRO)
========================================================= */

.contact{
  padding: 85px 0 95px;
  background:#ffffff;
}

.page-contacto .container{
  max-width: 1100px;
}

/* Card principal */
.contact-wrapper{
  max-width: 720px;
  margin: 0 auto;
  background:#ffffff;
  border-radius: var(--radius-xl);
  padding: 40px 40px 30px;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(15, 23, 42, 0.06);
  position: relative;
  overflow:hidden;
}

/* Detalle suave arriba (marca) */
.contact-wrapper::before{
  content:"";
  position:absolute;
  top:-140px;
  right:-180px;
  width: 420px;
  height: 420px;
  pointer-events:none;
}

.contact-title{
  font-size: 1.75rem;
  font-weight: 950;
  color: #0f172a;
  margin-bottom: 22px;
  text-align:center;
  position: relative;
  z-index: 1;
}

/* Form */
.contact-form{
  display:flex;
  flex-direction:column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.form-status{
  min-height: 1.5em;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.form-group{
  position:relative;
}

.form-icon{
  position:absolute;
  top:50%;
  left:16px;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.65;
  pointer-events:none;
}

.form-group input,
.form-group select,
.form-group textarea{
  width:100%;
  padding: 14px 16px 14px 46px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  font-size: 0.96rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.form-group textarea{
  padding-left: 16px;
  padding-top: 14px;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder{
  color: rgba(107,114,128,0.95);
}

/* Focus pro */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color: rgba(14, 0, 97, 0.55);
  box-shadow: 0 0 0 4px rgba(14, 0, 97, 0.14);
}

/* Hover sutil */
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover{
  border-color: rgba(14, 0, 97, 0.22);
}

/* Checkbox */
.form-checkbox{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  font-size: 0.90rem;
  color: var(--muted);
  margin-top: 2px;
}

.form-checkbox input{
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.form-checkbox a{
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
.form-checkbox a:hover{ text-decoration: underline; }

/* Botón */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 14px 32px;
  border-radius:999px;
  font-weight: 900;
  font-size: 0.96rem;
  border:none;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn-primary{
  background: var(--brand);
  color:#fff;
  box-shadow: 0 14px 34px rgba(14, 0, 97, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary:hover{
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(14, 0, 97, 0.45);
}

.btn-full{
  width:100%;
  margin-top: 6px;
}

/* Mini info */
.contact-mini{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 1;
}

.mini-item{
  background: #f9fafb;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 12px 12px;
}

.mini-k{
  display:block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.mini-v{
  display:block;
  font-size: 0.95rem;
  font-weight: 850;
  color: #0f172a;
}

/* =========================================================
   7) FOOTER
========================================================= */

.site-footer{
  background:#020617;
  color:#e5e7eb;
}

.footer-top{
  border-top:1px solid rgba(148, 163, 184, 0.25);
  padding:40px 0 26px;
}

.footer-grid{
  display:grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap:32px;
}

.footer-col h3{
  font-size:0.95rem;
  text-transform:uppercase;
  letter-spacing:0.16em;
  margin-bottom:14px;
  color:#e5e7eb;
}

.footer-col ul li + li{ margin-top:6px; }

.footer-col a{
  color: rgba(255,255,255,0.78);
  font-size:0.94rem;
  text-decoration:none;
  transition: color .15s ease, opacity .15s ease;
}
.footer-col a:hover{ color:#fff; }

.footer-col--brand p{
  font-size:0.95rem;
  color:#9ca3af;
  max-width:340px;
}

.footer-logo img{
  height:64px;
  width:auto;
  margin-bottom:10px;
}

.footer-contact li{
  font-size:0.94rem;
  color:#9ca3af;
}
.footer-contact span{
  font-weight:800;
  color:#e5e7eb;
}

.footer-bottom{
  border-top:1px solid rgba(148, 163, 184, 0.2);
  padding:12px 0 16px;
  background:#020617;
}

.footer-bottom-inner{
  text-align:center;
  font-size:0.85rem;
  color:#9ca3af;
}

/* =========================================================
   8) RESPONSIVE
========================================================= */

@media (max-width: 992px){
  .container{ padding: 0 20px; }
  .header-inner{ height:72px; }
  .brand img{ height:70px; }

  .nav-toggle{ display:flex; }

  .main-nav{
    position:absolute;
    top:72px;
    right:0;
    left:0;
    background:#fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }

  .main-nav.is-open{
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul{
    flex-direction: column;
    align-items: center;
    padding: 16px 0 18px;
    gap: 10px;
  }

  .hero__inner--center{ text-align:center; }
  .hero__subtitle--inner{ margin-left:auto; margin-right:auto; }

  .contact-wrapper{
    padding: 34px 26px 26px;
  }

  .contact-mini{
    grid-template-columns: 1fr;
  }

  .footer-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:26px;
  }
}

@media (max-width: 640px){
  .container{ padding: 0 16px; }
  .brand img{ height:60px; }

  .contact{
    padding: 65px 0 75px;
  }

  .contact-title{
    font-size: 1.45rem;
  }

  .footer-grid{ grid-template-columns: 1fr; }
  .footer-col--brand p{ max-width:none; }
}

/* Respeta preferencias de movimiento */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}

/* =========================================================
   FIX iOS (Safari) SELECT "Servicio" + icono + placeholder
========================================================= */

/* 1) Select: quita estilos nativos iOS y deja espacio a flecha */
.form-group select{
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  padding-right: 48px; /* espacio para la flecha */
}

/* 2) Si tu select tiene icono a la izquierda, refuerza el padding */
.form-group select{
  padding-left: 46px; /* ya lo tienes, pero lo dejamos fijo */
}

/* 3) Placeholder gris (cuando el option vacío está selected y el select es required) */
.form-group select:invalid{
  color: rgba(107,114,128,0.95);
}

/* 4) Opciones en color normal al abrir */
.form-group select option{
  color: #111827;
}

/* 5) Flecha custom a la derecha (sin tocar el HTML) */
.form-group{
  position: relative; /* ya lo tienes, pero lo aseguramos */
}

.form-group select{
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(17,24,39,0.55) 50%),
    linear-gradient(135deg, rgba(17,24,39,0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* 6) Evita que iOS cambie color/zoom raro: mantén tamaño 16px */
.form-group select{
  font-size: 16px;
}

/* 7) Si el icono se te monta, fuerza su centrado y z-index */
.form-icon{
  z-index: 2;
}

.form-group select{
  position: relative;
  z-index: 1;
}

