/* ==========================================================
   MOBILE.CSS — sitewide responsive fixes
   Conquerors Direct Marketing

   Load on EVERY page, AFTER style.css:
     <link rel="stylesheet" href="assets/css/style.css">
     <link rel="stylesheet" href="assets/css/mobile.css">

   Nothing here changes the desktop look except where the
   desktop rule was already broken.
   ========================================================== */


/* ----------------------------------------------------------
   1. CONTAINER PADDING
   style.css has `padding: var(1%)` which is invalid CSS, so
   the container has had NO padding at all on desktop and
   tablet. Content runs to the edge of the screen.
   ---------------------------------------------------------- */
.container {
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}


/* ----------------------------------------------------------
   2. NOTHING EXCEEDS THE VIEWPORT
   ---------------------------------------------------------- */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

img,
video,
iframe,
table,
pre {
  max-width: 100%;
}

img {
  height: auto;
}

/* Long emails / URLs that push the layout wide */
.info-content a,
.footer-contact a,
.quick-link,
.sidebar-link {
  word-break: break-word;
  overflow-wrap: anywhere;
}


/* ----------------------------------------------------------
   3. THE GOOGLE MAP (contact.html)
   The iframe is hard-coded to width="1200" height="550" inside
   a 400px-tall centred flex box. This is the single worst
   horizontal-overflow source on the site.
   ---------------------------------------------------------- */
.map-wrapper {
  min-height: 0;
}

.map-section .map-placeholder {
  display: block;
  height: auto;
  min-height: 0;
  padding: 30px 24px 0;
  text-align: center;
}

.map-section .map-placeholder iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 420px;
  border: 0;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .map-section .map-placeholder {
    padding: 24px 16px 0;
  }
  .map-section .map-placeholder iframe {
    height: 300px;
  }
}


/* ----------------------------------------------------------
   4. GRIDS THAT NEVER COLLAPSED
   style.css only stacks about-grid, services-grid, values-grid,
   process-grid, contact-grid, team-grid, gallery-grid,
   positions-grid and testimonials-grid. Everything below stayed
   at 2–4 fixed columns all the way down to 320px.
   ---------------------------------------------------------- */
