/*
Theme Name: United Towing & Transport
Theme URI: https://unitedtt.com
Author: Gonzalo
Description: Custom theme for United Towing & Transport v4
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: united-tt
*/

:root {
  --blue: #2660EF;
  --blue-dark: #1a4cc4;
  --blue-light: #3a75ff;
  --red: #FF0000;
  --red-dark: #cc0000;
  --navy: #0A0F1A;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f0f1f3;
  --gray-200: #d9dce1;
  --gray-300: #b0b5bd;
  --gray-500: #6c757d;
  --gray-700: #3d4550;
  --gray-900: #1a1d21;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --max-width: 1170px;
  --header-height: 80px;
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.7; color: var(--gray-700); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--gray-900); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* =================================================================
   HEADER
   ================================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white);
  height: var(--header-height);
  display: flex; align-items: center;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
}

/* Logo — BIG */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { height: 200px; width: auto; }

/* Desktop Nav — center area */
.desktop-nav { display: flex; align-items: center; }
.desktop-nav .menu { display: flex; align-items: center; }
.desktop-nav .menu li { position: relative; }
.desktop-nav .menu li a {
  display: block; padding: 8px 14px;
  font-family: var(--font-heading); font-size: 11px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--gray-700); transition: color var(--transition);
}
.desktop-nav .menu li a:hover,
.desktop-nav .menu li.current-menu-item a { color: var(--blue); }

/* Underline on active/hover */
.desktop-nav .menu li a::after {
  content: ''; position: absolute; bottom: -2px; left: 14px; right: 14px;
  height: 2px; background: var(--blue); transform: scaleX(0); transition: transform 0.3s ease;
}
.desktop-nav .menu li a:hover::after,
.desktop-nav .menu li.current-menu-item a::after { transform: scaleX(1); }

/* Dropdowns */
.desktop-nav .menu li .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--white); box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  border-top: 3px solid var(--blue); padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all var(--transition);
}
.desktop-nav .menu li:hover .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.desktop-nav .menu li .sub-menu a { padding: 10px 20px; font-size: 12px; }
.desktop-nav .menu li .sub-menu a::after { display: none; }

/* Social icons — single group, right side */
.header-right { display: flex; align-items: center; gap: 16px; }
.social-icons { display: flex; align-items: center; gap: 8px; }
.social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; color: var(--gray-700); border-radius: 50%;
  transition: all var(--transition);
}
.social-icons a:hover { color: var(--blue); background: rgba(38,96,239,0.06); }

/* Mobile Toggle */
.mobile-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 1002; position: relative;
  width: 40px; height: 40px;
}
.mobile-toggle span {
  display: block; width: 24px; height: 2px; background: var(--gray-900);
  position: absolute; left: 8px;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.mobile-toggle span:nth-child(1) { top: 12px; }
.mobile-toggle span:nth-child(2) { top: 19px; }
.mobile-toggle span:nth-child(3) { top: 26px; }
.mobile-toggle.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* =================================================================
   MOBILE NAV OVERLAY
   ================================================================= */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 1001;
  background: var(--white);
  display: flex; flex-direction: column;
  padding: calc(var(--header-height) + 20px) 30px 30px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-nav-overlay.open { transform: translateX(0); }
.mobile-nav-overlay .menu { display: flex; flex-direction: column; }
.mobile-nav-overlay .menu li a {
  display: block; padding: 16px 0;
  font-family: var(--font-heading); font-size: 16px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--gray-900); border-bottom: 1px solid var(--gray-100);
  transition: color var(--transition);
}
.mobile-nav-overlay .menu li a:hover { color: var(--blue); }
.mobile-nav-overlay .menu li .sub-menu {
  padding-left: 20px;
}
.mobile-nav-overlay .menu li .sub-menu a {
  font-size: 14px; font-weight: 600; color: var(--gray-500);
}
.mobile-nav-social {
  display: flex; gap: 20px; margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}
.mobile-nav-social a { color: var(--gray-700); transition: color var(--transition); }
.mobile-nav-social a:hover { color: var(--blue); }

/* =================================================================
   HERO
   ================================================================= */
.hero-section {
  position: relative; width: 100%;
  height: 85vh; min-height: 550px; max-height: 800px;
  overflow: visible; /* truck overflows */
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  margin-top: var(--header-height);
  z-index: 2;
}
.hero-video-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-video-wrap iframe {
  position: absolute; top: 50%; left: 50%;
  width: 180vw; height: 180vh;
  transform: translate(-50%, -50%); pointer-events: none; border: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(10,15,26,0.6) 0%,
    rgba(10,15,26,0.3) 40%,
    rgba(10,15,26,0.65) 100%
  );
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 0 20px 80px; /* bottom padding so text doesn't overlap truck */
  max-width: 800px;
}
.hero-content h1 {
  font-family: var(--font-heading); font-size: 42px; font-weight: 800;
  color: var(--white); line-height: 1.15; letter-spacing: 0.5px;
  margin-bottom: 30px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-cta-wrap { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* TRUCK — centered at exact bottom edge of hero */
.hero-truck-wrap {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translate(-50%, 50%); /* center horizontally, half below hero edge */
  z-index: 10; pointer-events: none;
  width: 480px; max-width: 50vw;
}
.hero-truck-wrap img {
  width: 100%; height: auto;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.4));
}

