/**
 * Template: Single Location
 * Styles for individual location pages (Agritourism Farms, Farmers Markets, Roadside Markets, CSAs)
 * 
 * @package SCDA-2025
 */

/* ========================================
   LOCATION HERO
   ======================================== */

/* Outer hero wrapper */
.location-hero {
    position: relative;
    overflow: hidden;

    @media screen and (max-width: 991px) {
        overflow: visible;
    }
}

/* Hero background with texture - matches find-local-child pattern */
.location-hero .hero-bg {
    min-height: 500px;
    position: relative;
    z-index: 3;

    @media screen and (max-width: 991px) {
        min-height: auto;
    }
}
 
/* Hero content area */
.location-hero .hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);

    .container {
        padding-top: 172px;
        display: flex;
        flex-direction: column;
        justify-content: center;

        @media screen and (max-width: 991px) {
            padding-top: 110px;
        }
    }
    
    .row {
        margin-top: 0;
        padding: 70px 0;
        display: flex;
        align-items: center;

        @media screen and (max-width: 991px) {
            padding: 40px 0 20px;
            align-items: flex-start;
        }

        .col-lg-6 {
            margin-top: 0;
        }
    }

    .hero-content-text {
        @media screen and (max-width: 991px) {
            text-align: center;
        }

        & > * {
            @media screen and (max-width: 991px) {
                margin-bottom: 16px;
            }
        }

        & > .hero-actions {
            @media screen and (max-width: 991px) {
                margin-bottom: 0;
            }
        }

        & > .hero-social-links {
            @media screen and (max-width: 991px) {
                margin-bottom: 24px;
            }
        }
    }

    .hero-content-image {
        position: relative;
        z-index: 2;
        align-self: center;

        @media screen and (max-width: 991px) {
            display: none;
        }

        img {
            width: 100%;
            height: auto;
            max-height: 366px;
            object-fit: cover;
            display: block;
        }
    }

    .hero-content-image-mobile {
        display: none;
        margin: 24px 0;

        @media screen and (max-width: 991px) {
            display: block;
            width: 100%;
            position: relative;
            margin-top: 40px;
            margin-bottom: -60px;
            z-index: 3;
        }

        img {
            width: 100%;
            height: auto;
            max-height: 280px;
            object-fit: cover;
            display: block;
            border-radius: 8px;
        }
    }
}

/* Hero Title */
/* Hero Badge Labels - row of pills above the h1 per Figma */
.location-hero .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;

    @media screen and (max-width: 991px) {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
    }
}

.location-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.105px;
    white-space: nowrap;
    color: var(--color-scda-blue);
    line-height: 1;
}

.location-hero .hero-badge img {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Post Type Badges - Different color per post type */
.location-hero .hero-badge.badge-agritourism-farm {
    background-color: var(--color-scda-green-25); /* #E9EEEB */
}

.location-hero .hero-badge.badge-roadside-market {
    background-color: var(--color-scda-grey-25); /* #EEEEEE */
}

.location-hero .hero-badge.badge-csa {
    background-color: var(--color-scda-moss-25); /* #D6DDD4 */
}

.location-hero .hero-badge.badge-farmers-market {
    background-color: var(--color-scda-tan-25); /* #EFDCD7 */
}

/* Association Member Badges */
.location-hero .hero-badge.badge-association {
    background-color: var(--color-scda-green-25); /* #E9EEEB */
}

.location-hero .hero-badge.badge-passport {
    background-color: var(--color-scda-blue-25); /* #D0D4D8 */
}

.location-hero .hero-badge.badge-fm-member {
    background-color: var(--color-scda-tan-25); /* #EFDCD7 */
}

/* Hero Title + Meta Container */
.location-hero .hero-title-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.location-hero h1 {
    color: var(--color-white);
    margin-bottom: 0;
    line-height: 1.1;
}

/* Location Meta - City, SC */
.location-hero .location-meta {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0;
    letter-spacing: 0.18px;
}

/* Hero Action Buttons */
.location-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;

    @media screen and (max-width: 991px) {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
}

.location-hero .hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;

    svg {
        flex-shrink: 0;
    }

    @media screen and (max-width: 991px) {
        width: 100%;
    }
}

