/**
 * Wellspace Theme Custom Styles
 * Bootstrap 5 Customizations and Theme-Specific Styles
 */

/* ============================================
   CSS Variables (Custom Colors)
   ============================================ */
:root {
    --bs-primary: #e68c33;
    --bs-primary-rgb: 230, 140, 51;
    --bs-charcoal: #181411;
    --bs-off-white: #f8f7f6;
    --bs-accent: #887563;
}

/* ============================================
   Base Styles
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f7f6;
    color: #181411;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ============================================
   Custom Color Classes
   ============================================ */
.bg-primary {
    background-color: #e68c33 !important;
}

.text-primary {
    color: #e68c33 !important;
}

.bg-charcoal {
    background-color: #181411 !important;
}

.text-charcoal {
    color: #181411 !important;
}

.bg-off-white {
    background-color: #f8f7f6 !important;
}

.text-accent {
    color: #887563 !important;
}

.border-primary {
    border-color: #e68c33 !important;
}

/* ============================================
   Button Customizations
   ============================================ */
.btn-primary {
    background-color: #e68c33 !important;
    border-color: #e68c33 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #d17a1f !important;
    border-color: #d17a1f !important;
}

.btn-charcoal {
    background-color: #181411 !important;
    border-color: #181411 !important;
    color: white !important;
}

.btn-charcoal:hover,
.btn-charcoal:focus {
    background-color: #e68c33 !important;
    border-color: #e68c33 !important;
    color: white !important;
}

/* ============================================
   Custom Spacing Utilities
   ============================================ */
.py-24 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.px-6 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.gap-16 {
    gap: 4rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-2 {
    gap: 0.5rem;
}

/* Vertical Spacing Between Children */
.space-y-8 > * + * {
    margin-top: 2rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

/* ============================================
   Aspect Ratio Utilities
   ============================================ */
.aspect-4-5 {
    aspect-ratio: 4/5;
}

.aspect-3-4 {
    aspect-ratio: 3/4;
}

.aspect-video {
    aspect-ratio: 16/9;
}

.aspect-square {
    aspect-ratio: 1/1;
}

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

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slideIn {
    animation: slideIn 0.8s ease-out forwards;
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Navbar Styles
   ============================================ */
.navbar {
    transition: all 0.3s ease;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Navbar Mobile Menu */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.75rem 0 !important;
    }
    
    .navbar-brand span {
        font-size: 1.25rem !important;
    }
    
    .navbar-collapse {
        background: white;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 0.25rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .navbar-collapse .nav-link {
        color: #181411 !important;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar-collapse .nav-link.text-primary {
        color: #e68c33 !important;
    }

    .navbar-collapse .btn-primary {
        margin-top: 1rem;
        width: 100%;
    }
}

/* ============================================
   Scrollbar Utilities
   ============================================ */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   Section Styles
   ============================================ */
section {
    width: 100%;
    display: block;
}

/* ============================================
   Image Styles
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Link Styles
   ============================================ */
a {
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* ============================================
   Form Styles
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
}

/* ============================================
   WordPress Core Styles
   ============================================ */
.wp-caption {
    max-width: 100%;
}

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

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

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

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}

/* ============================================
   Responsive Typography
   ============================================ */
/* Hero Heading */
.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Section Headings */
.section-heading {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-heading-large {
    font-size: 3.75rem;
    font-weight: 900;
    line-height: 1.2;
}

.section-heading-medium {
    font-size: 2.25rem;
    font-weight: 900;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
}

/* Body Text */
.body-text-large {
    font-size: 1.125rem;
    line-height: 1.75;
}

/* Mobile Responsive Typography */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-heading {
        font-size: 1.375rem;
        line-height: 1.3;
        max-width: 100%;
    }
    
    .section-heading-large {
        font-size: 1.5rem;
        line-height: 1.3;
        max-width: 100%;
    }
    
    .section-heading-medium {
        font-size: 1.25rem;
        line-height: 1.3;
        max-width: 100%;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .body-text-large {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto;
        max-width: 100% !important;
    }
    
    .section-heading-large {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto;
        max-width: 100% !important;
    }
    
    .section-heading-medium {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Extra small mobile - titles smaller on narrow screens */
@media (max-width: 399px) {
    .section-heading {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    
    .section-heading-large {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
    }
    
    .section-heading-medium {
        font-size: 0.9375rem !important;
    }
}

/* ============================================
   Responsive Spacing
   ============================================ */
@media (max-width: 991.98px) {
    .py-24 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .mb-8 {
        margin-bottom: 1.5rem;
    }
    
    .mb-12 {
        margin-bottom: 2rem;
    }
    
    .mb-16 {
        margin-bottom: 2.5rem;
    }
}

/* ============================================
   Prevent Horizontal Scroll
   ============================================ */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100%;
}

.container,
.container-fluid {
    max-width: 100% !important;
    overflow-x: hidden;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

section {
    max-width: 100% !important;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   Mobile-Specific Fixes
   ============================================ */
@media (max-width: 767.98px) {
    /* Hero Section Mobile */
    .hero-section {
        min-height: 80vh !important;
        padding: 2rem 0;
    }
    
    /* Services Grid - Stack on Mobile */
    .service-card {
        flex-direction: column !important;
    }
    
    .service-card .service-image {
        width: 100% !important;
        min-height: 250px !important;
        flex: 0 0 auto !important;
    }
    
    .service-card .service-content {
        width: 100% !important;
        flex: 1 1 auto !important;
    }
    
    /* Fix Bootstrap column classes inside service cards */
    .service-card .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* About Section - Stack Image */
    .about-quote-box {
        position: static !important;
        margin-top: 2rem;
        max-width: 100% !important;
    }
    
    /* Stats Section - Adjust Padding */
    .stats-section .col-6 {
        padding-top: 0 !important;
    }
    
    /* Projects Grid - Full Width on Mobile */
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    /* Buttons - Full Width on Mobile */
    .btn-mobile-full {
        width: 100%;
    }
    
    /* Text Alignment */
    .text-center-mobile {
        text-align: center;
    }
    
    /* Remove Negative Margins on Mobile */
    .no-negative-margin-mobile {
        margin-left: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* ============================================
   Tablet Adjustments
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-heading {
        font-size: 2.5rem;
    }
    
    .section-heading-large {
        font-size: 3rem;
    }
}
