/* ============================================
   HIT MADRID TOURS — Main Stylesheet
   Brand Colors & Variables
   ============================================ */
/* Utility classes (loaded first so they can be overridden) */
/* utils.css loaded via separate <link> tag — no @import */

:root {
  /* Brand Colors */
  --violet:     #c299ff;
  --teal:       #4fccc4;
  --coral:      #ff6b6b;
  --yellow:     #ffd93d;
  --sand:       #f4f4f4;
  --black:      #000000;
  --white:      #ffffff;

  /* UI Tones */
  --dark-bg:    #111111;
  --dark-card:  #1a1a1a;
  --mid-gray:   #555555;
  --light-gray: #e8e8e8;
  --text-body:  #222222;

  /* Typography */
  --font-brand: 'Anton', 'Impact', sans-serif;
  --font-display: 'Qanelas', 'Trebuchet MS', sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-pad: 100px 0;
  --container-max: 1200px;
  --radius: 16px;
  --radius-sm: 8px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip; /* clip is stronger than hidden and allows position:sticky */
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  /* Safe area for notched phones — use padding-inline so box-sizing works correctly */
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
.brand-font { font-family: var(--font-brand); }
.display-font { font-family: var(--font-display); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
}

.section-title {
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: ;
  margin-top: 12px;
  max-width: 560px;
  line-height: 1.6;
  padding-bottom: 2px; /* prevent descender clipping */
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
}

/*
.nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 30px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
}
*/

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--coral); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--yellow);
  color: var(--black) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700 !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--coral) !important;
  color: var(--white) !important;
  transform: scale(1.04);
}

.nav-cta::after { display: none !important; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0; /* prevent lang-toggle being squashed on iPad */
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: var(--sand);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  color: var(--mid-gray);
  transition: all var(--transition);
  letter-spacing: 0.05em;
}

.lang-btn.active {
  background: var(--black);
  color: var(--white);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  /* Must be above .nav (z-index:1000) so close button is tappable */
  z-index: 1002;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav-mobile.open { display: flex; }

/* nav bar drops behind when mobile menu is open */
body.mobile-nav-open .nav {
  z-index: 1;
}

.nav-mobile a {
  font-family: var(--font-brand);
  font-size: 2.5rem;
  text-transform: uppercase;
  color: var(--black);
  transition: color var(--transition);
}

.nav-mobile a:hover { color: var(--coral); }

.nav-mobile-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(0,0,0,0.06);
  border: none;
  border-radius: 50%;
  width: 56px;   /* larger tap target */
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--black);
  /* iOS tap reliability */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Must be above everything including the nav bar */
  z-index: 1003;
  /* Prevent any inherited pointer-events:none */
  pointer-events: auto;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 14px 30px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,107,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--black);
}

.btn-white:hover {
  background: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,217,61,0.4);
}

.btn-teal {
  background: var(--teal);
  color: var(--black);
}

.btn-teal:hover {
  background: var(--violet);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194,153,255,0.4);
}

/* ============================================
   COLOR BLOCKS / TAGS
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
}

.tag-violet { background: var(--violet); color: var(--black); }
.tag-teal   { background: var(--teal);   color: var(--black); }
.tag-coral  { background: var(--coral);  color: var(--white); }
.tag-yellow { background: var(--yellow); color: var(--black); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--section-pad);
}

.section-dark {
  background: var(--dark-bg);
  color: var(--white);
}

.section-sand {
  background: var(--sand);
}

.section-violet {
  background: var(--violet);
}

.section-teal {
  background: var(--teal);
}

.section-yellow {
  background: var(--yellow);
}

.section-header {
  margin-bottom: 60px;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin: 12px auto 0;
}

/* ============================================
   TEXTURE STRIP
   ============================================ */
.texture-strip {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand img { height: 56px; margin-bottom: 20px; }

.footer-brand p {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 0.9rem;
  color: #ccc;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--yellow); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}

.footer-social a:hover { background: var(--yellow); color: var(--black); }

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
}

.footer-bottom a { color: #999; }
.footer-bottom a:hover { color: var(--yellow); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   PAGE HERO (shared across inner pages)
   ============================================ */
.page-hero {
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/texture/texture7.jpg");
}

.page-hero-accent {
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  border-radius: 50%;
  opacity: 0.15;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.page-hero-content .section-title { color: #2450b3d6; }
.page-hero-content .section-subtitle { color: #3d5c8c; }

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumb a { color: #f84f4f; }
.breadcrumb span { color: #555; }

/* ============================================
   GRIDS
   ============================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 18px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--violet);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-yellow { color: var(--yellow); }
.text-teal { color: var(--teal); }
.text-coral { color: var(--coral); }
.text-violet { color: var(--violet); }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.flex-wrap { flex-wrap: wrap; }

.hidden { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.82rem; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  :root { --section-pad: 64px 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .page-hero { min-height: 260px; padding-top: 100px; padding-bottom: 40px; }
}

@media (max-width: 480px) {
  .nav-cta { display: none; }
}
