/* ==========================================================================
   snydermetal.com - Unified Style Sheet
   Includes three responsive, premium theme variations:
   1. Theme 1: "Forge & Steel" (Dark Industrial - Welding Orange)
   2. Theme 2: "Industrial Precision" (Clean Slate - Safety Yellow)
   3. Theme 3: "Modernized Classic" (Twenty Seventeen Revamped - Blue/Silver)
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Libre+Franklin:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   1. Theme Definitions (CSS Custom Properties)
   ========================================================================== */

:root {
    --header-height: 80px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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);
    --border-radius: 8px;
}

/* Theme 1: Forge & Steel (Default / Dark Welding Theme) */
body.theme-forge {
    --primary-color: #ff6f00;
    --primary-dark: #d84315;
    --accent-color: #90a4ae;
    --bg-color: #12141c;
    --card-bg: #1e222b;
    --text-color: #f1f3f5;
    --text-secondary: #90a4ae;
    --border-color: #2e3542;
    --hero-overlay: rgba(18, 20, 28, 0.6);
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --btn-text-color: #12141c;
}

/* Theme 2: Industrial Precision (Safety Yellow / Professional Slate) */
body.theme-precision {
    --primary-color: #0f172a;
    --primary-dark: #020617;
    --accent-color: #eab308;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hero-overlay: rgba(15, 23, 42, 0.55);
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --btn-text-color: #0f172a;
}

/* Theme 3: Modernized Classic (Twenty Seventeen Modernized) */
body.theme-classic {
    --primary-color: #1e3a8a;
    --primary-dark: #172554;
    --accent-color: #3b82f6;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-secondary: #475569;
    --border-color: #cbd5e1;
    --hero-overlay: rgba(30, 58, 138, 0.4);
    --font-headings: 'Libre Franklin', sans-serif;
    --font-body: 'Libre Franklin', sans-serif;
    --btn-text-color: #ffffff;
}

/* ==========================================================================
   2. Reset & Core Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-dark);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   3. Header & Navigation Styles
   ========================================================================== */

.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: var(--transition-smooth);
}

body.theme-precision .logo-img {
    filter: grayscale(1) brightness(0.9);
}

body.theme-forge .logo-img {
    filter: drop-shadow(0 0 8px rgba(255, 111, 0, 0.4));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    height: 100%;
    align-items: center;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

body.theme-precision .nav-link:hover, body.theme-precision .nav-item.active .nav-link {
    background-color: rgba(15, 23, 42, 0.05);
}

body.theme-classic .nav-link:hover, body.theme-classic .nav-item.active .nav-link {
    background-color: rgba(30, 58, 138, 0.05);
}

/* Dropdown Sub-menu */
.dropdown-menu {
    position: absolute;
    top: calc(var(--header-height) - 10px);
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    list-style: none;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.dropdown-link:hover {
    background-color: rgba(255, 111, 0, 0.1);
    color: var(--primary-color);
    padding-left: 24px;
}

body.theme-precision .dropdown-link:hover {
    background-color: rgba(234, 179, 8, 0.1);
}

body.theme-classic .dropdown-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================================================
   4. Hero Banner Section
   ========================================================================== */

.hero-banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background-color: #000;
}

.hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.7;
    transition: transform 0.5s ease;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hero-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.theme-classic .hero-title {
    font-size: 44px;
    text-transform: none;
    background: linear-gradient(135deg, #ffffff, #cfd8dc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: #ffffff;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   5. Main Content Layout
   ========================================================================== */

.main-content {
    padding: 60px 0;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    margin-bottom: 40px;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.intro-text p {
    font-size: 17.5px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   6. Custom Buttons & Utilities
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--btn-text-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--btn-text-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   7. Grid & Flex Layout Helpers
   ========================================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ==========================================================================
   8. Specific Page Layouts
   ========================================================================== */

/* Capabilities list and table */
.imBullet {
    list-style: none;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.imBullet li {
    position: relative;
    padding-left: 28px;
    font-size: 16px;
    font-weight: 500;
}

.imBullet li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 18px;
}

.tablepress {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.tablepress td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14.5px;
}

.tablepress tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

body.theme-precision .tablepress tr:nth-child(even) {
    background-color: rgba(15, 23, 42, 0.02);
}

body.theme-classic .tablepress tr:nth-child(even) {
    background-color: rgba(30, 58, 138, 0.02);
}

.tablepress .column-1 {
    font-weight: 700;
    color: var(--primary-color);
    width: 25%;
}

.tablepress .column-2 {
    color: var(--text-color);
}

/* Locations page Map cards */
.location-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.location-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.location-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 20px;
}

.map-container {
    height: 100%;
    min-height: 350px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Gallery Grid System (Modern Lightbox Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom-icon {
    color: #ffffff;
    font-size: 24px;
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transform: scale(0.8);
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-zoom-icon {
    transform: scale(1);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
}

.lightbox-caption {
    color: #ffffff;
    margin-top: 15px;
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.lightbox-nav:hover {
    background: var(--primary-color);
    color: var(--btn-text-color);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { right: 10px; top: 10px; }
}

/* Ordering Form Styles */
.wpforms-form {
    display: grid;
    gap: 20px;
    margin-top: 25px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-field-label {
    display: block;
    font-weight: 600;
    font-size: 14.5px;
    margin-bottom: 6px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.15);
}

/* ==========================================================================
   9. Footer Styles
   ========================================================================== */

.site-footer {
    background-color: var(--primary-dark);
    color: #ffffff;
    padding: 40px 0;
    border-top: 2px solid var(--primary-color);
    transition: var(--transition-smooth);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    font-size: 14px;
    opacity: 0.8;
}

.footer-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}


/* ==========================================================================
   11. Responsive Layout Adaptations
   ========================================================================== */

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .location-card {
        grid-template-columns: 1fr;
    }
    .map-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 70px;
    }
    .menu-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        transition: var(--transition-smooth);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-item {
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        border: none;
        display: none;
    }
    .nav-item.open .dropdown-menu {
        display: block;
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .imBullet {
        grid-template-columns: 1fr;
    }
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .site-footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
