/* General Reset */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

/* Header Styling */
header {
    background-color: #d9534f;
    color: white;
    padding: 1rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

header a button {
    background-color: white;
    color: #d9534f;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
}

header a button:hover {
    background-color: #f7f7f7;
}

/* Card Styling */
.link-card {
    max-width: 300px;
    margin: 1rem;
    text-align: center;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header adjustments */
    header {
        flex-direction: column;
        padding: 0.8rem;
    }

    header h1 {
        margin-bottom: 0.5rem;
    }

    /* Hero section adjustments */
    .hero-section {
        height: 40vh;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-content .lead {
        font-size: 1.1rem;
    }

    /* Feature cards adjustments */
    .feature-card {
        margin-bottom: 1.5rem;
    }

    .card-icon {
        padding: 1.5rem;
        font-size: 2rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    /* General text adjustments */
    .section-title {
        font-size: 2rem;
    }

    .section-text {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Additional small screen adjustments */
@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

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

    .section-title {
        font-size: 1.75rem;
    }
}

main {
    display: flex;
    box-sizing: border-box; /* Include padding in width calculations */
}

#map {
    height: 100vh; /* Full viewport height */
    width: 100%; /* Full width */
    border: 2px solid #d9534f; /* Optional border for visibility */
}

#map-container {
    height: 100vh; /* Ensure parent container has a height */
    width: 100%; /* Ensure parent container has full width */
    position: relative;
    flex: 3; 
}

#filters-container {
    flex: 1; /* Filters take 1/4 of the width */
    display: flex; /* Enable Flexbox */
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-start; /* Stack elements starting from the top */
    align-items: stretch; /* Ensure children stretch to fill the width */
    padding: 1rem;
    background-color: #f8f9fa;
    overflow-y: auto; /* Allow scrolling if content exceeds the container's height */
    border-left: 1px solid #ddd; /* Optional: Add a border for separation */
}

#product-count {
    margin-top: auto; /* Push this element to the bottom of the container */
    font-weight: bold;
    padding-top: 1rem;
    border-top: 1px solid #ddd; /* Optional: Add a separator line */
}

#tags-container {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: #d9534f;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
}

.tag:hover {
    background-color: #c9302c;
}

/* Active tag styling */
.tag.active {
    background-color: #b52a27; /* Darker color for active tags */
}

.tag.active::after {
    content: ' ×'; /* Add an "x" symbol */
    font-weight: bold;
    color: white;
    margin-left: 5px;
    cursor: pointer;
}

.reset-tag {
    background-color: #5bc0de;
}

.reset-tag:hover {
    background-color: #31b0d5;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: #d9534f; /* Fallback color if image doesn't load */
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.intro-section {
    background-color: #fff;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: #d9534f;
    margin-bottom: 1.5rem;
}

.section-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
}

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

.card-icon {
    background-color: #d9534f;
    color: white;
    padding: 2rem;
    text-align: center;
    font-size: 2.5rem;
}

.card-body {
    padding: 2rem;
    text-align: center;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.card-text {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-primary {
    background-color: #d9534f;
    border-color: #d9534f;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #c9302c;
    border-color: #c9302c;
    transform: scale(1.05);
}