/* Buttons */
.btn {
  display: inline-block; padding: 14px 36px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; border-radius: 3px;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,0,0,0.3); }
.btn-outline-white { border: 2px solid rgba(255,255,255,0.7); color: var(--white); background: transparent; padding: 12px 34px; }
.btn-outline-white:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(38,96,239,0.3); }

/* =================================================================
   SECTION SHARED
   ================================================================= */
.section-title { font-size: 30px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.section-divider { width: 50px; height: 3px; background: var(--blue); margin-bottom: 24px; }
.section-title-center { font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; text-align: center; margin-bottom: 12px; }
.section-divider-center { width: 50px; height: 3px; background: var(--blue); margin: 0 auto 40px; }

/* =================================================================
   ABOUT
   ================================================================= */
.about-section {
  padding: 140px 0 90px; /* extra top for truck overlap */
  position: relative; z-index: 1;
}
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-content p { font-size: 14.5px; line-height: 1.85; color: var(--gray-500); margin-bottom: 16px; }
.about-content .btn { margin-top: 8px; }
.about-image { position: relative; }
.about-image img { width: 100%; border-radius: 4px; }
.about-image::before {
  content: ''; position: absolute; top: -10px; right: -10px;
  width: 100%; height: 100%; border: 3px solid var(--blue);
  border-radius: 4px; z-index: -1; opacity: 0.25;
}

/* =================================================================
   LOCATIONS (simplified)
   ================================================================= */
.locations-section { padding: 80px 0 90px; background: var(--gray-50); text-align: center; }
.locations-section p { font-size: 15px; color: var(--gray-500); max-width: 600px; margin: 0 auto 30px; line-height: 1.8; }

/* =================================================================
   CTA BANNER
   ================================================================= */
.cta-banner { background: var(--blue); overflow: hidden; }
.cta-banner-full { text-align: center; padding: 50px 20px 0; }
.cta-banner-full h2 { font-size: 28px; color: var(--white); font-weight: 700; }
.cta-gallery { display: flex; gap: 0; margin-top: 30px; }
.cta-gallery img { flex: 1; min-width: 0; height: 280px; object-fit: cover; transition: transform 0.5s ease; }
.cta-gallery img:hover { transform: scale(1.03); }

/* =================================================================
   IMAGE GALLERY
   ================================================================= */
.gallery-section { padding: 0; overflow: hidden; }
.gallery-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.gallery-grid img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s ease; }
.gallery-grid img:hover { transform: scale(1.05); }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--white); margin-bottom: 20px; }
.footer-col p { font-size: 13px; line-height: 1.8; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: all var(--transition); }
.footer-col ul li a:hover { color: var(--white); padding-left: 4px; }
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.footer-social a { color: rgba(255,255,255,0.4); transition: all var(--transition); }
.footer-social a:hover { color: var(--blue-light); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-size: 12px; color: rgba(255,255,255,0.4); }

/* =================================================================
   WP DEFAULTS
   ================================================================= */
.alignleft { float: left; margin-right: 20px; margin-bottom: 10px; }
.alignright { float: right; margin-left: 20px; margin-bottom: 10px; }
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; width: 1px; height: 1px; overflow: hidden; }
.page-content { padding: 60px 0; }
.page-content p { margin-bottom: 16px; }
.page-banner { background: var(--navy); padding: 80px 0 60px; text-align: center; margin-top: var(--header-height); }
.page-banner h1 { font-size: 36px; color: var(--white); text-transform: uppercase; letter-spacing: 3px; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 991px) {
  :root { --header-height: 70px; }
  .desktop-nav { display: none; }
  .mobile-toggle { display: block; }
  .header-right .social-icons { display: none; }

  .hero-section { min-height: 450px; max-height: 650px; height: 75vh; }
  .hero-content h1 { font-size: 30px; }
  .hero-content { padding-bottom: 60px; }
  .hero-truck-wrap { width: 380px; max-width: 55vw; }

  .about-inner { grid-template-columns: 1fr; gap: 30px; }
  .about-section { padding-top: 110px; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid img { height: 200px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-gallery img { height: 200px; }
}

@media (max-width: 576px) {
  :root { --header-height: 62px; }
  .site-logo img { height: 42px; }

  .hero-section { min-height: 380px; height: 70vh; }
  .hero-content h1 { font-size: 24px; }
  .hero-content { padding-bottom: 50px; }
  .hero-truck-wrap { width: 280px; max-width: 70vw; }

  .about-section { padding-top: 90px; }
  .about-section, .locations-section { padding-bottom: 50px; }
  .section-title { font-size: 24px; }
  .section-title-center { font-size: 22px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 150px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .cta-gallery { flex-direction: column; }
  .cta-gallery img { height: 180px; flex: none; }
}
