/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
  --color-mar: #0a2540;
  --color-arena: #f4f2ed;
  --color-acento: #269be4;
  --color-blanco: #faf9f6;
  --color-texto: #2c2c2c;
  --sombra: 0 4px 20px rgba(10, 37, 64, 0.12);
  --radio: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--color-texto);
  background: var(--color-blanco);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================
   HEADER Y NAVEGACIÓN
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 37, 64, 0.96);
  backdrop-filter: blur(10px);
  padding: 1rem;
  box-shadow: var(--sombra);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  width: 140px;
  height: 140px;
  margin-right: 1.5rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--color-arena);
  text-decoration: none;
  font-weight: 780;
}

nav {
  display: flex;
  gap: 1.8rem;
}

nav a {
  color: var(--color-arena);
  text-decoration: none;
  font-weight: 550;
  transition: color 0.2s;
  font-size: 1.25rem;
}

nav a:hover {
  color: var(--color-acento);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--color-arena);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  width: 100%;
  height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(images/vehiculoia.webp);
  background-size: cover;
  background-position: center;
  color: var(--color-blanco);
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 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='%23e8dcc4' 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");
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: black;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* =========================================
   BOTONES
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--color-acento);
  color: var(--color-mar);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radio);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(86, 171, 223, 0.4);
  background: #1c85ca;
}

.btn-sec {
  background: transparent;
  color: var(--color-arena);
  border: 2px solid var(--color-arena);
  margin-left: 0.75rem;
}

/* =========================================
   SECCIONES Y FORMULARIOS
   ========================================= */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--color-mar);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-sub {
  font-size: 1.25rem;
  text-align: center;
  color: #3878e6;
  margin-bottom: 2rem;
}

.form-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.form-calc, .form-reserva {
  flex: 1;
  min-width: 300px;
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.calculadora {
  background: linear-gradient(180deg, #f0ebe2 0%, var(--color-blanco) 100%);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--sombra);
  margin-bottom: 2rem;
}

.calculadora h2 {
  font-family: 'Playfair Display', serif;
  color: var(--color-mar);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.calculadora p {
  color: #555;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.form-calc { display: grid; gap: 1.25rem; }
.form-calc label { font-weight: 600; color: var(--color-mar); display: block; margin-bottom: 0.35rem; }
.form-calc input { width: 100%; padding: 0.85rem 1rem; border: 2px solid #d8d38c; border-radius: var(--radio); font-family: inherit; font-size: 1rem; transition: border-color 0.2s; }
.form-calc input:focus { outline: none; border-color: var(--color-acento); }
.form-calc .input-group { display: grid; grid-template-columns: 1fr 80px; gap: 0.75rem; align-items: end; }
.form-calc .input-group input:last-child { text-align: center; }

.form-reserva h3 { margin-top: 0; margin-bottom: 15px; font-size: 20px; color: #333; }
form div { margin-bottom: 15px; }
label { display: block; font-weight: 600; margin-bottom: 5px; color: #444; }
input { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; transition: border-color .2s; }
input:focus { border-color: var(--color-acento); outline: none; }

/* Resultados Calculadora */
.resultado-precio { margin-top: 1.5rem; padding: 1.25rem; background: var(--color-mar); color: var(--color-arena); border-radius: var(--radio); font-size: 1.25rem; font-weight: 700; display: none; }
.resultado-precio.visible { display: block; }
.resultado-precio .importe { font-size: 1.75rem; color: var(--color-acento); }
.aviso-tarifa { font-size: 0.8rem; color: #777; margin-top: 1rem; }

/* =========================================
   SERVICIOS (Tarjetas 70/30)
   ========================================= */
.servicios {
  padding: 60px 20px;
  background-color: #f4f7f6;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.servicio-card {
  background: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 450px; 
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.servicio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-img { flex: 0 0 70%; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.servicio-card:hover .card-img img { transform: scale(1.1); }

.card-contenido { flex: 0 0 30%; padding: 20px; display: flex; flex-direction: column; justify-content: center; background: #fff; }
.card-contenido h3 { margin: 0 0 8px 0; font-size: 1.15rem; color: #0d1b2a; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.card-contenido p { margin: 0; font-size: 0.9rem; color: #58667e; line-height: 1.5; }

/* =========================================
   FOOTER Y CONTACTO
   ========================================= */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #061a2d;
  color: rgba(244, 241, 235, 0.7);
  font-size: 0.9rem;
}

footer a { color: var(--color-acento); text-decoration: none; }
.contacto-item p { color: rgba(249, 249, 248, 0.8); font-size: 0.9rem; }
.fin { margin-top: 1.2rem; font-size: 0.85rem; color: rgba(247, 241, 229, 0.6); }

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablets y móviles grandes (hasta 768px) */
@media (max-width: 768px) {
  /* Header y Menú */
  .header-inner { flex-direction: row !important; justify-content: space-between; position: relative; padding: 0 5px; }
  .menu-toggle { display: flex; position: relative; z-index: 1200; }
  .logo-img { width: 60px !important; height: 60px !important; display: block !important; }
  .logo { font-size: 1.3rem !important; margin-right: auto; }

  nav {
    position: fixed; right: -100%; top: 0; flex-direction: column;
    background: var(--color-mar); width: 80%; height: 100vh;
    padding: 100px 2rem 2rem; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5); gap: 1.5rem; align-items: flex-start; z-index: 1100;
  }
  nav.active { right: 0; }
  nav a { font-size: 1.4rem; width: 100%; border-bottom: 1px solid rgba(244, 242, 237, 0.1); padding-bottom: 0.8rem; text-align: left; }
  
  .menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  /* Hero */
  .hero { padding-top: 140px !important; height: auto !important; min-height: 450px; }
  .hero-content { min-height: auto; color: rgb(245, 247, 232); font-weight: 400; }
  .btn-sec { margin-left: 0; margin-top: 0.8rem; display: block; }

  /* Tipografía y Formularios */
  .section-title { font-size: 2.2rem; }
  .section-sub { font-size: 1.2rem; }
  .calculadora h2 { font-size: 1.8rem; text-align: center; }
  
  .form-wrapper { flex-direction: column; gap: 1.5rem; align-items: stretch; }
  .form-calc .input-group { grid-template-columns: 1fr; }

  /* Servicios y Contacto */
  .servicios { padding: 40px 15px; }
  .servicio-card { height: 400px; }
  
  .contacto-grid { display: flex !important; flex-direction: column; align-items: center; padding-left: 0 !important; }
  .contacto-item { flex-direction: column; align-items: center; text-align: center; padding-top: 5px; }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
  .servicios-grid { grid-template-columns: 1fr; gap: 20px; }
  .servicio-card { height: auto; min-height: 380px; }
  .card-img { height: 250px; flex: none; }
  .card-contenido { flex: none; padding: 25px 15px; }
}