/*
Theme Name: BSB Building Contractors
Theme URI: https://bsbcontractors.co.uk
Author: Luminal Websites
Author URI: https://luminalwebsites.co.uk
Description: Custom WordPress theme for BSB Building Contractors - a professional building company based in Ascot, Berkshire.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bsb-building-contractors
Tags: construction, business, custom-logo, custom-menu, featured-images, full-width-template
*/

/* ============================================================
   THEME CUSTOM PROPERTIES
   ============================================================ */
:root {
    --bsb-primary: #2ea3f2;
    --bsb-dark:    #171717;
    --bsb-gray-bg: #f2f2f2;
    --bsb-font-heading: 'Montserrat', sans-serif;
    --bsb-font-body:    'Open Sans', sans-serif;
}

/* ============================================================
   BASE RESETS
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--bsb-font-body);
    color: var(--bsb-dark);
    background-color: #f3f4f6;
}


a {
    text-decoration: none;
}

/* ============================================================
   WORDPRESS CORE COMPATIBILITY
   ============================================================ */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5rem;
}

.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.alignnone  { float: none; }

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */
.bsb-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bsb-mobile-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   MOBILE MENU PANEL
   ============================================================ */
.bsb-mobile-panel {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.bsb-mobile-panel.is-open {
    transform: translateX(0);
}

/* ============================================================
   GALLERY LIGHTBOX
   ============================================================ */
.bsb-gallery-item {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.bsb-gallery-item:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* ============================================================
   CF7 FORM OVERRIDES (match HTML design)
   ============================================================ */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-textarea {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    border-radius: 0.125rem;
    font-family: var(--bsb-font-body);
    font-size: 1rem;
    color: var(--bsb-dark);
    outline: none;
    transition: box-shadow 0.2s;
}

.wpcf7-form .wpcf7-text:focus,
.wpcf7-form .wpcf7-email:focus,
.wpcf7-form .wpcf7-textarea:focus {
    box-shadow: 0 0 0 2px var(--bsb-primary);
}

.wpcf7-form .wpcf7-textarea {
    resize: none;
    min-height: 140px;
}

.wpcf7-form .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--bsb-primary);
    color: #ffffff;
    font-family: var(--bsb-font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.125rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.2s;
}

.wpcf7-form .wpcf7-submit:hover {
    opacity: 0.9;
}

.wpcf7-form label {
    display: block;
    font-family: var(--bsb-font-heading);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-not-valid-tip {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.wpcf7-response-output {
    border: none !important;
    padding: 0.75rem 1rem !important;
    margin: 1rem 0 0 !important;
    border-radius: 0.125rem;
    font-size: 0.9rem;
}

/* ============================================================
   TESTIMONIAL CARD (CPT single display)
   ============================================================ */
.bsb-testimonial-card {
    background-color: #ffffff;
    padding: 2rem 3rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-radius: 0.125rem;
    position: relative;
}

.bsb-testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.5rem;
    height: 100%;
    background-color: var(--bsb-primary);
    border-radius: 0.125rem 0 0 0.125rem;
}

/* ============================================================
   SERVICE CARD HOVER
   ============================================================ */
.bsb-service-card {
    transition: box-shadow 0.3s ease;
}

.bsb-service-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ============================================================
   PAGE HERO BANNER (inner pages)
   ============================================================ */
.bsb-page-hero {
    position: relative;
    width: 100%;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bsb-page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bsb-page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bsb-page-hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.bsb-page-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #ffffff;
    margin-top: 3rem;
}

.bsb-page-hero-content h1 {
    font-family: var(--bsb-font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.75rem);
    text-transform: uppercase;
    letter-spacing: -0.025em;
    text-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.bsb-accent-bar {
    width: 5rem;
    height: 0.25rem;
    background-color: var(--bsb-primary);
    margin: 1.5rem auto 0;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.bsb-section-heading {
    font-family: var(--bsb-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bsb-dark);
}

/* ============================================================
   UTILITY: PRIMARY BUTTON
   ============================================================ */
.bsb-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--bsb-primary);
    color: #ffffff;
    font-family: var(--bsb-font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.2s;
}

.bsb-btn-primary:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* ============================================================
   CONTENT AREA (page.php / single.php)
   ============================================================ */
.bsb-entry-content {
    font-family: var(--bsb-font-body);
    font-size: 1.125rem;
    color: #374151;
    line-height: 1.75;
}

.bsb-entry-content h2,
.bsb-entry-content h3 {
    font-family: var(--bsb-font-heading);
    font-weight: 700;
    color: var(--bsb-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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