/* === RESET / BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color:#111;
  background:#fff;
  line-height:1.6;
}
img { max-width: 100%; display:block; }
a { color: inherit; text-decoration: none; }
section, .section { scroll-margin-top: 90px; }
.section { padding:80px 20px; }
.section-inner {
  max-width:1600px;
  margin:0 auto;
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between;
}
.section-inner.column { flex-direction:column; align-items:flex-start; }

/* === HEADER === */
.site-header {
  position:fixed;
  top:0; left:0; width:100%;
  background:#fff;
  border-bottom:1px solid #eee;
  z-index:2000;
}
.nav-container {
  max-width:1600px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo img { height:40px; width:auto; display:block; }
.main-nav ul { list-style:none; display:flex; gap:30px; }
.main-nav a {
  font-size:15px;
  transition:opacity .2s ease;
}
.main-nav a:hover { opacity:.6; }

.hamburger {
  display:none;
  background:transparent;
  border:0;
  cursor:pointer;
  padding:6px;
  margin-left:10px;
  touch-action:manipulation;
}
.hamburger span {
  display:block;
  width:24px;
  height:2px;
  background:#111;
  border-radius:2px;
  margin:5px 0;
}
.mobile-menu {
  display:none;
  position:absolute;
  right:20px; top:60px;
  background:#fff;
  border:1px solid #eee;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  padding:8px;
  flex-direction:column;
  min-width:180px;
  z-index:1999;
}
.mobile-menu a { padding:14px 14px; }

/* === HERO === */

/* Variables fáciles de editar */
:root{
  --hero-title-size: 50px;
  --hero-subtitle-size: 30px;
  --hero-subtitle-color: #666;
}

.hero {
  position:relative;
  height:600px;
  max-width:1600px;
  margin:90px auto 0;
  background:url("images/hero.jpg") center/cover no-repeat;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 40px;
  background-color:#fafafa;
}
.hero-overlay {
  width:100%; height:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
}
.hero-title{
  color:#111;
  font-size:var(--hero-title-size);
  font-weight:700;
  line-height:1.15;
  max-width:700px;
}
.hero-subtitle{
  margin-top:10px;
  color:var(--hero-subtitle-color);
  font-size:var(--hero-subtitle-size);
  font-weight:500;
  line-height:1.4;
  max-width:700px;
}

/* HERO mobile */
@media (max-width:768px){
  .hero{
    height:auto;
    background:none;
    padding:20px;
    display:block;
  }
  .hero-overlay{ padding:0; display:block; }
  .hero-title{ font-size:28px; margin-bottom:8px; }
  .hero-subtitle{ font-size:16px; margin-bottom:20px; } /* margen extra */
  .hero::after{
    content:"";
    display:block;
    width:100%; height:400px;
    background:url("images/hero.jpg") center/cover no-repeat;
  }
}
@media (min-width:769px){
  .hero{ border-radius:10px; overflow:hidden; }
}

/* === ABOUT === */
.about-text{flex:2;}
.about-image{
  flex:1;
  height:320px;
  border-radius:10px;
  background:url("images/about.jpg") center/cover no-repeat;
}
.logos{
  margin-top:20px;
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.logos img{ height:40px; opacity:.9; }
#about h2{ margin-bottom:20px; }
#about p{ margin-bottom:20px; }
#about p + p{ margin-top:10px; }

@media (max-width:900px){
  #about .section-inner{
    flex-direction:column;
    align-items:stretch;
  }
  .about-text{ order:1; }
  .about-image{
    order:2;
    width:100%;
    height:260px;
    margin-top:16px;
    border-radius:10px;
    background:url("images/about.jpg") center/cover no-repeat;
    flex:0 0 auto;
    display:block;
  }
}

/* === SERVICES === */
#services{ background:#f9f9f9; }
.service-media{
  display:block;
  max-width:1600px;
  width:100%;
  margin:20px auto 0;
  border-radius:10px;
  overflow:hidden;
}
.service-media img{
  display:block;
  width:100%;
  height:auto;
}

/* === WORKS === */
.works-img{
  margin-top:20px;
  width:100%; height:400px;
  border-radius:10px;
  background:url("images/works.jpg") center/cover no-repeat;
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.works-img span{
  font-size:28px; font-weight:600;
  color:#fff;
  text-shadow:0 2px 6px rgba(0,0,0,.5);
}
.works-img::before{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.15));
  border-radius:10px;
}

/* === CONTACT === */
#contact{ background:#f9f9f9; }
.contact-info{ flex:1; }
.contact-form{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.contact-form input, .contact-form textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid #ddd;
  border-radius:8px;
  font-size:14px;
}
.contact-form button{
  padding:12px 14px;
  border:0;
  border-radius:10px;
  background:#111;
  color:#fff;
  cursor:pointer;
  transition:opacity .2s ease;
}
.contact-form button:hover{ opacity:.85; }

