/* ===================================
   Capital Stoneworks - Page-Specific Styles
   Light Theme with Dark Widget Accents
   =================================== */

/* ===== BEFORE/AFTER SLIDER ===== */
.ba-slider {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: ew-resize;
    user-select: none;
}

.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-slider .ba-before {
    z-index: 1;
}

.ba-slider .ba-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.ba-slider .ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--color-white);
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ba-slider .ba-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ba-slider .ba-handle::after {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--color-black);
    letter-spacing: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.ba-slider .ba-label {
    position: absolute;
    bottom: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 4;
    border-radius: 4px;
}

.ba-slider .ba-label-before {
    left: 20px;
}

.ba-slider .ba-label-after {
    right: 20px;
}

@media (max-width: 768px) {
    .ba-slider {
        height: 300px;
    }

    .ba-slider .ba-handle::before {
        width: 40px;
        height: 40px;
    }

    .ba-slider .ba-handle::after {
        font-size: 10px;
    }
}

/* ===== MODERN CONTACT FORM ===== */
.modern-form {
    border-radius: 16px;
    padding: 40px;
}

.modern-form .form-header {
    margin-bottom: 30px;
    text-align: center;
}

.modern-form .form-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modern-form .form-header p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Floating labels */
.form-group.floating {
    position: relative;
    margin-bottom: 25px;
}

.form-group.floating input,
.form-group.floating textarea {
    padding: 20px 16px 8px;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-group.floating label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--color-gray);
    pointer-events: none;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

.form-group.floating textarea + label {
    top: 20px;
    transform: none;
}

.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label,
.form-group.floating textarea:focus + label,
.form-group.floating textarea:not(:placeholder-shown) + label {
    top: 8px;
    transform: none;
    font-size: 0.7rem;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group.floating input:focus,
.form-group.floating textarea:focus {
    box-shadow: 0 0 0 3px rgba(184, 149, 63, 0.15);
}

/* Modern select styling */
.modern-form select {
    padding: 16px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.modern-form select:focus {
    box-shadow: 0 0 0 3px rgba(184, 149, 63, 0.15);
}

/* Modern submit button */
.modern-form .submit-btn {
    width: 100%;
    padding: 18px 32px;
    font-size: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.modern-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 149, 63, 0.35);
}

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

.modern-form .submit-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.modern-form .form-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-gray);
    margin-top: 15px;
}

/* Success state */
.modern-form .form-success {
    text-align: center;
    padding: 40px 20px;
}

.modern-form .form-success svg {
    color: #4CAF50;
    margin-bottom: 20px;
}

.modern-form .form-success h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-black);
}

.modern-form .form-success p {
    color: var(--color-gray);
}

/* ===== DARK WIDGET ACCENT CLASS ===== */
/* Use this for small dark accent components only */
.widget-dark {
    background: #0f0f10;
    color: #fff;
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.widget-dark h2,
.widget-dark h3,
.widget-dark h4,
.widget-dark h5 {
    color: var(--color-white);
}

.widget-dark p,
.widget-dark span,
.widget-dark li {
    color: rgba(255, 255, 255, 0.8);
}

.widget-dark .stat-number {
    color: var(--color-gold);
}

.widget-dark .stat-label {
    color: rgba(255, 255, 255, 0.7);
}

/* Testimonial widget dark variant */
.widget-dark.testimonials-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.widget-dark .testimonial-quote {
    color: rgba(255, 255, 255, 0.9);
}

/* Contact info widget dark variant */
.widget-dark.contact-info {
    border-radius: 14px;
}

.widget-dark .contact-item-content h4 {
    color: var(--color-white);
}

.widget-dark .contact-item-content p,
.widget-dark .contact-item-content a {
    color: rgba(255, 255, 255, 0.7);
}

.widget-dark .contact-item-content a:hover {
    color: var(--color-gold);
}

.widget-dark .contact-social-links a {
    border-color: rgba(255, 255, 255, 0.2);
}

.widget-dark .contact-social-links svg {
    fill: var(--color-white);
}

.widget-dark .contact-social-links a:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.widget-dark .contact-social-links a:hover svg {
    fill: var(--color-black);
}

/* ===== Page Headers ===== */
.page-header {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--color-black);
    padding-top: 100px;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.9) 100%
    );
    z-index: 2;
}