@media (max-width: 992px) {
  .story-grid,
  .featured-grid,
  .culture-grid,
  .team-intro-grid,
  .mission-grid,
  .values-section .values-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-detail-grid,
  .benefits-grid,
  .industries-grid,
  .community-grid,
  .quick-contact-grid,
  .values-grid-full,
  .leadership-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* .contact-main .contact-grid is `400px 1fr` and outranks the
     generic .contact-grid override in style.css */
  .contact-main .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* These cap at 600px, which strands them left once stacked */
  .about-content,
  .story-content,
  .featured-content,
  .culture-content,
  .team-intro-content {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .services-detail-grid,
  .benefits-grid,
  .industries-grid,
  .community-grid,
  .quick-contact-grid,
  .values-grid-full,
  .leadership-grid,
  .team-grid,
  .stats-grid,
  .about-features,
  .culture-features,
  .features-list,
  .values-cards {
    grid-template-columns: 1fr;
  }

  /* First card in .values-cards spans 2 cols — undo once stacked */
  .values-cards .value-card:first-child {
    grid-column: auto;
  }
}


/* ----------------------------------------------------------
   5. CARD PADDING
   Several cards keep 40–50px padding on a 320px screen, which
   leaves almost no room for the text itself.
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .mission-card,
  .contact-info-panel,
  .contact-form-panel,
  .contact-form-wrapper,
  .contact-info,
  .testimonial-card,
  .service-detail-card,
  .position-card,
  .value-card-full,
  .benefit-card,
  .industry-card,
  .quick-card,
  .stat-card,
  .service-card {
    padding: 28px 20px;
  }

  .service-detail-card {
    flex-direction: column;
    gap: 18px;
  }

  .cta-card {
    padding: 36px 20px;
  }

  .faq-question {
    padding: 18px 18px;
  }

  .faq-item.active .faq-answer {
    padding: 0 18px 20px;
  }
}


/* ----------------------------------------------------------
   6. FLEX ROWS THAT OVERFLOW
   ---------------------------------------------------------- */
.story-highlights,
.featured-stats,
.hero-stats-mini,
.team-stats-mini,
.cta-buttons,
.hero-buttons,
.position-meta,
.footer-social,
.social-links,
.form-actions {
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .story-highlights,
  .featured-stats,
  .hero-stats-mini,
  .team-stats-mini {
    gap: 24px;
    justify-content: space-between;
  }
}


/* ----------------------------------------------------------
   7. PAGE HEADER
   180px top padding on a phone pushes the H1 below the fold.
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .page-header {
    padding: 130px 0 60px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 110px 0 45px;
  }
}


/* ----------------------------------------------------------
   8. FIXED-HEIGHT IMAGE BOXES
   .image-placeholder is a 280px flex box; the photos inside it
   are never told to fill it, so they letterbox or overflow.
   Scoped per-section so the masonry gallery is left alone.
   ---------------------------------------------------------- */
.story-visual .image-placeholder img,
.story-image-wrapper .image-placeholder img,
.about-image .image-placeholder img,
.featured-visual .image-placeholder img,
.community-image .image-placeholder img,
.culture-image .image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Masonry gallery must keep natural height */
.masonry-gallery .image-placeholder,
.masonry-gallery .image-placeholder img {
  height: auto;
}

@media (max-width: 768px) {
  .image-placeholder {
    height: 240px;
  }
  .image-placeholder.large {
    height: 260px;
  }
  .culture-image:first-child .image-placeholder {
    height: 240px;
  }
}


/* ----------------------------------------------------------
   9. TYPOGRAPHY
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.25rem; }

  .section-subtitle,
  .section-text,
  .hero-description {
    font-size: 1rem;
  }

  .stat-number { font-size: 2.1rem; }
  .highlight-number,
  .featured-number { font-size: 1.6rem; }
}


/* ----------------------------------------------------------
   10. TAP TARGETS (44px minimum)
   ---------------------------------------------------------- */
@media (max-width: 991px) {
  .nav-link {
    padding: 14px 20px;
  }

  .btn {
    padding: 13px 24px;
    min-height: 44px;
  }

  .team-social a,
  .footer-social a,
  .social-links a,
  .faq-toggle,
  .slider-dot {
    min-width: 44px;
    min-height: 44px;
  }

  .scroll-top {
    width: 46px;
    height: 46px;
    bottom: 20px;
    right: 16px;
  }
}

/* Dots are decorative — keep them small but pad the hit area */
@media (max-width: 991px) {
  .slider-dot {
    min-width: 0;
    min-height: 0;
    padding: 12px;
    background-clip: content-box;
  }
}


/* ----------------------------------------------------------
   11. FORMS
   Inputs under 16px make iOS Safari zoom the whole page on
   focus, which then leaves the layout scrolled sideways.
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .form-control {
    font-size: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .job-application-wrapper {
    display: block;
  }

  .application-sidebar {
    margin-bottom: 30px;
  }

  textarea.form-control,
  .contact-form textarea {
    min-height: 120px;
  }
}

.checkbox-label {
  align-items: flex-start;
}


/* ----------------------------------------------------------
   12. 3D HOVER EFFECTS OFF ON TOUCH
   rotateX/rotateY rasterises the card and softens any photo
   inside it. On touch devices the hover state also sticks
   after a tap, so the blur never clears.
   ---------------------------------------------------------- */
@media (hover: none), (max-width: 991px) {
  .service-card,
  .team-card,
  .stat-card,
  .gallery-item {
    perspective: none;
    transform-style: flat;
  }

  .service-card:hover,
  .team-card:hover,
  .stat-card:hover,
  .position-card:hover {
    transform: none;
  }

  .about-image-wrapper:hover .about-image,
  .hero-image-wrapper:hover .hero-image,
  .gallery-item:hover img,
  .gallery-item:hover .image-placeholder img,
  .team-card:hover .team-image img {
    transform: none;
  }
}


/* ----------------------------------------------------------
   13. FOOTER
   The HTML uses <h4> for the column headings but style.css
   styles `.footer h5`, so none of it has ever applied.
   ---------------------------------------------------------- */
.footer h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 22px;
  position: relative;
  padding-bottom: 12px;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .footer {
    padding-top: 50px;
  }

  .footer h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact li {
    justify-content: center;
    text-align: left;
  }

  .footer-links a:hover {
    padding-left: 0;
  }
}


/* ----------------------------------------------------------
   14. LEADERSHIP CARDS
   Consistent portrait crop at every width. Moved out of the
   inline <style> in about.html so other pages inherit it.
   ---------------------------------------------------------- */
.leadership-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
  justify-content: center;
}

.team-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.team-image .image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
  border-radius: 0;
  background: none;
}

.team-image .image-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: none;
}

/* Names are marked up as <h3>, which inherits the global
   clamp() up to 2rem */
.team-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.team-info .team-role {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
}


/* ----------------------------------------------------------
   15. REDUCED MOTION
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate {
    opacity: 1;
    transform: none;
  }
}


/* ----------------------------------------------------------
   16. KEYBOARD FOCUS
   ---------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}