/*
Theme Name: TGL - Trans Global Logistics
Theme URI: https://www.tgl-sa.com
Author: TGL Development Team
Author URI: https://www.tgl-sa.com
Description: Professional WordPress theme for Trans Global Logistics. Styling via Tailwind CDN + custom.css; this file provides minimal, accessibility-focused fallbacks.
Version: 1.0.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tgl
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, logistics, freight, shipping
*/

/* ---------- Minimal, performance-friendly fallbacks ---------- */

/* CSS variables used by custom.css and inline utilities */
:root{
  --tgl-blue:#2c347a;
  --tgl-blue-light:#3d4687;
  --tgl-red:#e92b30;
  --tgl-red-dark:#8a1b1e;
}

/* Ensure images are responsive by default (prevents layout break if Tailwind fails) */
img{max-width:100%;height:auto}

/* Sticky footer fallback removed to prevent double scroll */
/* html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; } */

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* Override to normal flow when fixed header is active to prevent double scroll */
body.has-fixed-nav {
  display: block;
  min-height: auto;
}

/* WordPress admin bar + fixed nav offset (mobile & desktop) */
body.admin-bar nav.fixed{top:32px}
@media (max-width:782px){
  body.admin-bar nav.fixed{top:46px}
}

/* Screen reader text (WordPress standard) */
.screen-reader-text{
  border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);
  height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important
}
.screen-reader-text:focus{
  background:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);
  clip:auto!important;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;
  height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000
}

/* Skip-link target outline reset */
#primary[tabindex="-1"]:focus{outline:0}

/* Caption/Gallery minimal fallback (avoid layout issues in classic content) */
.wp-caption{margin-bottom:1rem;max-width:100%}
.wp-caption img[class*="wp-image-"]{display:block;margin-left:auto;margin-right:auto}
.wp-caption .wp-caption-text,.gallery-caption{text-align:center;font-size:.875rem;margin:.5rem 0}
.gallery{margin-bottom:1rem}

/* Contact Form 7 minimal messages (high-contrast, accessible) */
.wpcf7-not-valid-tip{color:var(--tgl-red);font-size:.875rem;margin-top:.25rem}
.wpcf7-response-output{margin:1rem 0;padding:1rem;border-radius:.375rem}
.wpcf7-mail-sent-ok{background:#10b981;color:#fff}
.wpcf7-mail-sent-ng,.wpcf7-aborted{background:#ef4444;color:#fff}
.wpcf7-spam-blocked{background:#f59e0b;color:#fff}
.wpcf7-validation-errors,.wpcf7-acceptance-missing{background:#fef3c7;color:#92400e;border:1px solid #f59e0b}

/* Print: hide nav/footer & keep content legible */
@media print{
  nav,footer,.no-print{display:none!important}
  body{font-size:12pt;line-height:1.5}
  h1,h2,h3,h4,h5,h6{page-break-after:avoid}
  img{max-width:100%!important}
}