/* ============================================
   Apple Oaks Carpentry - Custom Theme CSS
   ============================================ */

/* CSS Variables */
:root {
    --primary-red: #E31E24;
    --dark-red: #B51419;
    --black: #1A1A1A;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
}

/* ============================================
   CONTACT BAR
   ============================================ */

.apple-oaks-contact-bar {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 0.6rem 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 10000;
}

.contact-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.contact-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-bar-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--white);
}

.contact-bar-item a {
    color: var(--white) !important;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.contact-bar-item a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .contact-bar-container {
        justify-content: space-between !important;
        gap: 0.5rem;
        flex-wrap: nowrap;
        padding: 0 1rem;
    }

    .contact-bar-item {
        font-size: 0.8rem;
    }

    .contact-bar-item svg {
        width: 14px;
        height: 14px;
    }
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

/* REMOVE SIDEBAR - Full Width Layout */
.site-content {
    max-width: 100% !important;
    padding: 0 !important;
}

#primary {
    width: 100% !important;
    margin: 0 !important;
}

#secondary,
.sidebar {
    display: none !important;
}

/* Remove margin from .site-main to eliminate white gap */
.separate-containers .site-main {
    margin: 0 !important;
}

/* Hide page title on homepage */
.page-id-8 .entry-header {
    display: none !important;
}

.page-id-8 .entry-title {
    display: none !important;
}

/* Container widths for header/footer only */
.site-header .inside-header,
.site-footer .inside-site-info {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Content sections use their own padding */
.entry-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Typography improvements */
h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Smooth font rendering */
body,
button,
input,
select,
textarea {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--primary-red);
    transition: color 0.3s ease;
}

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

/* Make header black with shadow */
.site-header,
.main-navigation {
    background-color: var(--black) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1) !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Reduce header height on desktop */
.site-header .inside-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Tighter navigation padding */
.main-navigation a {
    padding: 0.6rem 1rem !important;
}

/* Logo/Site Title */
.main-title,
.site-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    line-height: 1.1 !important;
}

.main-title a,
.site-title a {
    color: var(--white) !important;
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    transition: color 0.3s ease;
    line-height: 1.1 !important;
}

.main-title a:hover,
.site-title a:hover {
    color: var(--white) !important;
    text-decoration: none !important;
}

.site-description {
    color: var(--primary-red) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-top: 0.2rem !important;
    display: block !important;
}

/* Navigation Menu */
.main-navigation a,
.main-navigation .menu-toggle {
    color: var(--white) !important;
    padding: 0.65rem 1.2rem !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.main-navigation a:hover,
.main-navigation .sfHover > a {
    color: var(--primary-red) !important;
    background-color: transparent !important;
}

.main-navigation a:hover:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.2rem;
    right: 1.2rem;
    height: 2px;
    background-color: var(--primary-red);
}

/* Current Menu Item */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-parent > a {
    color: var(--primary-red) !important;
}

