/*
Theme Name: Mato Travels
Theme URI: https://matotravels.com
Description: Custom travel-agency child theme for Mato Travels — professional design, brand identity, styled forms, header and footer.
Author: Mato Travels
Template: twentytwentyfive
Version: 1.0.0
Text Domain: matotravels
*/

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/poppins-700.woff2") format("woff2");
}

:root {
  --mt-ocean: #0b4f6c;
  --mt-teal: #0e8f8c;
  --mt-sunset: #f5811e;
  --mt-gold: #f6b93b;
  --mt-ink: #132a33;
  --mt-shadow: 0 10px 30px rgba(19, 42, 51, 0.10);
  --mt-shadow-sm: 0 4px 14px rgba(19, 42, 51, 0.08);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- Top info bar ---------- */
.mt-topbar {
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.mt-topbar a { color: inherit; text-decoration: none; }
.mt-topbar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.mt-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(19,42,51,.08), 0 6px 20px rgba(19,42,51,.04);
}
.mt-header .wp-block-site-title a {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--mt-ocean);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mt-header .wp-block-site-title a::before { content: "✈ "; color: var(--mt-sunset); }

/* Navigation */
.mt-header .wp-block-navigation {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
}
.mt-header .wp-block-navigation a { color: var(--mt-ink); }
.mt-header .wp-block-navigation a:hover { color: var(--mt-sunset); }
.mt-header .wp-block-navigation .current-menu-item a { color: var(--mt-sunset); }

/* Header CTA button */
.mt-cta .wp-block-button__link {
  background: var(--mt-sunset);
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 6px 16px rgba(245,129,30,.30);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mt-cta .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(245,129,30,.38);
}

/* ---------- Buttons (global) ---------- */
.wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(19,42,51,.18); }
.wp-block-button.is-style-outline .wp-block-button__link { border-width: 2px; font-weight: 600; }

/* ---------- Hero ---------- */
.mt-hero { position: relative; }
.mt-hero .wp-block-cover__inner-container { max-width: 820px; }
.wp-block-cover h1 { text-shadow: 0 2px 20px rgba(0,0,0,.35); }

/* Eyebrow label */
.mt-eyebrow {
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 600;
  font-size: .8rem;
}

/* ---------- Cards ---------- */
.mt-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--mt-shadow-sm);
  border: 1px solid rgba(19,42,51,.07);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.mt-card:hover { transform: translateY(-6px); box-shadow: var(--mt-shadow); }
.mt-card img { width: 100%; height: 240px; object-fit: cover; display: block; }

/* Service icon tiles */
.mt-service {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(19,42,51,.08);
  box-shadow: var(--mt-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  height: 100%;
}
.mt-service:hover { transform: translateY(-6px); box-shadow: var(--mt-shadow); border-color: rgba(14,143,140,.4); }
.mt-service .mt-ico { font-size: 2.4rem; line-height: 1; }

/* Price / destination overlay cards */
.mt-dest { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--mt-shadow-sm); }
.mt-dest img { width:100%; height: 300px; object-fit: cover; display:block; transition: transform .5s ease; }
.mt-dest:hover img { transform: scale(1.06); }
.mt-dest .mt-dest-label {
  position:absolute; left:0; right:0; bottom:0;
  padding: 2.2rem 1.2rem 1.1rem;
  color:#fff; font-family:"Poppins",sans-serif; font-weight:600; font-size:1.15rem;
  background: linear-gradient(to top, rgba(11,79,108,.92), rgba(11,79,108,0));
}
/* Whole destination card is clickable via a stretched link */
.mt-dest { cursor: pointer; }
.mt-dest-label a { color:#fff; text-decoration:none; }
.mt-dest-label a::after { content:""; position:absolute; inset:0; z-index:1; }

/* Card title links (tour listing) */
.mt-card h3 a { color: var(--mt-ink); text-decoration:none; }
.mt-card:hover h3 a { color: var(--mt-sunset); }
.mt-card figure a { display:block; }

/* ---------- Card grid (standard CSS Grid — replaces fragile WP columns) ---------- */
.mt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}
.mt-grid > * { margin: 0 !important; }           /* neutralise WP flow-layout margins */
@media (max-width: 960px) { .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mt-grid { grid-template-columns: 1fr; } }

