:root {
    --primary-color: #721c24; /* Burgundy-like color for Baronnie */
    --secondary-color: #f8f9fa;
    --accent-color: #d4af37; /* Gold */
    --text-color: #333;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
    overflow-y: scroll; /* Force vertical scrollbar to prevent layout shift */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1;
}

.navbar-brand span {
    color: var(--primary-color);
    letter-spacing: 1px;
}

.nav-link {
    color: #555 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

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

.btn-primary:hover {
    background-color: #5a151b !important;
    border-color: #5a151b !important;
}

/* Override Bootstrap Primary Colors */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-link {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.btn-link:hover {
    color: #5a151b !important;
    text-decoration: underline;
}

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

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

.alert-primary {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.badge.bg-info {
    background-color: var(--accent-color) !important;
    color: #000 !important;
}

.list-group-item-action.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Pagination Overrides */
.page-link {
    color: var(--primary-color);
}

.page-link:hover {
    color: #5a151b;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(114, 28, 36, 0.25);
    color: var(--primary-color);
}

/* Form Overrides */
.form-control:focus, .form-select:focus {
    border-color: rgba(114, 28, 36, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(114, 28, 36, 0.25);
}

.btn-check:focus + .btn-primary, .btn-primary:focus {
    background-color: #5a151b !important;
    border-color: #5a151b !important;
    box-shadow: 0 0 0 0.25rem rgba(114, 28, 36, 0.5);
}

/* Secondary override to match accent color if needed or use gray */
.badge.bg-secondary {
    background-color: var(--accent-color) !important;
    color: #000 !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://www.baronnie-suisse.ch/wp-content/uploads/2021/03/accueil-vignes.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    color: #fff;
}

/* Titles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
}

.section-title {
    position: relative;
    margin-bottom: 4rem; /* Increased from 3rem */
    padding-bottom: 1.25rem; /* Increased from 1rem */
    font-weight: 800; /* Extra bold for main titles */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title-start {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
}

.section-title-start::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Cards & Layout */
.card {
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease;
    border-radius: 1rem !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

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

/* Links */
a {
    transition: all 0.2s ease;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
}

.btn-pill {
    border-radius: 50rem;
}

footer {
    background-color: #1a1a1a; /* Even darker than dark */
    margin-top: 0 !important;
    position: relative;
    z-index: 10;
}

/* Remove default footer margin if needed or fix section-footer gaps */
.py-section {
    padding-top: 5rem; /* Increased from 3rem */
    padding-bottom: 5rem;
    margin-bottom: 0 !important;
}

section {
    margin-bottom: 0 !important;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa; /* Match bg-light to avoid white gaps if content is short */
}

/* Utility */
.filter-white {
    filter: brightness(0) invert(1);
}
