/* Hero Section */
#banner-hero {
    background-size: cover;
    background-position: center;
    padding: auto;
    color: #fff;
    text-align: center;
    position: relative;
    max-height: 299px;
    height: 299px;
    display: flex;
    align-items: center;
}

#banner-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 1;
}

#banner-hero .wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
}

#banner-hero .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

#banner-hero .hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 48px;
    text-align: left;
    margin-bottom: 40px;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
}

#banner-hero .hero-title.error-notice {
  font-size: 32px;
  font-weight: 700;
  line-height: 48px;
  text-transform: uppercase;
}

/* Search Form */
.hero-search-form {
    max-width: 700px;
    margin: 30px auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.results-page-search .hero-search-form {
    justify-content: flex-start;
}

.btn-location {
    font-family: 'proxima-nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.3px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    
    background-color: #D44110;
    color: #fff;

    width: 310px;
    height: 48px;
    padding: 12px 20px 12px 20px;
    gap: 10px;
    border-radius: 5px;
    border: 0;
    display: flex;
    align-items: center;
}

.lang-fr .btn-location {
    width: 385px;
}

.btn-search {
    font-family: 'proxima-nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #D44110;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    padding: 0 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    height: 50px;
    
}

.btn-location:hover,
.btn-search:hover {
    background-color: #d44b2a;
}

.icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

#zip-code-form {
    margin-bottom: 0;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.zip-code-input {
    flex: 1;
    border: none;
    outline: none;
    border-radius: 5px 0 0 5px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.3px;
    text-align: left;
    color: #4C3017;
    height: 50px;
    width: 272px;
    background: #fff;
}

.zip-code-input::placeholder {
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.3px;
    text-align: left;
    color: #4C3017;

}

.zip-code-input:focus {
    border: none;
    outline: none;
}
    .zip-code-input.error {
        border-color: #dc3545;
        background-color: #FACDCA;
    }

    .error-message {
        color: #dc3545;
        font-size: 0.875rem;
        margin-top: 0.25rem;
    }

    .error-message.message-text {
        display: none;
    }

.divider-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 40px;
}

.error-message {
    display: block;
    font-size: 0.9rem;
    color: #f8d7da;
    margin-top: 10px;
    opacity: 0;
}
    .error-message.search-field {
        font-size: 16px;
        font-weight: 600;
        line-height: 16px;
        color: #ffffff;
        text-align: left;
    }

    .results-page-search .error-message.search-field {
        color: #4C3017;
    }

.input-group {
    display: flex;
    width: 100%;
}

.helper-text {
    color: #fff;
    font-size: 0.9rem;
    margin-top: 8px;
    text-align: center;
}

/* Responsive Design */
@media (min-width: 1000px) and (max-width: 1300px) {
    .header .nav-menu {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .header .nav-menu ul {
        margin-right: 30px;
        justify-content: space-between;
        width: 100%;
    }

    .header .nav-menu li {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .container-hero.container {
        padding: 0;
    }

    #banner-hero {
        padding: 0;
        height: 340px;
        max-height: 340px;
    }

    #banner-hero .hero-title {
        font-size: 34px;
        line-height: 34px;
    }

    #banner-hero .hero-title.error-notice {
        font-size: 28px;
        line-height: 27px;
    }

    .hero-search-form {
        padding: 0;
        margin-top: 25px;
        flex-direction: column;
        gap: 10px;
    }

    .btn-location, 
    .btn-search {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .zip-code-input {
        font-size: 16px;
        margin-bottom: 0;
        width: 185px;
    }
    .zip-code-input::placeholder {
        font-size: 14px;    
    }

    .btn-search {
        width: 100%;
    }

    .lang-fr .btn-location {
        width: 347px;
    }

    .lang-fr .zip-code-input {
        width: 190px;
    }

    .error-message {
        display: none;
    }

    #zip-code-form {
        margin-bottom: 55px;
    }

    .divider-text {
        margin-top: 0;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    #banner-hero .hero-title {
        font-size: 28px;
        padding-top: 48px;
        margin: 0;
    }

    .btn-location {
        min-width: 200px;
    }
}


/** List of locations styles **/
/* Section Styles */
.ba-location-list {
    margin: 0 auto;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #4C3017;
    padding: 68px 0 0 0;
    margin: 0;
    text-transform: uppercase;
}

/* Province Sections */
.province-section {
    margin-top: 45px;
    margin-bottom: 0;
}
    .province-section:last-child {
        margin-bottom: 45px;
    }

.province-header {
    cursor: pointer;
    display: flex;
    padding-top: 0;
    padding-bottom: 24px;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 2px solid #E2E2E2;
}

.province-name {
    font-size: 28px;
    font-weight: 700;
    line-height: 32px;
    text-align: left;
    text-transform: none;
    margin: 0;
    color: #4C3017;
    font-weight: 700;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    background-image: url('../images/collapse-caret.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.province-header[aria-expanded="true"] .toggle-icon {
    transform: rotate(0deg);
}

/* Letter Groups Layout */
.province-content .row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 85px;
    padding: 0;
}

.letter-group {
    padding: 0;
    max-width: 151px;
}

/* Letter Heading */
.city-letter {
    font-size: 20px;
    font-weight: 700;
    line-height: 20px;
    text-align: left;
    color: #4C3017;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #000000;
}

/* City List */
.city-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.city-item {
    font-size: 18px !important;
    font-weight: 400;
    line-height: 27px;
    text-align: left;
    color: #4C3017;

    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    font-size: 16px;
    line-height: 1.4;
}

.city-item:hover {
    color: #E65C36;
}

.location-count {
    color: #666666;
}

/* Collapse Animation */
.province-content {
    display: none;
}

.province-content.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .province-content .row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .province-content .row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 36px;
    }

    .province-content .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .province-name {
        font-size: 20px;
    }
}

@media (max-width: 576px) {

    .ba-location-list {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section-title {
        font-size: 26px;
        margin-top: 30px;
        margin-bottom: 42px;
        padding: 0;
    }

    .province-name {
        font-size: 22px;
        line-height: 32px;
    }

    .city-letter {
        font-size: 20px;
        line-height: 20px;
    }

    .city-item {
        font-size: 18px;
        line-height: 27px;
    }
}

/* Geo Location */
.btn-location.loading {
    position: relative;
    color: transparent;
}

.btn-location.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-loading 0.8s linear infinite;
}

@keyframes button-loading {
    to {
        transform: rotate(360deg);
    }
}

/* MAPBOX CSS */
.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
    text-align: left;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item.error {
    color: #dc3545;
    cursor: default;
}

.suggestion-item.no-results {
    color: #666;
    cursor: default;
    font-style: italic;
}

.input-group {
    position: relative;
}

/* Add loading indicator */
.zip-code-input.loading {
    background-image: url('../images/loading.gif');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}