/* General Body and Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    color: #1a2233;
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background-color: #1a2233 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff !important;
}

.navbar-brand .fas.fa-camera {
    margin-right: 8px;
    color: #ffc107; /* Gold color for camera icon */
}

.navbar-nav .nav-link {
    color: #f8f9fa !important;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffc107 !important; /* Gold on hover/active */
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Main Wrapper for content below fixed navbar */
.main-wrapper {
    padding-top: 70px; /* Adjust based on navbar height */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to bottom, #e0e5e9, #f4f7f6);
    padding: 80px 20px;
    text-align: center;
    color: #333;
    min-height: 60vh; /* Ensure it takes up a good portion of the viewport */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.hero-section.hidden {
    display: none !important;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #1a2233;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 40px;
}

/* Search Bar */
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 2;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.search-icon {
    color: #888;
    margin-right: 15px;
    font-size: 1.2rem;
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 8px 0;
    color: #333;
}

.search-input::placeholder {
    color: #aaa;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Suggested Queries */
.suggested-queries {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    z-index: 1;
}

.query-button {
    background-color: #fff;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.query-button:hover {
    background-color: #e9ecef;
    border-color: #cce5ff;
    color: #007bff;
    transform: translateY(-2px);
}

.query-button .fas {
    color: #007bff;
}

/* CTA Section */
.cta-section {
    margin-top: 30px;
    z-index: 1;
}

.cta-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.cta-button {
    background-color: #ff6b6b; /* A vibrant red/orange */
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.cta-button:hover {
    background-color: #e65a5a;
    transform: translateY(-3px);
}

/* Stats Section */
.stats-section {
    background-color: transparent;
    color: #1a2233;
    padding: 40px 20px;
    text-align: center;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.stats-section.hidden {
    display: none !important;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    margin: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1a2233;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1rem;
    color: #1a2233;
}

/* Search Focused Layout */
.search-focused-layout {
    display: none; /* Hidden by default */
    flex-direction: column;
    min-height: calc(100vh - 70px); /* Full height minus navbar */
    padding-top: 20px;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.search-focused-layout.active {
    display: flex !important;
}

.hero-section.hidden,
.stats-section.hidden {
    display: none !important; /* Ensure these are hidden when the search layout is active */
}

/* Hide main content when search layout is active */
.search-focused-layout.active + #mainContainer {
    display: none !important;
}

.top-search-container {
    width: 100%;
    padding: 0 20px 20px;
    background-color: #f4f7f6;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.top-search-bar {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 8px 15px;
    max-width: 700px;
    margin: 0 auto;
}

.top-search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 5px 0;
    color: #333;
}

.top-search-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.top-search-button:hover {
    background-color: #0056b3;
}

.back-to-home {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.back-to-home:hover {
    color: #333;
}

.search-results-container {
    flex-grow: 1;
    padding: 20px;
    background-color: #f4f7f6;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-weight: bold;
    color: #555;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.refresh-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #6c757d;
}

.refresh-button:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.stats {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #666;
}

/* Studios Grid */
.studios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

@media (min-width: 992px) {
    .studios-grid {
        grid-template-columns: repeat(3, 1fr); /* Max 3 records in a row for larger screens */
    }
}

.studio-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* For photo count badge */
}

.studio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.studio-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

.studio-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.studio-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a2233;
    margin: 0;
}

/* Studio Photos Section */
.studio-photos {
    position: relative;
    width: 100%;
    /* padding-bottom: 60%; */
    background-color: #e0e0e0; /* Placeholder background */
    overflow: hidden;
    border-bottom: 1px solid #eee; /* Subtle separator */
}

.studio-main-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 12px 12px 0 0; /* Match card border-radius */
}

.studio-card:hover .studio-main-photo {
    transform: scale(1.05);
}

/* Animation for studio cards on load */
.studio-card.animate-in {
    animation: fadeInSlideUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

.photo-count .fas.fa-camera {
    color: #fff;
}

.studio-info {
    padding: 20px;
    flex-grow: 1;
}

.studio-address,
.studio-distance {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
}

.studio-address strong,
.studio-distance strong {
    color: #333;
    margin-right: 5px;
}

.studio-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rating-stars-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.rating-stars .fas.fa-star,
.rating-stars .fas.fa-star-half-alt {
    color: #ffc107; /* Gold for filled stars */
}

.rating-stars .far.fa-star {
    color: #e0e0e0; /* Light grey for empty stars */
}

.rating-number {
    font-weight: bold;
    color: #1a2233;
    margin-left: 5px;
}

.reviews-info {
    font-size: 0.9rem;
    color: #777;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background-color: #e6f7ed; /* Light green */
    color: #28a745; /* Darker green */
}

.status-closed {
    background-color: #fde8e8; /* Light red */
    color: #dc3545; /* Darker red */
}

.status-unknown {
    background-color: #f0f0f0; /* Light grey */
    color: #6c757d; /* Darker grey */
}

.status-contribute-hours {
    background-color: #007bff; /* A nice blue color */
    color: #fff; /* White text for contrast */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.status-contribute-hours:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px);
}

.status-badge .fas {
    margin-right: 5px;
}

.map-link {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    background-color: #f9f9f9;
}

.maps-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    font-weight: 600;
    transition: color 0.3s ease;
}

.maps-link:hover {
    color: #0056b3;
    text-decoration: none;
}

/* No results message */
.no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 50px;
    grid-column: 1 / -1; /* Span across all columns */
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    padding: 50px;
    grid-column: 1 / -1; /* Span across all columns */
}

.near-me-info {
    grid-column: 1 / -1; /* Span across all columns */
    background-color: #e0f7fa;
    color: #007bff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.near-me-info .fas {
    color: #007bff;
}

/* Footer */
.footer {
    background-color: #1a2233;
    color: #f8f9fa;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    border-top: 5px solid #007bff; /* Accent border */
}

.footer p {
    margin: 0 0 8px;
}

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

.footer a:hover {
    text-decoration: underline;
}

.browser-compatibility {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 15px;
}

/* Carousel Styles */
.carousel-item {
    height: 300px; /* Match .studio-photos padding-bottom for consistent height */
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

/* Disclaimer Modal */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%; /* Could be more responsive */
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation-name: animatetop;
    animation-duration: 0.4s;
    position: relative;
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-title {
    margin: 0;
    font-size: 1.8rem;
    color: #1a2233;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title .fas {
    color: #007bff;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

.modal-body {
    font-size: 1rem;
    color: #444;
}

.modal-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-section h3 {
    font-size: 1.3rem;
    color: #007bff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section h3 .fas {
    color: #1a2233;
}

.modal-section ul {
    list-style-type: disc;
    margin-left: 20px;
    padding: 0;
}

.modal-section ul li {
    margin-bottom: 5px;
}

.modal-section strong {
    color: #1a2233;
}
