/* Additional custom styles for Lancaster County Brewers Guild */

/* Custom Font: Autogate Sans */
@font-face {
    font-family: 'Autogate Sans';
    src: url('../fonts/Autogate Sans Regular.woff2') format('woff2'),
        url('../fonts/Autogate Sans Regular.woff') format('woff'),
        url('../fonts/Autogate Sans Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Typography System */
body {
    font-family: poppins, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

h1,
h2 {
    font-family: poppins, sans-serif;
    font-weight: 600;
}

h3,
h4 {
    font-family: din-condensed, sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
}

h5,
h6 {
    font-family: poppins, sans-serif;
    font-weight: 500;
}

/* Hero Title */
.hero-content h1,
.hero-title {
    font-family: 'Autogate Sans', sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hero Accent Title (Explore) */
.hero-accent,
.explore-title,
.hero-subtitle {
    font-family: chippewa-falls, sans-serif;
    font-weight: 400;
}

/* Section Headers */
.section-header h2 {
    font-family: poppins, sans-serif;
    font-weight: 600;
}

.section-header .subtitle {
    font-family: din-condensed, sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.section-header p {
    font-family: poppins, sans-serif;
    font-weight: 400;
}

/* About Section */
.about-section {
    background: #eeeeee;
}

.about-section h2 {
    font-family: poppins, sans-serif;
    font-weight: 600;
}

.about-section p {
    font-family: poppins, sans-serif;
    font-weight: 400;
}

/* Buttons */
.btn {
    font-family: gopher, sans-serif !important;
    font-weight: 400;
    letter-spacing: 1px;
    min-width: 150px;
    border-radius: 30px;
    border: 2px solid forestgreen;
    background: #4dc14b;
    color: white;
    padding: 8px 12px !important;
    transition: 0.1s background-color linear, 0.1s color linear;
}

/* Map Section */
.map-section {
    background: #eeeeee;
}

.map-heading h3 {
    font-family: din-condensed, sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Logo styling */
.site-logo .logo-text {
    display: flex;
    flex-direction: column;
    margin-left: 1rem;
}

.logo-main {
    font-family: 'Autogate Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: normal;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-sub {
    font-family: din-condensed, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1;
    margin-top: 0.2rem;
    letter-spacing: 1px;
}

/* Footer logo styling */
.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .footer-logo img {
        max-width: 150px;
    }
}

/* Enhanced brewery grid - 3 columns like Squarespace */
.brewery-carousel-wrapper {
    position: relative;
}

.brewery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.brewery-container>a,
.brewery-slide {
    text-decoration: none;
    filter: grayscale(100%);
    opacity: 80%;
    cursor: pointer;
    display: flex;
    transition: 0.3s ease-in-out;
}

.brewery-container>a:hover,
.brewery-slide:hover {
    cursor: pointer;
    filter: grayscale(0%);
    opacity: 100%;
    transition: 0.3s ease-in-out;
}

/* Carousel navigation (hidden on desktop) */
.brewery-carousel-prev,
.brewery-carousel-next {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(34, 139, 34, 0.8);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    z-index: 10;
    transition: background 0.3s ease;
}

.brewery-carousel-prev:hover,
.brewery-carousel-next:hover {
    background: rgba(34, 139, 34, 1);
}

.brewery-carousel-prev {
    left: -5px;
}

.brewery-carousel-next {
    right: -5px;
}

.brewery-carousel-indicators {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.brewery-carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.brewery-carousel-indicators .indicator.active {
    background: #228B22;
}

.brewery-element {
    position: relative;
    /* background: white; */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 1;
    width: 100%;
}

.brewery-element:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.brewery-element img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    background: #fff;
}

.tooltip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(34, 139, 34, 0.9);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.brewery-element:hover .tooltip {
    transform: translateY(0);
}

/* Map styling enhancements */
.map-container {
    width: 100%;
    height: 600px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
}

.sidebar {
    position: absolute;
    width: 33.3333%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.25);
    background: white;
    z-index: 10;
}

.map {
    position: absolute;
    left: 33.3333%;
    width: 66.6666%;
    height: 100%;
    top: 0;
    bottom: 0;
    background: #f0f0f0;
}

.map-heading {
    background: #228B22;
    color: white;
    padding: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    text-align: center;
}

.listings {
    height: calc(100% - 60px);
    overflow-y: auto;
}

.listings .items {
    display: block;
    border-bottom: 1px solid #eee;
    padding: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.listings .items:hover {
    background-color: #f8f8f8;
}

.listings .items.active {
    background-color: #e8f5e8;
}

.listings .items .title {
    display: block;
    color: #228B22;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.listings .items .title small {
    font-weight: 400;
    color: #666;
}

/* Marker styling */
.marker {
    border: none;
    cursor: pointer;
    height: 36px;
    width: 36px;
    fill: #228B22 !important;
    background-image: url('https://www.teamtinymachine.com/assets/img/hop-marker.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Popup styling - matching original Squarespace design with !important overrides */
.mapboxgl-popup {
    padding-bottom: 50px !important;
}

.mapboxgl-popup-content {
    font: 400 15px/22px "Source Sans Pro", "Helvetica Neue", sans-serif !important;
    padding: 9px 0 !important;
    width: 180px !important;
    position: relative !important;
    background: #fff !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .1) !important;
    pointer-events: auto !important;
    font-family: poppins, sans-serif !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    border: none !important;
    margin: 0 !important;
}

.mapbox-popup-content h3 {
    background: forestgreen !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 10px !important;
    font-size: 18px !important;
    border-radius: 3px 3px 0 0 !important;
    font-weight: 700 !important;
    margin-top: -10px !important;
    text-align: left !important;
}

.popup-actions {
    padding: 10px !important;
    text-align: center !important;
    background: white !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* .popup-button {
    display: block !important;
    color: white !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    transition: 0.1s background-color linear, 0.1s color linear !important;
    cursor: pointer !important;
    border-radius: 30px !important;
    white-space: nowrap !important;
    text-align: center !important;
    width: 100% !important;
    font-family: gopher, sans-serif !important;
    border: 2px solid !important;
} */

/* Primary button (More Info) */
/* .popup-button-primary {
    background: forestgreen !important;
    border-color: forestgreen !important;
    color: white !important;
}

.popup-button-primary:hover {
    background: white !important;
    color: forestgreen !important;
} */

/* Get Directions text link */
.popup-directions-link {
    display: block !important;
    text-align: center !important;
    color: forestgreen !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 6px 0 !important;
    transition: opacity 0.2s ease !important;
    font-family: poppins, sans-serif !important;
}

.popup-directions-link:hover {
    opacity: 0.7 !important;
    text-decoration: underline !important;
}

/* Popup tip styling */
.mapboxgl-popup-tip {
    border-top-color: #52a152 !important;
    border-bottom-color: #52a152 !important;
}

/* .mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: forestgreen !important;
    border-top: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-1px) !important;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: forestgreen !important;
    border-bottom: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(1px) !important;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: forestgreen !important;
    border-left: none !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
    left: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(1px) !important;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: forestgreen !important;
    border-right: none !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
    right: 100% !important;
    top: 50% !important;
    transform: translateY(-50%) translateX(-1px) !important;
} */

.mapboxgl-popup-close-button {
    background: rgba(0, 0, 0, 0.1) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
}

.mapboxgl-popup-close-button:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
    border-left: 0;
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: #228B22;
    border-radius: 0;
}

/* Contact form enhancements */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #228B22;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* .btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #228B22;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
} */

/* .btn:hover {
    background: #32CD32;
} */

/* Newsletter form styling */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid #555;
    border-radius: 5px;
    background: #444;
    color: white;
}

.newsletter-form input::placeholder {
    color: #999;
}

/* Social links styling */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background: #32CD32;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    .hero-content .subtitle {
        font-size: 1.25rem;
    }

    /* Enable carousel on tablet */
    .brewery-carousel-wrapper {
        padding: 0 3rem;
    }

    .brewery-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        gap: 1rem;
        padding: 1rem 0;
    }

    .brewery-container::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .brewery-slide {
        flex: 0 0 calc(50% - 0.5rem);
        scroll-snap-align: start;
        padding: 0 0.5rem;
    }

    .brewery-carousel-prev,
    .brewery-carousel-next {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .brewery-carousel-indicators {
        display: none;
        /* Hide indicators on tablet/mobile - too many dots */
    }

    .sidebar {
        width: 100%;
        height: 200px;
        position: relative;
    }

    .map {
        left: 0;
        width: 100%;
        height: 400px;
        position: relative;
    }

    .form-row {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 2rem;
    }

    /* Special styling for modular page template containers */
    .brewery-single-page .container,
    .contact-page .container,
    .discoverymap-page .container {
        padding: 0 !important;
    }

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

    .section-header h2 {
        font-size: 2rem;
    }

    /* Mobile: 1 brewery at a time in carousel */
    .brewery-carousel-wrapper {
        padding: 0 2rem;
    }

    .brewery-slide {
        flex: 0 0 100%;
        padding: 0 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-form .btn {
        margin: 0 auto;
        min-width: 180px;
    }

    .footer-content {
        gap: 3rem;
    }

    .footer-bottom {
        padding: 1rem 2rem;
    }
}