/**
 * Neighborhoods Rotating Widget Styles
 * ====================================
 * 
 * Demo2-style stacked neighborhood cards with rotation
 */

/* Hero Layout (3-column) */
.hero-with-neighborhoods {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    width: 100%;
    margin: 0;
    background-image: url('../../images/hillhousesketch-optimized.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 600px;
    position: relative;
}

.hero-with-neighborhoods::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

.hero-with-neighborhoods > * {
    position: relative;
    z-index: 1;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-search-title {
    font-size: 1.75rem;
    color: var(--brand-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.hero-search-box {
    display: flex;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--brand-primary-border);
    border-right: none;
    font-size: 1rem;
    outline: none;
}

.hero-search-box input:focus {
    border-color: var(--brand-primary);
}

/* Note: hero-search-btn styles are in base.css - don't override here */

.hero-search-subtitle {
    margin-top: 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Section Layout (stacked) */
.card-stacks-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Neighborhood Stack */
.neighborhood-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.neighborhood-stack-left,
.neighborhood-stack-right {
    /* Specific positioning for hero layout */
}

.stack-title {
    font-size: 1.75rem;
    color: var(--brand-primary);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.stack-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* Stack Search */
.stack-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stack-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--brand-primary-border);
    border-radius: var(--radius-base);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.stack-search-input:focus {
    border-color: var(--brand-primary);
}

.map-link-btn {
    padding: 0.75rem 1rem;
    background: var(--brand-primary-bg);
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary-border);
    border-radius: var(--radius-base);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.map-link-btn:hover {
    background: var(--brand-primary);
    color: white;
}

/* Card Stack */
.card-stack {
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Stack Wrapper - holds prev btn, card, next btn in a row */
.card-stack-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Stack Navigation Buttons */
.stack-nav-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid var(--brand-primary-border);
    border-radius: 50%;
    font-size: 1.75rem;
    color: var(--brand-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.stack-nav-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: scale(1.1);
}

.stack-nav-btn:active {
    transform: scale(0.95);
}

/* Stack Counter */
.stack-counter {
    text-align: center;
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 500;
}

.current-index {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Neighborhood Card Stack */
.neighborhood-card-stack {
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(58, 74, 58, 0.08);
    transition: transform 0.3s ease;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--brand-primary-border);
}

.neighborhood-card-stack:hover {
    transform: scale(1.02);
}

/* Card Image */
.neighborhood-image-stack {
    height: 250px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Neighborhood Favorite Button */
.neighborhood-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
    padding: 0;
}

.neighborhood-fav-btn:hover {
    transform: scale(1.15);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.neighborhood-fav-btn.favorited {
    background: white;
}

/* Name Badge - same style as zip codes box */
.card-name-badge {
    background: var(--brand-primary-bg);
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--radius-base) var(--radius-base);
    border-left: 3px solid var(--brand-primary);
    max-width: 90%;
}

.card-name-badge .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.1rem 0;
    color: var(--brand-primary);
    line-height: 1.2;
    font-family: var(--font-primary);
}

.card-name-badge .card-subtitle {
    font-size: 0.875rem;
    margin: 0;
    color: #3a4a3a;
    font-weight: 500;
    font-family: var(--font-primary);
}

/* Navigation Buttons Inside Card */
.card-nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(45, 80, 22, 0.8);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}

.card-nav-btn:hover {
    background: rgba(45, 80, 22, 1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.card-nav-btn:active {
    transform: scale(0.95);
}

.card-nav-btn.prev {
    margin-right: 1rem;
}

.card-nav-btn.next {
    margin-left: 1rem;
}

/* Card Info */
.neighborhood-info-stack {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Zip Codes Display */
.zip-codes-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--brand-primary-bg);
    border-radius: var(--radius-base);
    margin-bottom: 1rem;
    border-left: 3px solid var(--brand-primary);
}

.zip-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    font-family: var(--font-primary);
}

.zip-values {
    font-size: 0.875rem;
    color: #3a4a3a;
    font-weight: 500;
    font-family: var(--font-primary);
}

/* Description */
.neighborhood-description {
    margin-bottom: 1.25rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 1rem 1.5rem;
    background: var(--brand-primary-bg-light);
    border-radius: 0;
    border-left: none;
    border-top: 3px solid var(--brand-primary);
    min-height: 280px;
}

.neighborhood-description p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #3a4a3a;
    margin: 0;
}

/* Amenities */
.neighborhood-amenities-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--brand-primary-bg-light);
    border-radius: var(--radius-base);
    min-height: 180px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #3a4a3a;
    font-family: var(--font-primary);
}

.amenity-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.amenity-label {
    flex: 1;
}

/* Resources */
.neighborhood-resources-stack {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resource-btn {
    padding: 0.75rem 1.5rem;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: var(--radius-base);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.resource-btn:hover {
    background: var(--brand-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resource-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-with-neighborhoods {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .neighborhood-stack-left,
    .neighborhood-stack-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-with-neighborhoods,
    .card-stacks-container {
        padding: 1rem;
    }
    
    .hero-search-title {
        font-size: 1.5rem;
    }
    
    .stack-title {
        font-size: 1.5rem;
    }
    
    .card-stack-wrapper {
        gap: 0.5rem;
    }
    
    .stack-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .neighborhood-card-stack {
        min-height: 550px;
    }
    
    .neighborhood-image-stack {
        height: 200px;
    }
    
    .card-name-badge .card-title {
        font-size: 1.15rem;
    }
    
    .card-name-badge .card-subtitle {
        font-size: 0.85rem;
    }
    
    .neighborhood-description {
        min-height: 100px;
    }
    
    .neighborhood-amenities-stack {
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .hero-search-title {
        font-size: 1.25rem;
    }
    
    .stack-title {
        font-size: 1.25rem;
    }
    
    .stack-count {
        display: block;
        margin-top: 0.25rem;
    }
    
    .stack-search {
        flex-direction: column;
    }
    
    .map-link-btn {
        width: 100%;
    }
    
    .neighborhood-card-stack {
        min-height: 500px;
    }
    
    .neighborhood-image-stack {
        height: 180px;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}