.page-header-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.page-header-content .section-label {
    margin-bottom: 15px;
    animation: fadeInDown 0.6s ease;
}

.page-header-content h1 {
    color: var(--color-white);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.page-header-content p {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.4s both;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    animation: fadeIn 0.6s ease 0.6s both;
}

.breadcrumb a {
    color: var(--color-gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb a:hover {
    color: var(--color-gold);
}

.breadcrumb span {
    color: var(--color-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-gray);
}

/* ===== About Page ===== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-intro-stacked {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-intro-stacked .about-intro-content {
    padding-right: 0;
}

.about-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.about-gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.about-intro-video {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.about-intro-video video,
.about-intro-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.about-intro-content {
    padding-right: 40px;
}

.about-intro-content h2 {
    margin-bottom: 25px;
    color: var(--color-white);
}

.about-intro-content p {
    margin-bottom: 20px;
}

.about-intro-image {
    position: relative;
}

.about-intro-image img,
.about-intro-image video {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.about-intro-image::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    border: 1px solid var(--color-gold);
    z-index: -1;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.value-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--color-black-light);
    transition: var(--transition-medium);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(201, 169, 98, 0.1);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: 50%;
}

.value-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-black);
    fill: none;
}

.value-card h4 {
    color: var(--color-white);
    margin-bottom: 15px;
    font-family: var(--font-secondary);
    font-weight: 600;
}

.value-card p {
    font-size: 0.9rem;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.team-member {
    text-align: center;
}

.team-member-image {
    position: relative;
    margin-bottom: 25px;
    overflow: hidden;
}

.team-member-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.team-member:hover .team-member-image img {
    transform: scale(1.05);
}

.team-member-social {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9), transparent);
    display: flex;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-medium);
}

.team-member:hover .team-member-social {
    opacity: 1;
    transform: translateY(0);
}

.team-member-social a {
    width: 40px;
    height: 40px;
    background: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.team-member-social a:hover {
    background: var(--color-white);
}

.team-member-social svg {
    width: 16px;
    height: 16px;
    fill: var(--color-black);
}

.team-member h4 {
    color: var(--color-white);
    margin-bottom: 5px;
    font-family: var(--font-secondary);
    font-weight: 600;
}

.team-member span {
    color: var(--color-gold);
    font-size: 0.9rem;
}

/* ===== Services Page ===== */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 80px 0;
    border-bottom: 1px solid var(--color-black-lighter);
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-detail:last-child {
    border-bottom: none;
}

.service-detail-content {
    padding: 0 20px;
}

.service-detail-content .section-label {
    text-align: left;
}

.service-detail-content h2 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.service-detail-content p {
    margin-bottom: 25px;
}

.service-features {
    margin-bottom: 30px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: var(--color-gray);
}

.service-features li svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-gold);
    flex-shrink: 0;
}

.service-detail-image {
    position: relative;
    overflow: hidden;
}

.service-detail-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-detail:hover .service-detail-image img {
    transform: scale(1.03);
}

/* Service Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 40px;
    background: var(--color-black-light);
    text-align: center;
    transition: var(--transition-medium);
}

.feature-card:hover {
    background: var(--color-black-lighter);
}

.feature-card svg {
    width: 50px;
    height: 50px;
    stroke: var(--color-gold);
    margin-bottom: 25px;
}

.feature-card h4 {
    color: var(--color-white);
    margin-bottom: 15px;
    font-family: var(--font-secondary);
    font-weight: 600;
}

.feature-card p {
    font-size: 0.9rem;
}

/* ===== Portfolio Page ===== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 30px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid var(--color-black-lighter);
    color: var(--color-gray);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
}

.portfolio-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.portfolio-masonry .portfolio-item {
    height: 350px;
}

.portfolio-masonry .portfolio-item.tall {
    height: 725px;
}

.portfolio-masonry .portfolio-item img {
    min-height: 100%;
}

/* Portfolio Single */
.portfolio-single {
    padding: 80px 0;
}

.portfolio-single-header {
    text-align: center;
    margin-bottom: 50px;
}

.portfolio-single-header h1 {
    color: var(--color-white);
    margin-bottom: 15px;
}

.portfolio-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.portfolio-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.portfolio-meta-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-gold);
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.portfolio-gallery img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition-medium);
}