/* Mobile Menu */
.main-navigation .main-nav ul ul {
    background-color: var(--black) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.menu-toggle {
    background-color: transparent !important;
    border: 2px solid var(--white) !important;
    border-radius: 5px !important;
    padding: 0.5rem 1rem !important;
}

.menu-toggle:hover {
    background-color: var(--primary-red) !important;
    border-color: var(--primary-red) !important;
}

/* Fix hamburger menu positioning on mobile */
@media (max-width: 768px) {
    .site-header .inside-header {
        padding: 0.8rem 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .menu-toggle {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.9rem !important;
        margin: 0 !important;
        line-height: 1 !important;
        min-height: auto !important;
        height: auto !important;
    }

    .menu-toggle .gp-icon {
        width: 18px !important;
        height: 18px !important;
    }

    .main-title,
    .site-branding {
        max-width: calc(100% - 60px) !important;
    }

    /* Make site title smaller on mobile */
    .main-title a,
    .site-title a {
        font-size: 1.3rem !important;
        line-height: 1.1 !important;
    }

    .site-description {
        font-size: 0.85rem !important;
    }

    /* Fix mobile menu item spacing and background */
    .main-navigation .main-nav {
        background-color: var(--black) !important;
    }

    .main-navigation .main-nav ul {
        background-color: var(--black) !important;
    }

    .main-navigation .main-nav ul li {
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-navigation .main-nav ul li a {
        padding: 0.4rem 1rem !important;
        display: block !important;
        margin: 0 !important;
    }

    .main-navigation.toggled .main-nav > ul {
        padding: 0.3rem 0 !important;
        margin: 0 !important;
    }

    .main-navigation .main-nav > ul > li {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.wp-block-button__link,
.button,
.btn,
input[type="submit"],
button[type="submit"],

.wp-block-button__link:hover,
.button:hover,
.btn:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,

/* Secondary/Outline Buttons */
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border: 2px solid var(--primary-red) !important;
    color: var(--primary-red) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--primary-red) !important;
    color: var(--white) !important;
}

/* ============================================
   HEADINGS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    font-weight: 700;
}

.entry-title,
.entry-title a {
    color: var(--black) !important;
}

.entry-title a:hover {
    color: var(--primary-red) !important;
}

/* Section Headers with Red Underline */
.wp-block-heading {
    position: relative;
    padding-bottom: 1rem;
}

h2.wp-block-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-red);
}

h2.wp-block-heading.has-text-align-center:after {
    left: 50%;
    transform: translateX(-50%);
}

/* ============================================
   HOMEPAGE SECTIONS
   ============================================ */

/* Remove default WordPress spacing/borders */
.entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.entry-content > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wp-block-separator {
    display: none !important;
}

/* Remove any gap between header and hero */
.site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.inside-article {
    padding-top: 0 !important;
}

.page-id-8 .inside-article {
    padding-top: 0 !important;
}

.page-id-8 .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.page-id-8 .entry-header {
    margin-bottom: 0 !important;
}

/* Hero Section - Black to Red Gradient - FULL WIDTH */
.hero-section,
.page-id-8 .entry-content > .wp-block-group:first-child {
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-red) 100%) !important;
    padding: 6rem 2rem !important;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
}

/* Hero Container - Two Column Layout */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    justify-content: space-between;
}

/* Hero Content - Left Side */
.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    color: var(--white) !important;
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
}

.hero-content p {
    color: var(--light-gray) !important;
    font-size: 1.4rem !important;
    margin-bottom: 2.5rem !important;
    line-height: 1.6 !important;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.hero-btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
    cursor: pointer;
}

.hero-btn-primary:hover {
    background-color: var(--dark-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.3);
    cursor: pointer;
}

.hero-btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.hero-btn-outline:hover {
    background-color: var(--white);
    color: var(--black);
}

/* Hero Form Card - Right Side */
.hero-form-card {
    flex: 0 0 450px;
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-form-card h3 {
    color: var(--black) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    text-align: center;
}

/* Hero Form Fields */
.hero-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-form-field {
    width: 100%;
    margin-bottom: 0.5rem;
}

.hero-form-field input,
.hero-form-field textarea,
.hero-form-field select {
    width: 100% !important;
    border: 2px solid var(--medium-gray) !important;
    border-radius: 6px !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease !important;
    background-color: var(--white) !important;
    color: var(--text-dark) !important;
    box-sizing: border-box !important;
}

.hero-form-field input::placeholder,
.hero-form-field textarea::placeholder {
    color: var(--text-light) !important;
}

.hero-form-field input:focus,
.hero-form-field textarea:focus,
.hero-form-field select:focus {
    border-color: var(--primary-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1) !important;
}

.hero-form-field select {
    cursor: pointer !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    height: auto !important;
    padding-right: 1rem !important;
}

.hero-form-field textarea {
    resize: vertical !important;
    min-height: 100px !important;
    line-height: 1.6 !important;
}

.hero-submit-btn {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 0.5rem;
}

.hero-submit-btn:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.3);
}

