/**
 * CMS Frontend Theme - ARBD Professional
 * Based on ARBD Möbel design approach
 * Bootstrap 5 is used extensively. Custom CSS only where Bootstrap is insufficient.
 */

/* Import Montserrat Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ============================================
   BASE STYLES
   ============================================ */

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-top: 70px; /* Account for fixed header */
}

main {
    margin-top: 0;
    padding-top: 0;
}

/* ============================================
   BRAND COLORS
   Override Bootstrap primary with brand color
   ============================================ */

:root {
    --bs-primary: #0d6efd; /* Default Bootstrap blue - can be customized per tenant */
    --bs-primary-rgb: 13, 110, 253;
    --bs-primary-dark: #0a58ca;
}

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

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

.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--bs-primary-dark) !important;
    border-color: var(--bs-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.border-primary {
    border-color: var(--bs-primary) !important;
}

a {
    color: var(--bs-primary);
    text-decoration: none;
}

a:hover {
    color: var(--bs-primary-dark);
    text-decoration: underline;
}

/* ============================================
   HEADER / NAVIGATION
   Fixed header with shadow
   ============================================ */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

header .navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* ============================================
   SECTIONS
   Common styles for content sections
   ============================================ */

.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

.section-lg {
    padding: 6rem 0;
}

/* Background variations */
.section.bg-light {
    background-color: #f8f9fa;
}

.section.bg-dark {
    background-color: #212529;
    color: #ffffff;
}

.section.bg-primary {
    background-color: var(--bs-primary);
    color: #ffffff;
}

/* ============================================
   HERO SECTION
   Hero banner with gradient background
   ============================================ */

.hero-section {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-dark) 100%);
    color: #ffffff;
    padding: 6rem 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-section .btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Hero with background image */
.hero-section.hero-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-section.hero-with-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-section.hero-with-image .container {
    position: relative;
    z-index: 1;
}

/* ============================================
   CARDS
   Enhanced card styles with hover effects
   ============================================ */

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 1rem !important;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card .card-img-top {
    border-radius: 0 !important;
    object-fit: cover;
}

.card-title {
    font-weight: 600;
    color: #212529;
}

.card-text {
    color: #6c757d;
}

/* Card with border accent */
.card-accent-left {
    border-left: 4px solid var(--bs-primary);
}

.card-accent-left:hover {
    transform: translateY(-4px);
}

/* Remove focus outline from card images */
a:focus .card-img-top,
a:focus-visible .card-img-top {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ============================================
   FEATURE SECTION
   Features with icons and descriptions
   ============================================ */

.feature-icon {
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary);
    color: #ffffff;
    border-radius: 0.75rem;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: #6c757d;
    line-height: 1.6;
}

/* ============================================
   USP / CHECKMARK LIST
   List with checkmark icons
   ============================================ */

.usp-list {
    list-style: none;
    padding-left: 0;
}

.usp-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.usp-list li i {
    color: var(--bs-primary);
    margin-right: 0.75rem;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.usp-section i {
    display: block;
}

/* ============================================
   METRICS / STATS SECTION
   Large numbers with descriptions
   ============================================ */

.stats-section .display-1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1;
}

.stats-section .stat-label {
    font-size: 1.125rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ============================================
   CAROUSEL / BANNER
   Carousel with gradient captions
   ============================================ */

.carousel {
    margin-top: 0;
}

.carousel-caption {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 4rem 0 2rem 0;
}

.carousel-caption h2,
.carousel-caption h3,
.carousel-caption p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* ============================================
   FAQ SECTION
   Accordion with custom styling
   ============================================ */

.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    color: #212529;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bs-primary);
    color: #ffffff;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* ============================================
   GALLERY SECTION
   Image grid with hover effects
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ============================================
   TYPOGRAPHY
   Enhanced readability for content
   ============================================ */

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

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content h1 {
    font-size: 2.5rem;
}

.content h2 {
    font-size: 2rem;
}

.content h3 {
    font-size: 1.75rem;
}

/* ============================================
   BUTTONS
   Enhanced button styles
   ============================================ */

.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

/* ============================================
   FOOTER
   Consistent footer styling
   ============================================ */

footer {
    background-color: #212529;
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

footer h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer .border-top {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   LANGUAGE SWITCHER
   Dropdown styling
   ============================================ */

.language-switcher .dropdown-toggle {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.language-switcher .dropdown-menu {
    min-width: 8rem;
}

/* ============================================
   RESPONSIVE / MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 767px) {
    /* Adjust body padding for mobile header */
    body {
        padding-top: 62px;
    }

    /* Hero section mobile */
    .hero-section {
        padding: 3rem 0;
        min-height: 300px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    /* Section padding mobile */
    .section {
        padding: 2rem 0;
    }

    .section-lg {
        padding: 3rem 0;
    }

    /* Carousel mobile */
    .carousel-caption h2 {
        font-size: 1.5rem !important;
    }

    .carousel-caption p {
        font-size: 0.875rem !important;
    }

    .carousel-caption .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .carousel-caption {
        padding: 2rem 0 1rem 0;
    }

    /* Stats section mobile */
    .stats-section .display-1 {
        font-size: 3rem !important;
    }

    .stats-section .stat-label {
        font-size: 1rem !important;
    }

    .stats-section .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left;
    }

    /* Card adjustments */
    .card-body h5 {
        font-size: 1rem;
    }

    .card-body .text-muted {
        font-size: 0.875rem;
    }

    /* Gallery grid mobile */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Typography mobile */
    .content h1 {
        font-size: 1.75rem;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 575px) {
    /* Extra small devices */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .stats-section .display-1 {
        font-size: 2.5rem !important;
    }
}

/* ============================================
   UTILITY CLASSES
   Additional helpful classes
   ============================================ */

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg-hover:hover {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.transition-all {
    transition: all 0.2s ease;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.rounded-lg {
    border-radius: 1rem !important;
}

.rounded-xl {
    border-radius: 1.5rem !important;
}