/* Equal-height cards with the action button pinned to the bottom */
.mt-grid .mt-card { display: flex; flex-direction: column; }
.mt-card .mt-card-body { flex: 1; display: flex; flex-direction: column; }
.mt-card .mt-card-body .wp-block-buttons { margin-top: auto; padding-top: .5rem; }

/* Feature ("Want something custom?") card */
.mt-card--feature {
  background: var(--mt-ocean);
  color: #fff;
  justify-content: center;
  padding: 2rem 1.8rem;
}
.mt-card--feature:hover { transform: none; box-shadow: var(--mt-shadow-sm); }
.mt-card--feature h3, .mt-card--feature p { color: #fff; }

/* Stat counters */
.mt-stat .wp-block-heading { font-family:"Poppins",sans-serif; color: var(--mt-ocean); }

/* ---------- Tables ---------- */
.wp-block-table table { border-collapse: separate; border-spacing: 0; width:100%; border-radius: 12px; overflow: hidden; box-shadow: var(--mt-shadow-sm); }
.wp-block-table th {
  background: var(--mt-ocean); color:#fff; font-family:"Poppins",sans-serif;
  font-weight:600; text-align:left; padding: 14px 18px; font-size:.98rem;
}
.wp-block-table td { padding: 13px 18px; border-bottom: 1px solid rgba(19,42,51,.08); }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--mt-ocean-light, #f4f9fa); }
.wp-block-table tbody tr:hover { background: #fff7ef; }
.wp-block-table figcaption { color:#5a6b72; font-size:.85rem; }

/* ---------- Contact Form 7 ---------- */
.wpcf7 { font-family: "Manrope", sans-serif; }
.wpcf7 .mt-form-row { display:flex; gap: 1.75rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.wpcf7 .mt-form-row > p { flex:1 1 220px; min-width: 0; margin: 0; }
.wpcf7 p { margin: 0 0 1.25rem; }
.wpcf7 label { display:block; font-weight:600; color: var(--mt-ink); margin-bottom:.4rem; font-size:.95rem; }
.wpcf7 .wpcf7-form-control-wrap { display:block; }
.wpcf7-form-control:not(.wpcf7-submit):not([type=checkbox]):not([type=radio]) {
  box-sizing: border-box;
  width:100%; padding: 13px 15px;
  border:1.5px solid #d8e0e3; border-radius:10px;
  font-size:1rem; background:#fff; color:var(--mt-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.wpcf7 textarea.wpcf7-form-control { min-height: 140px; resize: vertical; }
.wpcf7-form-control:focus {
  outline:none; border-color: var(--mt-teal);
  box-shadow: 0 0 0 3px rgba(14,143,140,.15);
}
.wpcf7-submit {
  background: var(--mt-sunset); color:#fff; border:none;
  padding: 14px 34px; border-radius:10px; cursor:pointer;
  font-family:"Poppins",sans-serif; font-weight:600; font-size:1.02rem;
  box-shadow: 0 8px 18px rgba(245,129,30,.30);
  transition: transform .15s ease, box-shadow .15s ease;
  width:auto;
}
.wpcf7-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(245,129,30,.4); }
.wpcf7-spinner { margin-top: 12px; }
.wpcf7 .wpcf7-response-output {
  border-radius:10px; padding: 12px 16px; margin: 1rem 0 0; font-size:.95rem;
}

/* Contact info list */
.mt-contact-item { display:flex; gap:.9rem; align-items:flex-start; margin-bottom: 1.3rem; }
.mt-contact-item .mt-ico {
  flex:0 0 44px; width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:1.2rem;
  background: rgba(14,143,140,.12); color: var(--mt-teal);
}

/* ---------- Footer ---------- */
.mt-footer {
  background: var(--mt-ocean);
  color: #d6e4ea;
  font-size: .96rem;
}
.mt-footer .wp-block-heading { color:#fff; font-family:"Poppins",sans-serif; font-size:1.05rem; margin-bottom:1rem; }
.mt-footer a { color:#d6e4ea; text-decoration:none; }
.mt-footer a:hover { color:#fff; text-decoration:underline; }
.mt-footer .wp-block-navigation { display:block; }
.mt-footer .wp-block-navigation ul { display:block; }
.mt-footer .wp-block-navigation li { margin-bottom:.55rem; }
.mt-footer-bottom { border-top:1px solid rgba(255,255,255,.15); color:#9fbcc7; font-size:.86rem; }
.mt-footer-brand { font-family:"Poppins",sans-serif; font-weight:700; font-size:1.4rem; color:#fff; }
.mt-footer-brand::before { content:"✈ "; color: var(--mt-gold); }

/* ---------- Seamless full-width sections ---------- */
/* Kill the flow-layout margin between top-level sections so colored bands
   sit flush against each other with no white gap showing through. */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .mt-section {
  margin-block-start: 0;
  margin-block-end: 0;
}
/* No gap between the header and the first hero, or footer and last section */
main.wp-block-group { margin-top: 0; }
main.wp-block-group > .wp-block-post-content > *:first-child { margin-block-start: 0; }
/* Footer template part sits at the site root and inherits a flow-layout top
   margin — remove it so the last section flushes into the footer. */
.wp-site-blocks > footer,
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }

/* ---------- Section helpers ---------- */
.mt-section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.mt-badge {
  display:inline-block; background: rgba(245,129,30,.14); color: var(--mt-sunset);
  font-family:"Poppins",sans-serif; font-weight:600; font-size:.8rem;
  letter-spacing:.12em; text-transform:uppercase;
  padding:.4rem .9rem; border-radius:99px;
}

/* =====================================================================
   RESPONSIVE  — make every section adapt cleanly from desktop → mobile
   ===================================================================== */

/* ---- Tablet (≤ 960px): any multi-column card/content row wraps to 2-up ---- */
@media (max-width: 960px) {
  .mt-section .wp-block-columns:not(.is-not-stacked-on-mobile) { flex-wrap: wrap; }
  .mt-section .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex: 1 1 calc(50% - 1rem) !important;
    min-width: 0;
  }
  .mt-grid  { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ---- Phone/portrait tablet (≤ 781px) ---- */
@media (max-width: 781px) {
  /* Tighter vertical rhythm + side gutters so content never touches edges */
  .mt-section { padding-top: 3rem; padding-bottom: 3rem; padding-left: 20px; padding-right: 20px; }
  .wp-block-cover__inner-container { padding-left: 18px; padding-right: 18px; }

  /* Everything stacks to a single column */
  .mt-section .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex: 1 1 100% !important;
  }

  /* Hero: shorter and readable */
  .mt-hero { min-height: 64vh !important; }
  .wp-block-cover h1 { font-size: 2.1rem !important; }
  .mt-header .wp-block-site-title a { font-size: 1.25rem; }

  /* Top contact bar: centred and allowed to wrap */
  .mt-topbar .wp-block-group { justify-content: center; text-align: center; gap: 2px 14px; }
  .mt-topbar { font-size: 0.8rem; }

  /* Cards */
  .mt-card img, .mt-dest img { height: 210px; }

  /* Wide tables scroll horizontally instead of squashing */
  .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wp-block-table table { min-width: 600px; font-size: .92rem; }
  .wp-block-table th, .wp-block-table td { padding: 11px 13px; }

  /* Contact form: paired inputs stack full width */
  .wpcf7 .mt-form-row { flex-direction: column; gap: 0; }

  /* Footer columns get breathing room when stacked */
  .mt-footer .wp-block-columns { gap: 2rem; }
}

/* ---- Small phones (≤ 600px) ---- */
@media (max-width: 600px) {
  .mt-grid { grid-template-columns: 1fr; }
  .wp-block-cover h1 { font-size: 1.85rem !important; }
  .mt-section .wp-block-columns { gap: 1.5rem; }
  .wp-block-buttons { justify-content: center; }
}