/* Social Links - Icons + Text with underlines */
.location-hero .hero-social-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 24px;

    @media screen and (max-width: 991px) {
        justify-content: center;
        gap: 24px;
    }
}

.location-hero .hero-social-links .social-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-hero .hero-social-links svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-white);
}

.location-hero .hero-social-links a {
    color: var(--color-white);
    text-decoration: underline;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.12px;
    transition: opacity 0.2s ease;
}

.location-hero .hero-social-links a:hover,
.location-hero .hero-social-links a:focus-visible {
    opacity: 0.8;
}

/* ========================================
   LOCATION CONTENT AREA
   ======================================== */

.location-content {
    padding: var(--spacing-xl) 0 var(--spacing-md);

    @media screen and (max-width: 991px) {
        padding-top: 80px;
    }

    @media screen and (max-width: 768px) {
        padding: 80px 0 var(--spacing-sm);
    }
}

.location-content .row {
    display: flex;
    flex-wrap: wrap;

    @media screen and (max-width: 991px) {
        flex-direction: column;
    }
}

/* Left Column - Main Info (force order 1 on mobile) */
.location-main-column {
    @media screen and (max-width: 991px) {
        order: 1;
        margin-top: var(--spacing-lg);
    }
}

/* Right Column - Sidebar (Map, Hours) (force order 2 on mobile) */
.location-sidebar-column {
    @media screen and (max-width: 991px) {
        order: 2;
        margin-top: 0;
    }
}

/* ========================================
   SIDEBAR SECTIONS (Map, Address, Hours)
   ======================================== */

.location-sidebar {
    /* Clean styling per Figma - no background or border-radius */
    display: block;
}

.location-map-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #e5e3df;
}

.location-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.location-sidebar-content {
    padding: 0 0 var(--spacing-md);
}

.location-sidebar-section {
    margin-bottom: var(--spacing-md);
}

.sidebar-section-title {
    margin: 0 0 var(--spacing-sm);
}

.location-sidebar-section:last-child {
    margin-bottom: 0;
}

.location-sidebar-section p {
    margin: 0;
    line-height: 1.5;
    color: var(--color-scda-black);
}

.location-sidebar-section a {
    color: var(--color-scda-black);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.location-sidebar-section a:hover,
.location-sidebar-section a:focus-visible {
    color: var(--color-scda-blue);
}

/* Hours List */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hours-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-for-dates {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-scda-blue);
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 8px 2px;
    border-radius: 8px;
    margin-top: 12px;
}

.hours-label {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-scda-black);
}

.hours-time {
    font-size: 0.9375rem;
    color: var(--color-scda-black);
}

/* ========================================
   MAIN CONTENT SECTIONS
   ======================================== */

.location-info-section {
    margin-bottom: var(--spacing-md);
}

.location-info-section:last-child {
    margin-bottom: 0;
}

.location-info-title {
    margin: 0 0 var(--spacing-sm);
}

.location-info-section .description {
    line-height: 1.6;
    color: var(--color-scda-black);
}

/* Checklist Styling - Simple bullet points per Figma */
.location-info-section .checklist {
    margin: 0;
    padding: 0;
    list-style: disc;
    padding-left: 1.25em;
}

.location-info-section .checklist li {
    line-height: 1.4;
    margin-bottom: 0;
    padding-left: 0.25em;
}

.location-info-section .checklist li::marker {
    color: var(--color-scda-black);
}

/* Multi-column checklist for longer lists */
.checklist-multi-column {
    columns: 2;
    column-gap: var(--spacing-lg);

    @media screen and (max-width: 576px) {
        columns: 1;
    }
}