.hero-submit-btn:active {
    transform: translateY(0);
}

/* Responsive Hero */
@media (max-width: 968px) {
    .hero-section,
    .page-id-8 .entry-content > .wp-block-group:first-child {
        padding: 2.5rem 0.5rem 2.5rem 0.5rem !important;
    }

    .hero-section .wp-block-group__inner-container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .hero-container {
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1.5rem !important;
    }

    .hero-content h1 {
        font-size: 2.3rem !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
    }

    .hero-content p {
        font-size: 1.1rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.6 !important;
    }

    .hero-buttons {
        justify-content: center !important;
        margin-bottom: 1rem !important;
    }

    .hero-form-card {
        flex: 0 0 auto !important;
        width: calc(100% - 1rem) !important;
        max-width: 100% !important;
        margin: 0 0.5rem !important;
        padding: 2rem 1.5rem !important;
        box-sizing: border-box !important;
    }
}

/* Old hero styles for backward compatibility */
.hero-section .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Only make the main hero h1 white, not all headings */
.hero-section .hero-content h1,
.hero-section .hero-content .wp-block-heading {
    color: var(--white) !important;
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
}

.hero-section .wp-block-buttons {
    gap: 1rem !important;
}

.hero-section .wp-block-button__link {
    padding: 1.2rem 3rem !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

/* Services Section - White Background - FULL WIDTH */
.services-section {
    background-color: var(--white) !important;
    padding: 6rem 2rem !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Center services content */
.services-section > div,
.services-section .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.services-section h2 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
}

.services-section p {
    font-size: 1.2rem !important;
    color: var(--text-light) !important;
}

/* Services Grid Layout - IMPROVED FOR EQUAL HEIGHTS */
.services-grid,
.services-section .wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin-bottom: 2rem !important;
}

.services-grid .wp-block-column,
.services-section .wp-block-column {
    flex-basis: auto !important;
    margin: 0 !important;
}

/* Service Cards - IMPROVED STRUCTURE */
.service-card,
.gb-grid-column,
.services-section .wp-block-column > div {
    background-color: var(--white) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.service-card:hover,
.gb-grid-column:hover,
.services-section .wp-block-column > div:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px rgba(227, 30, 36, 0.15) !important;
    border-color: var(--primary-red) !important;
}

/* Service Card Images - NO PADDING, FULL WIDTH */
.service-card img,
.gb-grid-column img,
.services-section .wp-block-column img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    margin: 0 !important;
    transition: transform 0.4s ease !important;
}

.service-card:hover img,
.gb-grid-column:hover img,
.services-section .wp-block-column:hover img {
    transform: scale(1.05) !important;
}

