/*
Theme Name: JLS Tech Theme
Theme URI: https://jlstech.com/
Author: Antigravity
Description: Custom built, extremely fast, crash-free theme for JLS Technology. No bloated page builders.
Version: 1.0.0
Text Domain: jls-tech-theme
*/

:root {
  --color-primary-dark: #244b7a; /* Dark Blue */
  --color-primary-light: #3a6ba8;
  --color-accent-gold: #f4c430; /* Gold */
  --color-accent-red: #d32f2f; /* CTA Red */
  --color-text-light: #ffffff;
  --color-text-dark: #333333;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-primary-dark);
  color: var(--color-text-light);
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 0;
}

a {
  color: var(--color-accent-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-text-light);
}

/* 2.5 Gutenberg Structural Resets for Full-Bleed Scaling */
.site-main > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}
.site-main > .alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
}
.site-main > .alignwide {
    max-width: 1400px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.site-main > .alignfull > .wp-block-group__inner-container,
.site-main > .alignwide > .wp-block-group__inner-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Custom Editor Overrides */
.wp-block-jls-hero {
	background-color: #1a365d;
	background-image: linear-gradient(135deg, rgba(10, 15, 30, 0.45) 0%, rgba(10, 15, 30, 0.65) 100%), url('/wp-content/themes/hero.png');
	background-size: cover;
	background-position: center;
	color: #ffffff;
}

.button-cta {
  display: inline-block;
  background-color: var(--color-accent-red);
  color: var(--color-text-light);
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.button-cta:hover {
  background-color: #e53935;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(211, 47, 47, 0.6);
  color: var(--color-text-light);
}

/* Service Card Glassmorphism & Micro-animations */
.wp-block-column.has-background {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: var(--color-text-dark) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}

.wp-block-column.has-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: all 0.7s ease;
  z-index: 1;
}

.wp-block-column.has-background:hover::before {
  left: 150%;
}

.wp-block-column.has-background:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 15px rgba(244, 196, 48, 0.15);
  border-color: rgba(244, 196, 48, 0.4) !important;
}

.wp-block-column.has-background h3 {
  color: var(--color-primary-dark) !important;
  position: relative;
  z-index: 2;
}

