@media (max-width: 700px) {
  .main-nav {
    width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .main-nav a {
    width: 100vw !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left;
  }
}
:root{
  --bg:#f7f9fb;
  --accent:#0a57a0;
  --accent-2:#00b4d8;
  --text:#223;
  --muted:#6b7280;
  --container:1100px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;

  /* layout fix: mantener footer al fondo */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* hace que el main ocupe el espacio restante */
main, .main {
  flex: 1 0 auto;
}

/* opcional: asegurar footer no se superponga */
.site-footer {
  flex-shrink: 0;
}

.container{max-width:var(--container);margin:0 auto;padding:0 18px;}

.site-header{background:white;box-shadow:0 1px 6px rgba(16,24,40,0.06);position:sticky;top:0;z-index:40}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.logo img{height:44px;max-width:160px;object-fit:contain}

.main-nav{display:flex;gap:18px}
.main-nav a{color:var(--text);text-decoration:none;padding:8px 6px;border-radius:6px;font-weight:600}
.main-nav a.active, .main-nav a:hover{color:var(--accent);}

.nav-toggle{
  display:none;
  background:none;border:0;font-size:22px;cursor:pointer;padding:6px 8px;border-radius:8px;
}
@media (max-width:900px){
  .nav-toggle{display:block}
  .main-nav{
    display:none; /* shown by JS (sets display:flex) */
    position: absolute;
    right:18px;
    top:64px;
    background:white;
    padding:12px;
    border-radius:10px;
    box-shadow:0 12px 40px rgba(8,20,48,0.12);
    flex-direction:column;
    gap:8px;
    z-index:50;
    min-width:180px;
  }
  .main-nav a{display:block;padding:8px 10px}
}

.hero{padding:60px 0;background-position:center center}
.hero-inner{max-width:720px}
.hero h1{font-size:34px;margin:0 0 12px}
.hero p{margin:0 0 18px;color:rgba(255,255,255,0.9)}
.btn{display:inline-block;padding:10px 16px;border-radius:8px;text-decoration:none;font-weight:700}
.btn.primary{background:var(--accent-2);color:white}

.products{padding:48px 0}
.products h2{margin:0 0 18px}
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media (max-width:1100px){
  .product-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:700px){
  .product-grid{grid-template-columns:1fr;gap:14px}
  .footer-grid{grid-template-columns:1fr}
  .hero h1{font-size:28px}
}

/* CARD IMAGES */
.card-img{height:140px;border-radius:6px;background-size:cover;background-position:center;margin-bottom:12px}
@media (max-width:700px){
  .card-img{height:160px}
}

.about{padding:36px 0;background:transparent}

.site-footer{background:#0b213b;color:white;padding:24px 0;margin-top:36px}
.footer-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;align-items:start}
.footer-logo{height:40px;margin-bottom:8px}
.footer-bottom{text-align:center;padding:12px;color:rgba(255,255,255,0.7);margin-top:12px}

/* Responsive */
@media (max-width:900px){
  .product-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:700px){
  .main-nav{display:none}
  .nav-toggle{display:block}
  .product-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .hero h1{font-size:28px}
}

/* Reveal / emerge-up effect */
.reveal {
  transform: translateY(18px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 640ms cubic-bezier(.22,.9,.32,1), opacity 480ms ease;
  transition-delay: 0ms;
}

.reveal.in-view {
  transform: translateY(0);
  opacity: 1;
}

/* slight stagger for children (applies when container gets .in-view) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: transform 640ms cubic-bezier(.22,.9,.32,1), opacity 480ms ease;
}
.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in-view > *:nth-child(1){transition-delay:60ms}
.reveal-stagger.in-view > *:nth-child(2){transition-delay:120ms}
.reveal-stagger.in-view > *:nth-child(3){transition-delay:180ms}
.reveal-stagger.in-view > *:nth-child(4){transition-delay:240ms}
.reveal-stagger.in-view > *:nth-child(5){transition-delay:300ms}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { transition: none; transform: none; opacity: 1; }
}

/* RESPONSIVE IMPROVEMENTS */
.container{max-width:var(--container);margin:0 auto;padding:0 18px}

/* header */
.header-inner{padding:12px 0}
.logo img{height:44px;max-width:160px;object-fit:contain}

/* nav toggle */
.nav-toggle{
  display:none;
  background:none;border:0;font-size:22px;cursor:pointer;padding:6px 8px;border-radius:8px;
}
@media (max-width:900px){
  .nav-toggle{display:block}
  .main-nav{
    display:none; /* shown by JS (sets display:flex) */
    position: absolute;
    right:18px;
    top:64px;
    background:white;
    padding:12px;
    border-radius:10px;
    box-shadow:0 12px 40px rgba(8,20,48,0.12);
    flex-direction:column;
    gap:8px;
    z-index:50;
    min-width:180px;
  }
  .main-nav a{display:block;padding:8px 10px}
}

/* HERO */
.hero{padding:60px 0;background-position:center center}
.hero-inner{max-width:720px}
.hero h1{font-size:34px;margin:0 0 12px}
@media (max-width:900px){
  .hero{padding:56px 0}
  .hero h1{font-size:30px}
}
@media (max-width:520px){
  .hero{padding:40px 0;background-position:top center}
  .hero-inner{padding:0 6px}
  .hero h1{font-size:22px}
  .hero p{font-size:14px}
}
@media (max-width:700px){
  .hero-inner h1 { font-size:1.2rem; }
  .hero-inner p { font-size:1rem; }
}

/* PRODUCTS GRID */
.product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media (max-width:1100px){
  .product-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:700px){
  .product-grid{grid-template-columns:1fr;gap:14px}
}

/* CARD IMAGES */
.card-img{height:140px;border-radius:6px;background-size:cover;background-position:center;margin-bottom:12px}
@media (max-width:700px){
  .card-img{height:160px}
}

/* CONTACT - ensure form stretches */
.contact-grid{display:grid;grid-template-columns:1fr 520px;gap:28px}
@media (max-width:980px){
  .contact-grid{grid-template-columns:1fr 420px}
}
@media (max-width:760px){
  .contact-grid{grid-template-columns:1fr;gap:18px}
}

/* FOOTER */
.site-footer{padding:24px 0}
.footer-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px}
@media (max-width:900px){
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:560px){
  .footer-grid{grid-template-columns:1fr}
  .footer-bottom{text-align:center}
}

/* IMAGES & MEDIA */
img{max-width:100%;height:auto;display:block}

/* small tweaks for tappable controls */
.lang-btn{min-width:44px;padding:8px 10px}
.lang-list{min-width:160px}

/* prefer-reduced-motion safe defaults already present */

/* Hero slider styles */
.hero-slider {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  min-height: 440px;
  height: 48vw;
  max-height: 680px;
  background: #0b213b;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #0b213b;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(.22,.9,.32,1);
  z-index: 1;
}
.hero-slide.active {
  opacity: 1;
  z-index: 2;
}
.hero-slides,
.hero-slide {
  width: 100vw;
  left: 0;
}
.hero-inner {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0 40px 0;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
@media (max-width:700px){
  .hero-inner{padding:40px 0 20px 0;}
}

/* HERO BLUR BACKGROUND */
.hero-blur-bg {
  position: relative;
  z-index: 3;
}
.hero-blur-bg::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 98%;
  height: 98%;
  background: rgba(11,33,59,0.55);
  border-radius: 24px;
  filter: blur(16px);
  z-index: -1;
  pointer-events: none;
}
@media (max-width:700px){
  .hero-blur-bg::before {
    border-radius: 16px;
    filter: blur(10px);
  }
}

.card-img {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: box-shadow .18s;
  box-shadow: 0 2px 12px rgba(8,20,48,0.08);
}
.card-img:hover {
  box-shadow: 0 8px 32px rgba(10,87,160,0.16);
}
/* Modal styles */
.img-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11,33,59,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .22s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.img-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(8,20,48,0.22);
  background: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  display: block;
}
.img-modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  background: #0b213b;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.85;
  transition: background .18s;
}
.img-modal-close:hover {
  background: #00b4d8;
  opacity: 1;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.hero-dot.active {
  background: #00b4d8;
  border-color: #fff;
}