/* Service Card Content - PROPER PADDING */
.service-card > *:not(img),
.service-card .wp-block-group,
.gb-grid-column > *:not(img),
.services-section .wp-block-column > div > *:not(img) {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.service-card > :first-child:not(img),
.gb-grid-column > :first-child:not(img) {
    padding-top: 2rem !important;
}

.service-card > :last-child,
.gb-grid-column > :last-child {
    padding-bottom: 2rem !important;
}

/* Service Card Headings - BETTER SPACING */
.service-card h3,
.gb-grid-column h3,
.services-section .wp-block-column h3 {
    color: var(--black) !important;
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    margin-top: 2rem !important;
    font-weight: 700 !important;
}

/* If image is first, reduce top margin on heading */
.service-card img + h3,
.service-card img ~ * h3,
.gb-grid-column img + h3,
.services-section .wp-block-column img ~ h3 {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}

.service-card p,
.gb-grid-column p,
.services-section .wp-block-column p {
    color: var(--text-light) !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
    margin-bottom: 0 !important;
}

.service-icon {
    color: var(--primary-red) !important;
    margin-bottom: 1.5rem !important;
    font-size: 3rem !important;
}

/* Responsive - Stack on mobile */
@media (max-width: 968px) {
    .services-grid,
    .services-section .wp-block-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    /* Full width service cards on mobile */
    .services-section {
        padding: 3rem 0 !important;
    }

    .services-section > div,
    .services-section .wp-block-group__inner-container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .services-grid,
    .services-section .wp-block-columns {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .services-grid .wp-block-column {
        margin-bottom: 0 !important;
    }

    /* Remove border radius on mobile for full width effect */
    .service-card,
    .gb-grid-column,
    .services-section .wp-block-column > div {
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Keep images full width with no radius on mobile */
    .service-card img,
    .gb-grid-column img,
    .services-section .wp-block-column img {
        border-radius: 0 !important;
    }
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

/* Black background for testimonials - FULL WIDTH */
.testimonials-section {
    background-color: var(--black) !important;
    color: var(--white) !important;
    padding: 6rem 2rem !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Center testimonials content */
.testimonials-section > div,
.testimonials-section .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.testimonials-section h2 {
    color: var(--white) !important;
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
}

.testimonials-section h2:after {
    background-color: var(--primary-red) !important;
}

.testimonials-section > div > p {
    color: var(--light-gray) !important;
    font-size: 1.2rem !important;
    margin-bottom: 3rem !important;
}

/* Quote Blocks Styling */
.testimonials-section .wp-block-quote {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left: 4px solid var(--primary-red) !important;
    border-radius: 12px !important;
    padding: 2.5rem !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.testimonials-section .wp-block-quote:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.testimonials-section .wp-block-quote p {
    color: var(--light-gray) !important;
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 1.5rem !important;
}

.testimonials-section .wp-block-quote cite {
    color: var(--white) !important;
    font-style: normal !important;
    display: block;
    margin-top: 1rem;
}

.testimonials-section .wp-block-quote cite strong {
    color: var(--white) !important;
    font-size: 1.1rem;
}

/* Star ratings in testimonials */
.testimonials-section .wp-block-quote p:first-child {
    color: var(--primary-red) !important;
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: 2px;
}

/* Testimonials columns */
.testimonials-section .wp-block-columns {
    gap: 2rem !important;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

/* Gallery preview section - White background */
.gallery-section {
    background-color: var(--white) !important;
    padding: 6rem 2rem !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Center gallery content */
.gallery-section > div,
.gallery-section .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-section h2 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
    color: var(--black) !important;
}

.gallery-section h2:after {
    background-color: var(--primary-red) !important;
}

.gallery-section > div > p {
    color: var(--text-light) !important;
    font-size: 1.2rem !important;
    margin-bottom: 3rem !important;
}

/* Gallery grid styling */
.gallery-preview {
    gap: 1.5rem !important;
    margin-bottom: 0 !important;
}

.gallery-preview .wp-block-image {
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s ease !important;
}

.gallery-preview .wp-block-image:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 12px 40px rgba(227, 30, 36, 0.2) !important;
}

.gallery-preview .wp-block-image img {
    border-radius: 12px !important;
    transition: transform 0.4s ease !important;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

.gallery-preview .wp-block-image:hover img {
    transform: scale(1.05) !important;
}

/* Gallery view button */
.gallery-section .wp-block-buttons {
    margin-top: 3rem !important;
}

/* General gallery items (for full gallery page) */
.wp-block-gallery .wp-block-image img {
    border-radius: 10px !important;
    transition: transform 0.3s ease !important;
}

.wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.05) !important;
}

/* Gallery Items Hover Overlay */
.gallery-item {
    position: relative;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.gallery-item:hover {
    box-shadow: 0 10px 30px rgba(227, 30, 36, 0.3) !important;
}

/* Responsive gallery */
@media (max-width: 768px) {
    .gallery-section {
        padding: 4rem 1.5rem !important;
    }

    .gallery-preview {
        gap: 1rem !important;
    }
}

/* ============================================
   FORMS
   ============================================ */

/* Contact Form - Same Style as Hero Form */
.contact-form-wrapper {
    background-color: transparent !important;
    padding: 0 !important;
}

.contact-form,
.apple-oaks-contact-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    width: 100% !important;
}

.contact-form-field {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
}

.contact-form-field input,
.contact-form-field textarea,
.contact-form-field select {
    width: 100% !important;
    border: 2px solid var(--medium-gray) !important;
    border-radius: 6px !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease !important;
    background-color: var(--white) !important;
    color: var(--text-dark) !important;
    box-sizing: border-box !important;
}

.contact-form-field input::placeholder,
.contact-form-field textarea::placeholder {
    color: var(--text-light) !important;
}

.contact-form-field input:focus,
.contact-form-field textarea:focus,
.contact-form-field select:focus {
    border-color: var(--primary-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1) !important;
}

.contact-form-field select {
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    padding-right: 3rem !important;
}

.contact-form-field textarea {
    resize: vertical !important;
    min-height: 100px !important;
    line-height: 1.6 !important;
}

.contact-submit-btn {
    width: 100% !important;
    background-color: var(--primary-red) !important;
    color: var(--white) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 1rem 2rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    margin-top: 0.5rem !important;
}

.contact-submit-btn:hover {
    background-color: var(--dark-red) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.3) !important;
}

.contact-submit-btn:active {
    transform: translateY(0) !important;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background-color: var(--black) !important;
    color: var(--white) !important;
    padding: 2.5rem 0 1rem !important;
}

.site-footer .inside-site-info {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

.site-footer .copyright-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.site-footer .copyright {
    color: var(--light-gray) !important;
    font-size: 0.9rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: var(--light-gray) !important;
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: var(--primary-red) !important;
}

/* Clean up footer - hide GeneratePress credit and bullet */
.site-footer .copyright-bar {
    text-align: center !important;
    padding: 1.5rem 0 !important;
}

.site-footer .copyright {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem !important;
    display: inline-block !important;
}

/* Hide bullet and GeneratePress link */
.site-footer .copyright-bar a[href*="generatepress"],
.site-footer .copyright-bar a[href*="generatepress"] + * {
    display: none !important;
}

/* Hide text nodes (bullets) between elements */
.site-footer .copyright-bar {
    font-size: 0 !important;
}

.site-footer .copyright-bar > * {
    font-size: 0.9rem !important;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem !important;
    }

    .site-footer .inside-site-info {
        padding: 0 1rem !important;
    }

    .site-footer .copyright {
        font-size: 0.85rem;
    }
}

/* ============================================
   BLOG/POSTS
   ============================================ */

.entry-meta,
.entry-meta a {
    color: var(--text-light) !important;
}

.entry-meta a:hover {
    color: var(--primary-red) !important;
}

/* Post Categories/Tags */
.cat-links a,
.tags-links a {
    background-color: var(--light-gray);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 3px;
    text-decoration: none;
}

.cat-links a:hover,
.tags-links a:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */

.widget {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.widget-title {
    color: var(--black) !important;
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.widget ul li::before {
    content: '▸';
    color: var(--primary-red);
    position: absolute;
    left: 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .hero-section,
    .page-id-8 .entry-content > .wp-block-group:first-child {
        padding: 0.5rem 0.25rem 2rem 0.25rem !important;
    }

    .services-section {
        padding: 3rem 1rem !important;
    }

    .testimonials-section {
        padding: 3rem 1rem !important;
    }

    .gallery-section {
        padding: 3rem 1rem !important;
    }

    .contact-section {
        padding: 3rem 0.5rem !important;
    }

    /* Full width contact section columns on mobile */
    .contact-section .wp-block-columns {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .contact-section .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 2rem 1.5rem !important;
    }

    .contact-section > div,
    .contact-section .wp-block-group__inner-container {
        padding: 0 0.5rem !important;
    }
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
    background-color: var(--light-gray) !important;
    padding: 6rem 0 !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Center contact content */
.contact-section > div,
.contact-section .wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-section h2 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem !important;
}

.contact-section h3 {
    color: var(--black) !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.75rem !important;
}

.contact-section h4 {
    color: var(--black) !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

.contact-section .wp-block-columns {
    gap: 3rem !important;
}

.contact-section .wp-block-column {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.contact-section a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-section a:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

.contact-section ul {
    list-style: none;
    padding: 0;
}

.contact-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.contact-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   FOOGALLERY - MASONRY GALLERY WITH LIGHTBOX
   ============================================ */

/* FooGallery Container */
.foogallery {
    margin: 2rem 0 !important;
}

/* Masonry Gallery Items */
.foogallery.fg-masonry .fg-item {
    margin-bottom: 20px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.foogallery.fg-masonry .fg-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px rgba(227, 30, 36, 0.15) !important;
}

/* Gallery Images */
.foogallery .fg-item img,
.foogallery .fg-thumb img {
    border-radius: 12px !important;
    transition: transform 0.4s ease !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.foogallery .fg-item:hover img {
    transform: scale(1.05) !important;
}

/* Image Overlay on Hover */
.foogallery .fg-item a {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

.foogallery .fg-item a::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.7), rgba(26, 26, 26, 0.7)) !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease !important;
    pointer-events: none !important;
    border-radius: 12px !important;
}

.foogallery .fg-item a:hover::after {
    opacity: 1 !important;
}

/* Add zoom icon on hover */
.foogallery .fg-item a::before {
    content: '\1F50D' !important; /* 🔍 magnifying glass emoji */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    font-size: 3rem !important;
    color: var(--white) !important;
    z-index: 2 !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none !important;
}

.foogallery .fg-item a:hover::before {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
}

/* FooGallery Lightbox Styling */
.foogallery-container.fg-lightbox {
    background-color: rgba(26, 26, 26, 0.95) !important;
}

/* Lightbox Navigation Arrows */
.foogallery-container .fg-navigation .fg-prev,
.foogallery-container .fg-navigation .fg-next {
    background-color: var(--primary-red) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    transition: all 0.3s ease !important;
}

.foogallery-container .fg-navigation .fg-prev:hover,
.foogallery-container .fg-navigation .fg-next:hover {
    background-color: var(--dark-red) !important;
    transform: scale(1.1) !important;
}

/* Lightbox Close Button */
.foogallery-container .fg-close {
    background-color: var(--primary-red) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.foogallery-container .fg-close:hover {
    background-color: var(--dark-red) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

/* Gallery Loading Animation */
.foogallery .fg-loader {
    border-color: var(--primary-red) !important;
    border-top-color: transparent !important;
}

/* Responsive Masonry */
@media (max-width: 768px) {
    .foogallery.fg-masonry .fg-item {
        margin-bottom: 15px !important;
    }

    .foogallery .fg-item a::before {
        font-size: 2rem !important;
    }
}

/* ============================================
   SMOOTH SCROLLING
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* Scroll padding for anchor links (accounts for sticky header) */
html {
    scroll-padding-top: 100px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-red {
    color: var(--primary-red) !important;
}

.bg-red {
    background-color: var(--primary-red) !important;
}

.bg-black {
    background-color: var(--black) !important;
}

.bg-light-gray {
    background-color: var(--light-gray) !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   MOBILE RESPONSIVE - HERO BUTTONS
   ============================================ */

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* ============================================
   CONTACT FORM 7 CUSTOMIZATION
   ============================================ */

/* Reduce textarea height */
.wpcf7-form textarea {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 200px;
    resize: vertical;
}

/* Select dropdown styling */
.wpcf7-form select {
    color: #666666 !important;
    font-weight: normal !important;
}

/* Submit button - full width and solid */
.wpcf7-form .wpcf7-submit {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: var(--primary-red) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 1rem 2rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.wpcf7-form .wpcf7-submit:hover {
    background-color: var(--dark-red) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.3);
    cursor: pointer !important;
}

/* Ensure submit button container doesn't restrict width */
.wpcf7-form .wpcf7-form-control-wrap {
    width: 100% !important;
}

.wpcf7-form p {
    width: 100% !important;
}

/* Contact Form 7 validation messages */
.wpcf7-not-valid-tip {
    color: #dc3232 !important;
    font-size: 0.9rem !important;
    display: block !important;
    text-align: left !important;
    margin-top: 0.25rem !important;
    padding: 0.25rem 0 !important;
}

.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
    border: 2px solid #dc3232 !important;
    background-color: #fef7f7 !important;
    color: #dc3232 !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border-radius: 6px !important;
    text-align: left !important;
}

/* Mobile form styling */
@media (max-width: 768px) {
    /* Left align all form elements */
    .wpcf7-form input,
    .wpcf7-form textarea,
    .wpcf7-form select {
        text-align: left !important;
    }

    /* Fix select dropdown styling on mobile */
    .wpcf7-form select {
        font-weight: normal !important;
        text-align: left !important;
        padding-left: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
        color: #666666 !important;
    }

    /* Full width button on mobile */
    .wpcf7-form .wpcf7-submit {
        max-width: 100%;
        width: 100%;
        text-align: center !important;
    }

    /* Reduce textarea height on mobile */
    .wpcf7-form textarea {
        height: 100px !important;
        min-height: 100px !important;
    }

    /* Left align Why Choose list items on mobile */
    .contact-info ul,
    .contact-info li {
        text-align: left !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    /* Ensure checkmark/bullet stays left */
    .contact-info ul {
        list-style-position: inside !important;
    }

    /* Full width contact boxes on mobile */
    .contact-section .wp-block-columns {
        flex-direction: column !important;
    }

    .contact-section .wp-block-column {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
    }

    .contact-info,
    .contact-form-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   FOOTER STYLING
   ============================================ */

/* Footer wrapper and footer element - single black bar */
.site-footer {
    background-color: var(--black) !important;
    color: var(--white) !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
}

/* Remove spacing before footer */
.site-content,
#page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove all gaps before footer */
main,
#main,
.site-main,
.entry,
article {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove gaps from last child before footer */
.site > *:not(.site-footer),
#page > *:not(.site-footer) {
    margin-bottom: 0 !important;
}

/* Ensure footer has no top margin */
.site-footer,
.site-footer .site-info {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.site-info {
    background-color: var(--black) !important;
    color: var(--white) !important;
    padding: 2rem 0 !important;
    margin: 0 !important;
}

.inside-site-info {
    background-color: transparent !important;
}

/* Footer navigation menu */
.footer-nav {
    text-align: left;
    margin: 0;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav ul li {
    margin: 0;
}

.footer-nav ul li a {
    color: var(--white) !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    display: inline-block;
}

.footer-nav ul li a:hover,
.footer-nav ul li a.current {
    color: var(--primary-red) !important;
    border-bottom-color: var(--primary-red) !important;
}

/* Copyright bar styling - Desktop: left/right layout */
.site-info .inside-site-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-nav {
    margin: 0 !important;
}

.site-info .copyright-bar {
    text-align: right;
    color: var(--white) !important;
    padding: 0;
    margin: 0;
    border: none;
    width: auto;
}

.site-info .copyright-bar span,
.site-info .copyright-bar a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
}

.site-info .copyright-bar a:hover {
    color: var(--primary-red) !important;
}

/* Mobile footer */
@media (max-width: 768px) {
    /* Stack footer items vertically on mobile */
    .site-info .inside-site-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
    }

    .footer-nav {
        margin-bottom: 2rem !important;
        text-align: left;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .site-info {
        padding: 1.5rem 0 !important;
    }

    /* Left align copyright on mobile */
    .site-info .copyright-bar {
        text-align: left !important;
        width: 100%;
        display: block;
        margin-top: 0 !important;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ============================================
   BACK TO TOP BUTTON (Mobile Only)
   ============================================ */

.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    display: none;
}

.back-to-top-btn:hover {
    background-color: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top-btn:active {
    transform: translateY(-1px);
}

/* Hide on desktop - mobile only */
@media (min-width: 769px) {
    .back-to-top-btn {
        display: none !important;
    }
}