.wp-block-column.has-background p {
  color: #444444 !important;
  line-height: 1.7;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

.service-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background-color: rgba(36, 75, 122, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.site-logo {
  font-size: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo span {
  color: var(--color-accent-gold);
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-navigation a {
  color: var(--color-text-light);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--color-accent-gold);
}

.site-content {
  min-height: 60vh;
  padding: 40px 5%;
}

.site-footer {
  background-color: #1a365d;
  padding: 40px 5%;
  text-align: center;
  border-top: 2px solid var(--color-accent-red);
  margin-top: 40px;
}

.footer-widget-area h3 {
  color: var(--color-accent-gold);
  margin-bottom: 10px;
}

.site-info {
  margin-top: 30px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* =========================================
   APP-LIKE TACTILE UX & MICRO-INTERACTIONS
   ========================================= */

/* 1. Global Transitions (Smooth Fades) */
a, button, input, textarea, .wp-block-column, .jls-open-modal-btn, .jls-cookie-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 2. Interactive Feedback (The "Tactile" Feel) */
button:active, .jls-open-modal-btn:active, .button-cta:active, a:active {
    transform: scale(0.96) !important;
}

button:hover, .jls-open-modal-btn:hover, .button-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* 3. Cursor Consistency */
button, a, input[type="submit"], .jls-open-modal-btn, .jls-modal-close-btn, .jls-cookie-btn {
    cursor: pointer !important;
}

input:disabled, button:disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* 4. Text Hierarchy & Contrast in Dark Mode */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 800;
}

p, span, li, .site-info {
    color: rgba(255, 255, 255, 0.85); /* Dark Grey equivalent for Dark Mode */
}

/* Let Gutenberg native color palettes handle contrast */
/* Fallback using strict background CSS attribute selectors to explicitly target white backgrounds without damaging dark modes */
:where(.has-background[style*="background-color:#ffffff"]),
:where(.has-background[style*="background-color: #ffffff"]),
:where(.has-background[style*="background-color:#ffffff"]) p,
:where(.has-background[style*="background-color: #ffffff"]) p,
:where(.has-background[style*="background-color:#ffffff"]) li,
:where(.has-background[style*="background-color:#FFF"]),
:where(.has-background[style*="background-color:#fff"]),
:where(.has-background[style*="background-color:#f8f9fa"]),
:where(.has-background[style*="background-color: #f8f9fa"]),
:where(.has-background[style*="background-color:#f8f9fa"]) p,
:where(.has-background[style*="background-color: #f8f9fa"]) p,
:where(.has-background[style*="background-color:#f8f9fa"]) li,
:where(.has-white-background-color),
:where(.has-white-background-color) p,
:where(.has-white-background-color) li { 
    color: #444444; 
}

:where(.has-background[style*="background-color:#ffffff"]) h1, 
:where(.has-background[style*="background-color:#ffffff"]) h2, 
:where(.has-background[style*="background-color:#ffffff"]) h3,
:where(.has-background[style*="background-color:#ffffff"]) h4,
:where(.has-background[style*="background-color:#ffffff"]) h5,
:where(.has-background[style*="background-color:#ffffff"]) h6,
:where(.has-background[style*="background-color:#f8f9fa"]) h1, 
:where(.has-background[style*="background-color:#f8f9fa"]) h2, 
:where(.has-background[style*="background-color:#f8f9fa"]) h3,
:where(.has-white-background-color) h1,
:where(.has-white-background-color) h2,
:where(.has-white-background-color) h3,
:where(.has-white-background-color) h4,
:where(.has-white-background-color) h5,
:where(.has-white-background-color) h6 { 
    color: #111111; 
}
/* By selectively targeting explicitly white palettes and hex codes, dark mode context stays perfectly legible */

/* Constrain Premium Desktop Navigation Topology */
.mobile-only {
    display: none;
}

/* 5. Mobile Fat-Finger Touch Targets & Safe Areas */
@media (max-width: 768px) {
    /* Prevent Gutenberg inline desktop padding from causing mobile horizontal scroll */
    body, html {
        overflow-x: hidden;
    }
    
    /* Safely strip desktop column margins without destroying UI cards */
    .wp-block-column:not(.has-background) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Restore internal breathing room for White Service Cards on Mobile */
    .wp-block-column.has-background {
        padding: 35px 25px !important;
        margin-bottom: 30px !important;
    }

    /* Globally safeguard against edge-bleeding (React Contact Form, etc) */
    .site-main > *:not(.alignfull) {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .site-main > .alignfull > .wp-block-group__inner-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .wp-block-button__link {
        height: auto !important;
        white-space: normal !important;
        font-size: 15px !important;
        padding: 12px 18px !important;
    }

    /* Minimum 48x48 dp standard */
    button, .jls-open-modal-btn, .jls-cookie-btn, input, textarea, select, .main-navigation a {
        min-height: 48px;
        padding: 14px 20px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .jls-modal-content {
        padding-bottom: 60px !important; /* Breathing room for iOS home indicator / keyboard bounce */
    }
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* JLS Premium Service Cards (SaaS Style) */
.jls-service-card {
    background: #ffffff !important;
    border: 1px solid #eaeaea !important;
    border-radius: 12px !important;
    padding: 40px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.jls-service-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
    border-color: #c92a2a !important;
}
.jls-service-card .jls-service-card-icon img {
    width: 64px !important;
    height: 64px !important;
    margin-bottom: 24px !important;
}
.jls-service-card .jls-service-card-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 16px !important;
    color: #1a1a1a !important;
}
.jls-service-card .jls-service-card-desc {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: #4a5568 !important;
    margin-bottom: 24px !important;
    flex-grow: 1 !important;
}
.jls-service-card .jls-service-card-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    border-top: 1px solid #eaeaea !important;
    padding-top: 24px !important;
}
.jls-service-card .jls-service-card-features li {
    font-size: 1rem !important;
    color: #2d3748 !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
}
.jls-service-card .jls-service-card-features li::before {
    content: '✓' !important;
    color: #c92a2a !important;
    font-weight: bold !important;
    margin-right: 10px !important;
}
.jls-service-card .jls-service-card-link {
    color: #c92a2a !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: 0.2s ease !important;
    margin-top: auto !important;
}
.jls-service-card .jls-service-card-link:hover {
    color: #a02020 !important;
}
.jls-service-card .jls-service-card-link::after {
    content: '→' !important;
    margin-left: 8px !important;
    transition: transform 0.2s ease !important;
}
.jls-service-card .jls-service-card-link:hover::after {
    transform: translateX(4px) !important;
}
/* Force equal heights for the JLS Service Grid columns */
.wp-block-columns.jls-service-grid {
    align-items: stretch !important;
}
.wp-block-columns.jls-service-grid .wp-block-column {
    display: flex !important;
    align-items: stretch !important;
    flex-direction: column !important;
    height: auto !important;
}

/* Header Component Styles (Migrated from Inline) */
.jls-brand-img {
    height: 50px;
    width: auto;
    vertical-align: middle;
}

.jls-open-modal-btn {
    background: #c92a2a;
    color: white !important;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(201, 42, 42, 0.3);
    display: inline-block;
}

.jls-open-modal-btn:hover {
    background: #a62020;
    transform: translateY(-2px);
}

/* =========================================
   HAMBURGER MENU & MOBILE RESPONSIVE MATRIX
   ========================================= */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text-light);
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
  /* Header Restructuring */
  .site-header {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 15px;
    align-items: center;
  }
  
  /* Reveal Hamburger */
  .menu-toggle {
    display: block;
  }
  
  /* Hide Navigation by Default */
  .main-navigation {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Show redundant links ONLY inside the mobile hamburger */
  .mobile-only {
      display: block !important;
  }
  
  /* Show Navigation on Toggle */
  .main-navigation.toggled {
    display: flex;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Stack Links Vertically */
  .main-navigation ul {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  /* Hamburger X Animation */
  .menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
  .menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Shrink Logo Slightly */
  .jls-brand-img {
    height: 40px;
    object-fit: contain; /* Prevents stretching or cutoff */
  }
  
  /* Make CTA Button Full Width */
  .jls-open-modal-btn {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 15px;
  }
  
  /* Reduce Global Padding */
  .site-content {
    padding: 20px 5%;
  }
  
  /* Stack WordPress Columns Aggressively */
  .wp-block-columns {
    flex-direction: column !important;
  }
  
  .wp-block-column {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 20px !important;
  }
  
  /* Typography Scaling */
  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 1.8rem !important; }
  
  /* Modal Scaling */
  .jls-modal-content {
    padding: 25px 15px;
    width: 95%;
    padding-bottom: 60px !important; /* Breathing room for iOS home indicator / keyboard bounce */
  }

  /* Fix Overlapping Gutenberg Buttons */
  .wp-block-buttons {
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
  }
  
  .wp-block-button, .wp-block-button__link {
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}
