/**
 * 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;
    --nav-bg: transparent;
    --nav-text: #ffffff;
}

/* ============================================
   Base Styles
   ============================================ */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bs-off-white);
    color: var(--bs-charcoal);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

/* ============================================
   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;
    color: white !important;
    border-radius: 0;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #cb7828 !important;
    border-color: #cb7828 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 140, 51, 0.3);
}

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

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

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

.py-32 {
    padding-top: 8rem !important;
    padding-bottom: 8rem !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 {
    opacity: 0;
}

@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 (non-fixed, white, dark text)
   ============================================ */
.wellspace-navbar {
    background-color: var(--nav-bg) !important;
    padding: 1.25rem 0 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wellspace-navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    padding: 0.875rem 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(24, 20, 17, 0.05);
}

.wellspace-navbar .container {
    padding-top: 0;
    padding-bottom: 0;
}

.wellspace-navbar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 2rem;
}

.wellspace-navbar .navbar-nav {
    padding-top: 0;
    padding-bottom: 0;
}

.wellspace-navbar .nav-item {
    margin: 0;
    padding: 0;
}

.wellspace-navbar .nav-link {
    color: var(--nav-text) !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    transition: color 0.3s ease;
}

.wellspace-navbar.scrolled .nav-link {
    color: #181411 !important;
}

.wellspace-navbar .nav-link:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background-color: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.wellspace-navbar .nav-link:hover:after,
.wellspace-navbar .nav-link.active:after {
    transform: scaleX(1);
}

.wellspace-navbar .navbar-brand span,
.wellspace-navbar .navbar-brand i {
    color: var(--nav-text) !important;
}

.wellspace-navbar:not(.scrolled) .navbar-logo {
    filter: brightness(0) invert(1);
}

.wellspace-navbar.scrolled .navbar-brand span,
.wellspace-navbar.scrolled .navbar-brand i {
    color: #181411 !important;
}

.wellspace-navbar.scrolled .navbar-logo {
    filter: none;
}

.wellspace-navbar.scrolled .navbar-brand span,
.wellspace-navbar.scrolled .navbar-brand i {
    color: #181411 !important;
}

.wellspace-navbar .navbar-logo {
    transition: filter 0.4s ease;
    filter: brightness(0) invert(1);
}

.wellspace-navbar.scrolled .navbar-logo {
    filter: none;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.wellspace-navbar.scrolled .navbar-toggler {
    border-color: rgba(24, 20, 17, 0.2);
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.wellspace-navbar.scrolled .navbar-toggler-icon {
    filter: none;
}

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

/* Navbar Mobile Menu */
@media (max-width: 991.98px) {
    .wellspace-navbar {
        padding: 0.5rem 0 !important;
    }

    .wellspace-navbar .navbar-brand span {
        font-size: 1.25rem !important;
    }

    .wellspace-navbar .navbar-collapse {
        background: #ffffff;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 0.25rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

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

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

    .wellspace-navbar .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;
    }
}

/* Typography Extras */
.fw-black {
    font-weight: 900 !important;
}

.service-image-container img:hover {
    transform: scale(1.05);
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(24, 20, 17, 0.2) 100%);
    pointer-events: none;
}

@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 {
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    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;
    }
}
/* Inner Page Header Styles */
.wellspace-navbar.inner-page-header {
    position: relative !important;
    padding: 1rem 0 !important;
    background-color: #ffffff !important;
}

.wellspace-navbar.inner-page-header .nav-link,
.wellspace-navbar.inner-page-header .navbar-brand i,
.wellspace-navbar.inner-page-header .navbar-brand span {
    color: #181411 !important;
}

.wellspace-navbar.inner-page-header .navbar-logo {
    filter: none !important;
}

.wellspace-navbar.inner-page-header .navbar-toggler {
    border-color: rgba(24, 20, 17, 0.2);
}

.wellspace-navbar.inner-page-header .navbar-toggler-icon {
    filter: none;
}

/* Contact Form Control Styles */
.form-control, .form-select {
    border-radius: 0 !important;
    background-color: #f8f7f6 !important;
    border: 1px solid transparent !important;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px rgba(230, 140, 51, 0.1) !important;
    outline: none;
}

/* Placeholder Color */
.form-control::placeholder {
    color: #887563;
    opacity: 0.6;
}

/* Submit Button Hover */
button[type='submit'].btn-primary:active {
    transform: scale(0.98);
}