.checklist-multi-column li {
    break-inside: avoid;
}

/* Special Events List */
.special-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.special-event.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--color-scda-grey);
}

.special-event-item {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-scda-grey);
}

.special-event-item:first-child {
    padding-top: 0;
}

.special-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.special-event-item .event-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-scda-black);
}

.special-event-item .event-datetime {
    font-size: 0.9375rem;
    color: #7C7E77;
    margin-top: 4px;
}

/* ========================================
   YOU MIGHT ALSO LIKE SECTION
   ======================================== */

.related-locations-wrapper {
    padding: var(--spacing-md) 0 var(--spacing-xl);
}

.related-locations {
    position: relative;
    padding: var(--spacing-xl);
    border-radius: 8px;
    overflow: hidden;

    @media screen and (max-width: 768px) {
        padding: var(--spacing-lg);
        border-radius: 8px;
    }
}

.related-locations .related-title {
    text-align: left;
    margin-bottom: calc(var(--spacing-lg) / 2);
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-weight: 400;
    text-transform: none;
}

.related-locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 2;

    @media screen and (max-width: 991px) {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Use exact map card styles */
.related-locations .location-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0;
    overflow: hidden;
}

.related-locations .location-card .card-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    position: relative;
}

.related-locations .location-card .card-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.related-locations .location-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-locations .location-card .card-info {
    flex: 1;
    min-width: 0;
}

.related-locations .location-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-scda-black);
    margin: 0 0 4px;
    line-height: 1.3;
}

.related-locations .location-card .card-meta {
    font-size: 0.9375rem;
    color: #7C7E77;
    margin: 0 0 2px;
}

.related-locations .location-card .card-distance {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-scda-moss);
    margin: 0;
}

.related-locations .location-card .card-details {
    display: block;
    padding: 0 20px 20px;
}

.related-locations .location-card .card-type-pills {
    margin-bottom: 12px;
}

.related-locations .location-card .card-right-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 24px;
    padding-top: 4px;
}

.related-locations .location-card .card-right-col .card-badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.related-locations .location-card .card-right-col .badge-icon {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.related-locations .type-pill {
    display: inline-block;
    padding: 4px 8px 2px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-scda-blue);
}

/* Type pill colors by post type */
.related-locations .type-pill-agritourism-farm {
    background-color: var(--color-scda-green-25); /* #E9EEEB */
}

.related-locations .type-pill-roadside-market {
    background-color: var(--color-scda-grey-25); /* #EEEEEE */
}

.related-locations .type-pill-csa {
    background-color: var(--color-scda-moss-25); /* #D6DDD4 */
}

.related-locations .type-pill-farmers-market {
    background-color: var(--color-scda-tan-25); /* #EFDCD7 */
}

.related-locations .location-card .card-section {
    margin-bottom: 12px;
}

.related-locations .location-card .card-section:last-of-type {
    margin-bottom: 16px;
}

.related-locations .location-card .card-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-scda-black);
    margin-bottom: 4px;
}

.related-locations .location-card .card-section-label svg {
    width: 14px;
    height: 18px;
    flex-shrink: 0;
}

.related-locations .location-card .card-section-text {
    font-size: 0.9375rem;
    color: var(--color-scda-black);
    line-height: 1.5;
    margin: 0;
    text-decoration: underline;
}

.related-locations .location-card .card-hours-text {
    text-decoration: none;
    white-space: pre-line;
}

.related-locations .location-card .card-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.related-locations .location-card .card-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    padding: 10px 16px;
    line-height: 1.2;
}

/* ========================================
   BACK TO EXPLORE LINK
   ======================================== */

.back-to-explore {
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.back-to-explore a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--color-scda-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-explore a:hover,
.back-to-explore a:focus-visible {
    color: var(--color-scda-midnight);
    text-decoration: underline;
}

.back-to-explore svg {
    width: 16px;
    height: 16px;
}