.portfolio-gallery img:hover {
    opacity: 0.9;
}

.portfolio-gallery img:first-child {
    grid-column: span 2;
    height: 500px;
}

.portfolio-description {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-description h3 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.portfolio-description p {
    margin-bottom: 20px;
}

/* ===== Slabs/Materials Page ===== */
.slabs-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.slabs-categories {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 15px 40px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid var(--color-black-lighter);
    color: var(--color-white);
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-tab:hover,
.category-tab.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
}

.slabs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.slab-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.slab-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.slab-card:hover img {
    transform: scale(1.08);
}

.slab-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 25px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-medium);
}

.slab-card:hover .slab-info {
    transform: translateY(0);
    opacity: 1;
}

.slab-info h4 {
    color: var(--color-white);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.slab-info span {
    color: var(--color-gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slab-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    background: var(--color-gold);
    color: var(--color-black);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== Contact Page ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-info h2 {
    color: var(--color-white);
    margin-bottom: 25px;
}

.contact-info > p {
    margin-bottom: 40px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item-icon {
    width: 55px;
    height: 55px;
    background: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-black);
}

.contact-item-content h4 {
    color: var(--color-white);
    font-family: var(--font-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--color-gray);
    font-size: 0.95rem;
}

.contact-item-content a:hover {
    color: var(--color-gold);
}

.contact-social h4 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-family: var(--font-secondary);
    font-weight: 600;
}

.contact-social-links {
    display: flex;
    gap: 15px;
}

.contact-social-links a {
    width: 50px;
    height: 50px;
    border: 1px solid var(--color-black-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.contact-social-links a:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.contact-social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--color-white);
    transition: var(--transition-fast);
}

.contact-social-links a:hover svg {
    fill: var(--color-black);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--color-black-light);
    padding: 50px;
}

.contact-form-wrapper h3 {
    color: var(--color-white);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--color-white);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--color-black);
    border: 1px solid var(--color-black-lighter);
    color: var(--color-white);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-gray);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c9a962' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
}

.form-group select option {
    background: var(--color-black);
    color: var(--color-white);
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-gold);
    border: none;
    color: var(--color-black);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-medium);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

/* Map Section */
.map-section {
    height: 450px;
    position: relative;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(100%) invert(90%) contrast(90%);
}

/* ===== FAQ Section ===== */
.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--color-black-lighter);
}

.faq-question {
    width: 100%;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--color-black-light);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-gold);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 30px 25px;
    max-height: 500px;
}

.faq-answer p {
    font-size: 0.95rem;
}

/* ===== LIGHT THEME OVERRIDES (must come after dark defaults) ===== */
/* All headings: dark text on light backgrounds */
.about-intro-content h2,
.service-detail-content h2,
.contact-form-wrapper h3,
.value-card h4,
.feature-card h4,
.team-member h4,
.portfolio-single-header h1,
.portfolio-description h3,
.slabs-intro h2,
.section-title,
.faq-question {
    color: var(--color-black);
}

/* Contact elements - only dark when NOT inside widget-dark */
.contact-info:not(.widget-dark) h2,
.contact-info:not(.widget-dark) .contact-item-content h4,
.contact-info:not(.widget-dark) .contact-social h4 {
    color: var(--color-black);
}

/* Cards: light backgrounds */
.value-card,
.feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