/* === FOOTER === */
.site-footer{ background:#222; color:#fff; }
.footer-inner{
  max-width:1600px;
  margin:0 auto;
  padding:40px 20px;
  text-align:center;
}
.footer-top{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:20px;
  margin-bottom:18px;
}
.footer-logo img{
  height:50px; width:auto;
  display:block; margin:0 auto;
}
.footer-links{
  display:flex;
  gap:30px;
  justify-content:center;
  flex-wrap:wrap;
}
.footer-links a{ color:#fff; opacity:.9; }
.footer-links a:hover,
.footer-links a:focus{ opacity:.7; }

footer small {
  color:#aaa;
  font-size:14px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px;
}

footer small a {
  color:#aaa;
  text-decoration:none;
  transition:color .2s ease;
}

footer small a:hover {
  color:#fff;
}

.footer-divider {
  color:#555;
  font-weight:300;
}

/* === ANIMATIONS === */
.fade-in{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .8s ease, transform .8s ease;
}
.fade-in.visible{
  opacity:1;
  transform:translateY(0);
}

/* === RESPONSIVE NAV === */
@media (max-width:1100px){
  .section-inner{ flex-direction:column; align-items:stretch; }
  .about-image{ width:100%; }
}
@media (max-width:900px){
  .main-nav{ display:none; }
  .hamburger{ display:block; }
  .mobile-menu.show{ display:flex; }
  .section{ padding:64px 20px; }
}

/* === ACCESSIBILITY === */
:focus-visible{ outline:2px solid #111; outline-offset:3px; }
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* === LEGAL MODALS === */
.modal { position: fixed; inset: 0; display: none; z-index: 3000; }
.modal.show { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }

/* Ventana con esquinas redondeadas */
.modal-dialog {
  position: relative;
  max-width: 560px;
  margin: 12vh auto;
  background: #fff;
  color: #111;
  border-radius: 16px;     /* esquinas redondeadas */
  padding: 24px 24px 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.modal-dialog h3 { margin: 0 0 10px; }
.modal-dialog p { margin: 0; line-height: 1.5; }
.modal-close {
  position: absolute; top: 8px; right: 10px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 26px; line-height: 1; color: #666;
}
.modal-close:hover { color: #000; }
body.modal-open { overflow: hidden; }

/* ===== MODAL con animación ===== */

/* Estado base: oculto pero renderizado -> permite transiciones */
.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  visibility: hidden;
  opacity: 0;                  /* fade general del overlay */
  pointer-events: none;        /* no bloquea clics cuando está oculto */
  transition: opacity .28s ease, visibility 0s linear .28s; /* vis se retrasa al final */
}

/* Estado visible */
.modal.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .28s ease, visibility 0s; /* vis inmediata al abrir */
}

/* Fondo oscurecido con su propia transición (opcional, pero queda más fino) */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .28s ease;
}
.modal.show .modal-backdrop {
  opacity: 1;
}

/* Ventana: aparece con leve zoom + elevate */
.modal-dialog {
  position: relative;
  max-width: 560px;
  margin: 12vh auto;
  background: #fff;
  color: #111;
  border-radius: 16px;
  padding: 24px 24px 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);

  /* estado inicial (oculto) */
  transform: translateY(10px) scale(.98);
  opacity: 0;
  transition:
    transform .28s cubic-bezier(.2,.65,.3,1),
    opacity .28s ease;
}

/* estado visible (animado) */
.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Botón cerrar y bloqueo de scroll como ya tenías */
.modal-close {
  position: absolute; top: 8px; right: 10px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 26px; line-height: 1; color: #666;
}
.modal-close:hover { color: #000; }

body.modal-open { overflow: hidden; }

/* ===== LEGAL CONTENT + fade inferior (lo que ya añadimos) ===== */
.legal-content {
  position: relative;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding-right: 4px;
}
.legal-content::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 40px;
  margin-top: -40px;
  background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0));
  pointer-events: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Accesibilidad: respetar usuarios con “reduced motion” */
@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-backdrop,
  .modal-dialog {
    transition: none !important;
  }
  .modal-dialog {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* === FIX tabla legal: fondo blanco, bordes grises === */
.legal-table-container {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 6px;
  background: #fff;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #222;
  background: #fff !important;
}

.legal-table th,
.legal-table td {
  border: 1px solid #ccc !important;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  background: #fff !important;
}

.legal-table th {
  font-weight: 600;
  color: #111;
}

/* Quitar cualquier modo oscuro */
@media (prefers-color-scheme: dark) {
  .legal-table,
  .legal-table th,
  .legal-table td {
    background: #fff !important;
    color: #222 !important;
    border-color: #ccc !important;
  }
}









.aviso-cookies {
	display: none;
	background: #fff;
	padding: 20px;
	width: calc(100% - 40px);
	max-width: 300px;
	line-height: 150%;
	border-radius: 10px;
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 100;
	padding-top: 60px;
	box-shadow: 0px 2px 20px 10px rgba(222,222,222,.25);
	text-align: center;
}

.aviso-cookies.activo {
	display: block;
}

.aviso-cookies .galleta {
	max-width: 100px;
	position: absolute;
	top: -50px;
	left: calc(50% - 50px);
}

.aviso-cookies .titulo,
.aviso-cookies .parrafo {
	margin-bottom: 15px;
}

.aviso-cookies .boton {
	width: 100%;
	background: #595959;
	border: none;
	color: #fff;
	font-family: 'Roboto', sans-serif;
	text-align: center;
	padding: 15px 20px;
	font-weight: 700;
	cursor: pointer;
	transition: .3s ease all;
	border-radius: 5px;
	margin-bottom: 15px;
	font-size: 14px;
}

.aviso-cookies .boton:hover {
	background: #000;
}

.aviso-cookies .enlace {
	color: #4DBFFF;
	text-decoration: none;
	font-size: 14px;
}

.aviso-cookies .enlace:hover {
	text-decoration: underline;
}

.fondo-aviso-cookies {
	display: none;
	background: rgba(0,0,0,.20);
	position: fixed;
	z-index: 99;
	width: 100vw;
	height: 100vh;
	top: 0;
	left: 0;
}

.fondo-aviso-cookies.activo {
	display: block;
}


/* ===== Bloqueo de scroll mientras el banner está activo ===== */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}


.aviso-cookies .boton-secundario {
  background: #bbb;
}
.aviso-cookies .cookies-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}


