/* =========================================
   1. Global Variables & Reset
   ========================================= */
:root {
    --primary-color: #FFC107;
    --secondary-color: #14ae5c;
    --dark-green: #0d7d42;
    --dark-gray: #374151;
    --light-bg: #f8f9fa;
    --transition: all 0.3s ease;
    --font-heading: 'Sora', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-accent: "Teko", sans-serif;
    --card-radius: 24px;
    --input-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    overflow-x: hidden;
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    word-wrap: break-word;
}

/* =========================================
   2. Animations (Scroll & Blur)
   ========================================= */
.scroll-element {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-element.scrolled {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* =========================================
   3. Navigation
   ========================================= */
header {
    position: sticky;
    top: 20px;
    z-index: 1000;
    width: 100%;
}

.navbar {
    background: linear-gradient(135deg, rgba(20, 174, 92, 0.95), rgba(13, 125, 66, 0.95)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.25);
    padding: 10px 20px;
}

.navbar-brand img {
    max-height: 50px;
}

.nav-link {
    font-size: 1.2rem;
    font-weight: 500;
    color: white !important;
    margin: 0 10px;
    transition: var(--transition);
    font-family: var(--font-accent);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Mobile Navbar Fixes */
@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 10px 15px 0 15px;
        margin-top: 0;
    }

    .navbar-collapse {
        background: rgba(13, 125, 66, 0.98);
        border-radius: 0 0 12px 12px;
        padding: 15px;
        margin-top: 10px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
    
    .navbar {
        position: relative; 
    }
}

.NAVBTN, .button, .buttonhero, .custom-submit-btn, .submit-quote-btn {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
    font-family: var(--font-accent);
}

.NAVBTN:hover, .button:hover, .buttonhero:hover, .custom-submit-btn:hover, .submit-quote-btn:hover {
    background-color: transparent;
    color: inherit;
    border-color: currentColor;
    transform: translateY(-2px);
}

nav .NAVBTN:hover { border-color: white; color: white; }
.hero-section .buttonhero:hover { border-color: white; color: white; }

/* =========================================
   4. Hero Sections
   ========================================= */
.hero-section {
    min-height: 100vh;
    background-image: url('media/hero.png');
    background-color: #333;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: -100px;
    padding-top: 140px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.title {
    font-size: clamp(1.5rem, 5vw, 4.5rem);
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 600;
}

.SUBTITLE {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #f1f1f1;
    margin-bottom: 30px;
    font-weight: 300;
    max-width: 600px;
}

/* Product Hero */
.producthero-section {
    height: 60vh;
    background-image: url('media/producthero.png');
    background-color: #222;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: -100px;
    padding-top: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producthero-section h1 {
    color: white;
    z-index: 2;
    font-size: clamp(2.5rem, 6vw, 4rem);
}

/* =========================================
   5. Floating Center Box (Responsive)
   ========================================= */
.center-box {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-radius: 16px;
    color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1.5rem;
    
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%); 
    
    width: 90%;
    max-width: 1100px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.center-box.scroll-element { opacity: 0; transform: translateX(-50%) translateY(30px); }
.center-box.scroll-element.scrolled { opacity: 1; transform: translateX(-50%) translateY(0) !important; filter: blur(0); }

.feature-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.feature-icon img { width: 45px; height: 45px; object-fit: contain; }
.feature-text { font-size: 1.1rem; font-weight: 500; white-space: nowrap; }

/* =========================================
   6. Products
   ========================================= */
.category-filter {
    background: linear-gradient(135deg, #14ae5c, #0d7d42);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(20, 174, 92, 0.2);
}

.category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.category-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Product Cards */
.custom-card {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-radius: 16px;
    border: none;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.image-container {
    background: white;
    height: 200px;
    margin: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-content {
    padding: 0 20px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    color: white;
    text-align: left;
}

.product-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: white;
    line-height: 1.2;
}

.material, .application {
    font-size: 0.95rem;
    color: #e0e0e0;
    margin-bottom: 5px;
    font-family: var(--font-body);
}

.label {
    font-weight: 700;
    color: #FFC107;
    margin-right: 5px;
}

.card-footer-custom {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.stock-badge {
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.request-quote-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Pagination Styles */
.page-btn {
    background: white;
    color: var(--dark-green);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.page-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: var(--dark-green);
}

.page-btn.active {
    background: var(--dark-green);
    color: white;
    border-color: var(--dark-green);
    box-shadow: 0 4px 10px rgba(20, 174, 92, 0.3);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* Search */
.search-input-container {
    background: white;
    border: 2px solid #ddd;
    border-radius: 50px;
    padding: 10px 20px;
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
}
.hero-search-box {
    border: none;
    width: 100%;
    outline: none;
    font-size: 1.1rem;
    padding-left: 10px;
}

/* =========================================
   7. Redesigned Contact Section (Split Layout)
   ========================================= */
.contact-section-modern {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.contact-card-wrapper {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    max-width: 1000px; /* Limit max width to control size */
    margin: 0 auto; /* Center it */
    min-height: 500px; /* Reasonable minimum height */
}

/* Left Side: Image Panel */
.contact-image-panel {
    flex: 1;
    background: linear-gradient(135deg, rgba(20, 174, 92, 0.9), rgba(13, 125, 66, 0.9)), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=800');
    background-size: cover;
    background-position: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    min-width: 300px;
}

.contact-image-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('media/Logo.png') no-repeat center center;
    background-size: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.contact-image-panel h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.contact-image-panel p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 400px;
}

/* Right Side: Form Panel */
.contact-form-panel {
    flex: 1.2; /* Give form slightly more space */
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    min-width: 350px;
}

.contact-form-panel h3 {
    color: var(--dark-gray);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Modern Input Styling */
.modern-input-group {
    margin-bottom: 1rem;
}

.modern-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #555;
    font-size: 0.85rem;
}

.modern-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #f0f0f0;
    border-radius: var(--input-radius);
    background-color: #f8f9fa;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.modern-input:focus {
    background-color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(20, 174, 92, 0.1);
    outline: none;
}

/* Phone Input Group */
.phone-wrapper {
    display: flex;
    gap: 10px;
}

.phone-wrapper select {
    width: 90px;
    flex-shrink: 0;
}

/* Submit Button */
.modern-submit-btn {
    width: 100%;
    background-color: var(--dark-green);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    font-family: var(--font-heading);
}

.modern-submit-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20, 174, 92, 0.2);
}

/* Map Section (Separate) */
.map-section-modern {
    margin-top: 40px;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 400px;
}

.map-section-modern iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* =========================================
   8. Quote Modal
   ========================================= */
.quote-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}

.quote-overlay.active { opacity: 1; visibility: visible; }

.quote-modal {
    background: white;
    width: 90%; max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.quote-overlay.active .quote-modal { transform: scale(1); }

.quote-header {
    background: var(--dark-green);
    color: white;
    padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.close-btn {
    background: rgba(255,255,255,0.2); border: none; color: white;
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer;
}

.quote-body { padding: 30px; }

/* =========================================
   9. Footer
   ========================================= */
footer {
    background: #000;
    color: #ccc;
    padding: 50px 0;
}
footer h5 { color: white; margin-bottom: 20px; }
footer a { color: #ccc; text-decoration: none; transition: 0.3s; }
footer a:hover { color: var(--primary-color); }
.social-icon {
    display: inline-flex; width: 40px; height: 40px;
    background: #222; color: white; border-radius: 50%;
    align-items: center; justify-content: center;
    margin-right: 10px; transition: 0.3s;
}
.social-icon:hover { background: var(--primary-color); color: black; }

/* Messages */
.error-message {
    color: #ffcccc;
    font-size: 0.75rem;
    margin-top: 2px;
    display: none;
}
/* Modern success message style inside form panel */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    display: none; /* HIDDEN BY DEFAULT */
    font-weight: 600;
    border: 1px solid #c3e6cb;
}

/* =========================================
   10. Mobile Responsiveness
   ========================================= */
@media (max-width: 992px) {
    .center-box {
        bottom: -60px;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Navbar Spacing */
    .navbar-brand img { max-height: 40px; }
    
    /* Hero & Typography */
    .hero-section { min-height: 85vh; padding-top: 100px; }
    .title { font-size: 1.5rem; }
    .SUBTITLE { font-size: 1rem; }
    h2 { font-size: 1.8rem; }
    .product-title { font-size: 1.25rem; }
    
    /* Center Box */
    .center-box {
        position: absolute;
        bottom: -40px; 
        left: 50%; 
        transform: translateX(-50%);
        width: 95%;
        flex-wrap: nowrap;
        gap: 5px;
        padding: 1rem 0.5rem;
        justify-content: space-around;
    }
    .center-box.scroll-element.scrolled { transform: translateX(-50%) translateY(0) !important; }
    
    .feature-item { width: auto; flex: 1; }
    .feature-icon img { width: 30px; height: 30px; }
    .feature-text { font-size: 0.8rem; white-space: normal; line-height: 1.2; }
    
    /* Contact Section Mobile (Stacking) */
    .contact-card-wrapper {
        flex-direction: column;
        width: 95%;
        margin: 0 auto;
    }
    
    /* Image Panel on Mobile */
    .contact-image-panel {
        padding: 3rem 2rem;
        min-height: 250px;
        align-items: flex-start;
    }
    
    .contact-image-panel h2 { font-size: 2rem; }
    
    /* Form Panel on Mobile */
    .contact-form-panel {
        padding: 2rem 1.5rem;
        border-radius: 20px 20px 0 0; /* Rounded top overlapping effect */
        margin-top: -20px; /* Pull up over image */
        position: relative;
        z-index: 10;
    }
    
    .contact-form-panel h3 { font-size: 1.5rem; text-align: center; }
    
    /* Map Mobile */
    .map-section-modern {
        height: 300px;
        margin-top: 20px;
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Product Hero */
    .producthero-section h1 { font-size: 2.5rem; }
}

@media (max-width: 480px) {
    .feature-text { font-size: 0.7rem; }
    .contact-form-panel { padding: 1.5rem 1rem; }
    .contact-image-panel { padding: 2rem 1.5rem; }
}