/* Form wrapper: light background */
.contact-form-wrapper {
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

.form-group label {
    color: var(--color-black);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-black);
}

.form-group select option {
    background: var(--color-white);
    color: var(--color-black);
}

/* Category tabs and filter buttons: dark text */
.category-tab,
.filter-btn {
    color: var(--color-text-light);
    border-color: var(--color-border);
}

/* Service features list: dark text */
.service-features li {
    color: var(--color-text-light);
}

/* Service detail borders */
.service-detail {
    border-bottom-color: var(--color-border);
}

/* FAQ styling */
.faq-item {
    border-color: var(--color-border);
}

/* Contact social links on light bg */
.contact-social-links a {
    border-color: var(--color-border);
}

.contact-social-links svg {
    fill: var(--color-black);
}

/* Map iframe: no inversion */
.map-section iframe {
    filter: none;
}

/* ===== Responsive - Page Specific ===== */
@media (max-width: 1200px) {
    .slabs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .about-intro {
        grid-template-columns: 1fr;
    }

    .about-intro-content {
        padding-right: 0;
    }

    .service-detail {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-detail:nth-child(even) {
        direction: ltr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 40vh;
    }

    .slabs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-masonry {
        grid-template-columns: 1fr;
    }

    .portfolio-masonry .portfolio-item,
    .portfolio-masonry .portfolio-item.tall {
        height: 300px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-gallery {
        grid-template-columns: 1fr;
    }

    .portfolio-gallery img,
    .portfolio-gallery img:first-child {
        height: 250px;
        grid-column: span 1;
    }
}

/* ===== LEGAL PAGES (Privacy & Terms) ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.legal-content .effective-date {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: 40px;
    font-style: italic;
}

.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-black);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content p {
    color: var(--color-dark-gray, #444);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content ul li {
    color: var(--color-dark-gray, #444);
    line-height: 1.8;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.legal-content strong {
    color: var(--color-black);
}

.legal-content a {
    color: var(--color-gold);
    text-decoration: underline;
}

/* ===== SLAB DETAIL MODAL ===== */
.slab-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.slab-modal.active {
    opacity: 1;
    visibility: visible;
}

.slab-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.slab-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.slab-modal.active .slab-modal-content {
    transform: translateY(0);
}

.slab-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.slab-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.slab-modal-main-image {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    background: #f0f0f0;
}

.slab-modal-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.slab-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 5;
}

.slab-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slab-modal-prev {
    left: 15px;
}

.slab-modal-next {
    right: 15px;
}

.slab-modal-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.slab-modal-info {
    padding: 25px 30px;
}

.slab-modal-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-black);
    margin-bottom: 5px;
}

.slab-modal-info .slab-modal-type {
    color: var(--color-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.slab-modal-thumbnails {
    display: flex;
    gap: 8px;
    padding: 0 30px 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.slab-modal-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.slab-modal-thumbnails::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.slab-modal-thumbnails::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 2px;
}

.slab-modal-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.slab-modal-thumb.active {
    border-color: var(--color-gold);
    opacity: 1;
}

.slab-modal-thumb:hover {
    opacity: 1;
}

.slab-modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slab-modal-cta {
    padding: 0 30px 25px;
    display: flex;
    gap: 15px;
}

.slab-modal-cta .btn {
    font-size: 0.85rem;
    padding: 12px 25px;
}

@media (max-width: 768px) {
    .slab-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .slab-modal-main-image {
        height: 35vh;
    }

    .slab-modal-info {
        padding: 20px;
    }

    .slab-modal-thumbnails {
        padding: 0 20px 20px;
    }

    .slab-modal-cta {
        padding: 0 20px 20px;
        flex-direction: column;
    }

    .slab-modal-info h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .slabs-grid {
        grid-template-columns: 1fr;
    }

    .slabs-categories {
        flex-direction: column;
        align-items: center;
    }

    .category-tab {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .filter-btn {
        width: 100%;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }
}
