/**
 * Theme Name: My Best Windows & Glass Child
 * Description: Child theme for My Best Windows & Glass website, based on Astra theme
 * Author: My Best Windows & Glass
 * Version: 1.0.0
 * Template: astra
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: best-window-child
 */

/* 
 * Custom styles for My Best Windows & Glass
 * Primary colors: Blue theme (inherited from parent)
 */

/* Base customizations */
:root {
    --bwg-primary: #0066cc;
    --bwg-primary-dark: #0052a3;
    --bwg-primary-light: #3385d6;
    --bwg-secondary: #003d7a;
    --bwg-accent: #00a8ff;
    --bwg-text: #333333;
    --bwg-light-gray: #f5f5f5;
    --bwg-border: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Utility classes */
.bwg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Full width on very large screens */
@media (min-width: 1600px) {
    .bwg-container {
        max-width: 1600px;
    }
}

/* Remove Astra container constraints for our sections */
/* Note: Full-width sections are now handled in media queries below */

.bwg-section {
    padding: 60px 0;
}

.bwg-section-small {
    padding: 40px 0;
}

/* Button styles */
.bwg-button-primary {
    background-color: var(--bwg-primary);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.bwg-button-primary:hover {
    background-color: var(--bwg-primary-dark);
    color: #ffffff;
}

.bwg-button-secondary {
    background-color: transparent;
    color: var(--bwg-primary);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid var(--bwg-primary);
}

.bwg-button-secondary:hover {
    background-color: var(--bwg-primary);
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bwg-section {
        padding: 40px 0;
    }
    
    .bwg-section-small {
        padding: 30px 0;
    }
}

/* Elementor compatibility */
.elementor-page .entry-content {
    max-width: 100% !important;
}

.elementor-page .site-main {
    padding: 0;
}

/* Hide default page title when using Elementor */
.elementor-editor-active .ast-woo-single-page-header,
.elementor-page .ast-woo-single-page-header {
    display: none;
}

/* Clean homepage - hide all default page elements */
.bwg-homepage .ast-page-title,
.bwg-homepage .ast-woo-single-page-header,
.bwg-homepage .entry-header,
.bwg-homepage .ast-breadcrumbs-wrapper,
.bwg-homepage .post-navigation,
.bwg-homepage .comments-area,
.bwg-homepage .entry-meta,
.bwg-homepage .entry-footer {
    display: none !important;
}

/* Remove any padding/margin from Astra containers on homepage */
.bwg-homepage .ast-container,
.bwg-homepage #primary,
.bwg-homepage .site-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Ensure full width on all pages */
body.home .ast-container,
body.page-template-front-page .ast-container,
body.page .ast-container,
body .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Override Astra's site-content wrapper */
.site-content {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Ensure header and navigation also stretch full width */
.site-header,
.main-navigation,
.ast-header-wrapper,
.ast-header-container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Header inner container - keep content contained but header background full width */
.site-header .ast-container,
.main-navigation .ast-container,
.ast-header-container .ast-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

@media (min-width: 1600px) {
    .site-header .ast-container,
    .main-navigation .ast-container,
    .ast-header-container .ast-container {
        max-width: 1600px;
    }
}

/* Hide any article/page content wrapper on homepage */
.bwg-homepage article,
.bwg-homepage .entry-content,
.bwg-homepage .post-content,
.bwg-homepage .page-content {
    display: none !important;
}

/* Fix overflow issues - prevent parent containers from clipping content */
html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure parent containers don't clip full-width sections */
.site-content,
#main,
main.site-main,
.ast-container,
.bwg-homepage .ast-container,
body.page .ast-container,
body.home .ast-container {
    overflow-x: visible !important;
    max-width: 100% !important;
    position: relative;
}

/* Wrapper for homepage to contain full-width sections */
.bwg-homepage-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Wrapper for all pages (contact, about, etc.) */
.bwg-page-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Full-width sections - improved technique */
.bwg-hero-section,
.bwg-promo-banner,
.bwg-section,
.bwg-section-small,
.bwg-product-hero,
.bwg-product-overview,
.bwg-product-gallery,
.bwg-product-features,
.bwg-product-types,
.bwg-product-cta,
.bwg-contact-hero,
.bwg-contact-methods,
.bwg-contact-form-section,
.bwg-contact-map,
.bwg-about-hero,
.bwg-about-story,
.bwg-about-stats,
.bwg-about-team,
.bwg-offerings-hero,
.bwg-offerings-overview,
.bwg-offerings-features,
.bwg-offerings-grid,
.bwg-legal-hero,
.bwg-legal-content,
.bwg-footer,
.bwg-footer-main,
.bwg-footer-bottom {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Break out of container using negative margins */
    margin-left: 0;
    margin-right: 0;
    left: 0;
    right: 0;
}

/* Desktop: Use negative margins to break out of container */
@media (min-width: 769px) {
    .bwg-hero-section,
    .bwg-promo-banner,
    .bwg-section,
    .bwg-section-small,
    .bwg-product-hero,
    .bwg-product-overview,
    .bwg-product-gallery,
    .bwg-product-features,
    .bwg-product-features-improved,
    .bwg-product-types,
    .bwg-product-cta,
    .bwg-contact-hero,
    .bwg-contact-methods,
    .bwg-contact-form-section,
    .bwg-contact-map,
    .bwg-about-hero,
    .bwg-about-story,
    .bwg-about-stats,
    .bwg-about-team,
    .bwg-offerings-hero,
    .bwg-offerings-overview,
    .bwg-offerings-features,
    .bwg-offerings-grid,
    .bwg-legal-hero,
    .bwg-legal-content,
    .bwg-footer,
    .bwg-footer-main,
    .bwg-footer-bottom {
        width: 100vw;
        max-width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
}

/* Mobile: Simpler approach */
@media (max-width: 768px) {
    .bwg-hero-section,
    .bwg-promo-banner,
    .bwg-section,
    .bwg-section-small,
    .bwg-product-hero,
    .bwg-product-overview,
    .bwg-product-gallery,
    .bwg-product-features,
    .bwg-product-features-improved,
    .bwg-product-types,
    .bwg-product-cta,
    .bwg-contact-hero,
    .bwg-contact-methods,
    .bwg-contact-form-section,
    .bwg-contact-map,
    .bwg-about-hero,
    .bwg-about-story,
    .bwg-about-stats,
    .bwg-about-team,
    .bwg-offerings-hero,
    .bwg-offerings-overview,
    .bwg-offerings-features,
    .bwg-offerings-grid,
    .bwg-legal-hero,
    .bwg-legal-content,
    .bwg-footer,
    .bwg-footer-main,
    .bwg-footer-bottom {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* Homepage specific styles */
.bwg-hero-section {
    position: relative;
    overflow: hidden;
}

.bwg-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,128C672,107,768,85,864,90.7C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.bwg-hero-content,
.bwg-hero-form {
    position: relative;
    z-index: 1;
}

/* Form styling improvements */
#quote-form input[type="text"],
#quote-form input[type="tel"],
#quote-form input[type="email"],
#quote-form select {
    transition: border-color 0.3s ease;
}

#quote-form input[type="text"]:focus,
#quote-form input[type="tel"]:focus,
#quote-form input[type="email"]:focus,
#quote-form select:focus {
    outline: none;
    border-color: var(--bwg-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Responsive hero section */
@media (max-width: 968px) {
    .bwg-hero-section > .bwg-container > div {
        grid-template-columns: 1fr !important;
    }
    
    .bwg-hero-content h1 {
        font-size: 36px !important;
    }
    
    .bwg-hero-content p {
        font-size: 18px !important;
    }
}

@media (max-width: 768px) {
    .bwg-hero-section {
        padding: 60px 0 !important;
    }
    
    .bwg-hero-form {
        padding: 30px 20px !important;
    }
    
    #products > .bwg-container > div {
        grid-template-columns: 1fr !important;
    }
}

