/*
Theme Name: ISRA Engineering Theme
Theme URI: https://israengineering.com
Author: ISRA Engineering (Pvt) Limited
Author URI: https://israengineering.com
Description: A high-precision industrial theme for ISRA Engineering (Pvt) Limited — an ISO 9001:2015 certified auto parts manufacturing and engineering company. Designed with AEO (Answer Engine Optimization) principles for maximum visibility across AI-powered search engines.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: my-custom-theme
Tags: manufacturing, auto-parts, industrial, custom-colors, custom-menu, featured-images
*/

/* ============================================
   CUSTOM CSS VARIABLES
   ============================================ */
:root {
  --color-1: #000000;       /* Black - for contrast/borders */
  --color-2: #F6871E;       /* Orange - primary CTA buttons */
  --color-3: #FFFF80;       /* Yellow - highlights/accents */
  --color-4: #434D59;       /* Steel Grey - primary typography */
  --color-5: #808080;       /* Standard Grey - secondary text */
  --color-white: #FFFFFF;
  --color-bg-light: #F8F9FA;
  --color-border: #E5E7EB;
  --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition-base: all 0.3s ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-4);
  background-color: var(--color-white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-1);
  line-height: 1.3;
  font-weight: 700;
}

a {
  color: var(--color-4);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--color-2);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   CUSTOM BUTTON STYLES
   ============================================ */
.btn-rfq {
  background-color: var(--color-2);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 2px solid var(--color-2);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.btn-rfq:hover {
  background-color: #E0751A;
  border-color: #E0751A;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-4);
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--color-1);
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--color-1);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10000;
  box-shadow: var(--shadow-sm);
}

.site-header .top-bar {
  background-color: var(--color-1);
  color: var(--color-white);
  font-size: 13px;
  padding: 8px 0;
}

.site-header .top-bar a {
  color: var(--color-3);
}

.site-header .top-bar a:hover {
  color: var(--color-2);
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-navigation ul li a {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-4);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-base);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
  color: var(--color-2);
  border-bottom-color: var(--color-2);
}

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-1);
  margin: 5px 0;
  transition: var(--transition-base);
  border-radius: 2px;
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Hamburger animation when active */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-1);
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-base);
}

.site-footer a:hover {
  color: var(--color-2);
}

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   SECTION & CARD STYLES
   ============================================ */
.section-padding {
  padding: 80px 0;
}

.section-padding-sm {
  padding: 48px 0;
}

.card-industrial {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  transition: var(--transition-base);
}

.card-industrial:hover {
  border-color: var(--color-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ============================================
   HIGHLIGHT ACCENT
   ============================================ */
.text-highlight {
  background-color: var(--color-3);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 700;
}

/* ============================================
   SPEC TABLE
   ============================================ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.spec-table th {
  background-color: var(--color-bg-light);
  font-weight: 700;
  color: var(--color-1);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.spec-table tr:hover td {
  background-color: rgba(246, 135, 30, 0.04);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary-color { color: var(--color-4); }
.text-secondary-color { color: var(--color-5); }
.text-cta-color { color: var(--color-2); }
.bg-highlight { background-color: var(--color-3); }

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Desktop Navigation (lg and above) */
@media (min-width: 1025px) {
    .main-navigation ul {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .main-navigation ul li a {
        padding: 8px 0 !important;
        border-bottom: 2px solid transparent !important;
    }
}

/* Mobile Menu - shown when .active class is added */
@media (max-width: 1024px) {
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        padding: 16px 20px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        border-top: 2px solid var(--color-2);
        border-bottom: 1px solid var(--color-border);
        gap: 0;
        z-index: 9999;
        max-height: 80vh;
        overflow-y: auto;
    }

    .main-navigation ul.active {
        display: flex;
    }

    .main-navigation ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation ul li a {
        padding: 16px 12px;
        border-bottom: none;
        display: block;
        font-size: 15px;
        font-weight: 600;
        color: var(--color-1);
    }

    .main-navigation ul li a:hover {
        background-color: #FFF7ED;
        color: var(--color-2);
        padding-left: 20px;
    }
}

/* Table horizontal scroll on mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table-responsive table {
    min-width: 500px;
}

/* Touch-friendly button sizes on mobile */
@media (max-width: 768px) {
    .btn-rfq,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 14px;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .btn-rfq {
        min-height: 48px;
    }

    .btn-secondary {
        min-height: 48px;
    }
}

/* Hero section mobile adjustments */
@media (max-width: 768px) {
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer columns stack on mobile */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Section padding reduction on mobile */
@media (max-width: 768px) {
    .section-padding {
        padding: 48px 0;
    }

    .section-padding-sm {
        padding: 32px 0;
    }
}

/* Typography scaling on mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem; /* 30px */
        line-height: 1.2;
    }

    h2 {
        font-size: 1.5rem; /* 24px */
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem; /* 20px */
    }

    body {
        font-size: 15px;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Card padding reduction on mobile */
@media (max-width: 768px) {
    .card-industrial {
        padding: 20px;
    }
}

/* Top bar mobile adjustments */
@media (max-width: 640px) {
    .site-header .top-bar {
        font-size: 11px;
    }

    .site-header .top-bar .hidden {
        display: none;
    }
}

/* ============================================
   WORDPRESS SPECIFIC OVERRIDES
   ============================================ */
.wp-block-image img {
  border-radius: 8px;
}

.wp-block-quote {
  border-left: 4px solid var(--color-2);
  padding-left: 20px;
  font-style: italic;
  color: var(--color-5);
}

.wp-block-code code {
  background-color: var(--color-bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.entry-content p {
  margin-bottom: 1.5em;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5em;
  padding-left: 24px;
}
