/* ==========================================================================
   Neighborhood Pages Styles
   Based on Style Guide specifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   Main Content Layout
   -------------------------------------------------------------------------- */
.neighborhood-content {
    padding: 40px 0;
    background: var(--bg-light);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.content-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --------------------------------------------------------------------------
   Section Cards
   -------------------------------------------------------------------------- */
.section-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.section-title {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .badge {
    background: var(--secondary);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

/* --------------------------------------------------------------------------
   SEO Content Styling
   -------------------------------------------------------------------------- */
.seo-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.seo-content p {
    margin-bottom: 1.25rem;
}

.seo-content p:last-child {
    margin-bottom: 0;
}

.seo-content strong {
    color: var(--primary);
    font-weight: 600;
}

.seo-content ul,
.seo-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.seo-content li {
    margin-bottom: 8px;
}

.seo-content h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin: 24px 0 16px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Neighborhood Photo Gallery
   -------------------------------------------------------------------------- */
.neighborhood-gallery-section {
    padding-bottom: 24px;
}

/*
 * Grid: 3 columns (2fr + 1fr + 1fr), 2 rows of 200px
 * First item (featured) spans both rows in column 1.
 * Items 2-5 fill the 2x2 grid on the right.
 */
.ngallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 6px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ngallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-light);
    text-decoration: none;
}

/* Featured: first image spans both rows */
.ngallery-item:first-child {
    grid-row: 1 / 3;
    grid-column: 1;
}

.ngallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ngallery-item:hover img {
    transform: scale(1.06);
}

.ngallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    color: white;
    font-size: 1.4rem;
    opacity: 0;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.ngallery-item:hover .ngallery-overlay {
    background: rgba(0, 0, 0, 0.35);
    opacity: 1;
}

/* Last visible item with "+N više" — always show the overlay */
.ngallery-item:has(.ngallery-more) .ngallery-overlay {
    background: rgba(0, 0, 0, 0.48);
    opacity: 1;
}

.ngallery-item:has(.ngallery-more):hover .ngallery-overlay {
    background: rgba(0, 0, 0, 0.62);
}

.ngallery-more {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.5px;
}

/* Hidden links registered in GLightbox group but not rendered as thumbnails */
.ngallery-hidden {
    display: none;
}

.ngallery-hint {
    margin-top: 12px;
    font-size: 0.83rem;
    color: var(--text-light);
    text-align: center;
}

.ngallery-hint i {
    margin-right: 5px;
    color: var(--secondary);
}

/* Tablet: collapse to 2-column layout */
@media (max-width: 768px) {
    .ngallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 180px 130px 130px;
    }

    /* Featured spans full width on first row */
    .ngallery-item:first-child {
        grid-column: 1 / 3;
        grid-row: 1;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .ngallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 160px 110px 110px;
    }
}

/* --------------------------------------------------------------------------
   Ads Grid Section
   -------------------------------------------------------------------------- */
.ads-section {
    margin-top: 8px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ad-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary);
}

.ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ad-placeholder {
    width: 100%;
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--border-color);
}

.ad-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ad-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.ad-area,
.ad-rooms {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.ad-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.ad-card .btn {
    padding: 6px 16px;
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 24px;
}

.empty-state-content {
    max-width: 500px;
    margin: 0 auto 32px;
    color: var(--text-light);
    line-height: 1.6;
}

.empty-state-content p {
    margin-bottom: 12px;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq-section {
    margin-top: 8px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer {
    border-top: 1px solid var(--border-color);
}

.faq-answer-content {
    padding: 18px 20px;
    color: var(--text-light);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Sidebar Components
   -------------------------------------------------------------------------- */
.sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.sidebar-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
}

/* Stats Card */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Articles Card */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-item {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.article-item a {
    text-decoration: none;
    color: inherit;
}

.article-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.2s;
}

.article-item a:hover h4 {
    color: var(--primary);
}

.article-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, #2a4d7a 100%);
    color: white;
}

.cta-card .sidebar-title {
    color: white;
    border-bottom-color: var(--secondary);
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.cta-card .btn {
    width: 100%;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer CTA Section
   -------------------------------------------------------------------------- */
.cta-footer-section {
    background: var(--primary);
    padding: 48px 0;
    color: white;
    text-align: center;
}

.cta-footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-footer-content .seo-content {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
}

.cta-footer-content .seo-content strong {
    color: white;
}

.cta-footer-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 24px;
}

.mt-3 {
    margin-top: 16px;
}

.w-100 {
    width: 100%;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-dark);
}

.btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* --------------------------------------------------------------------------
   Responsive - Tablet (max-width: 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .content-sidebar {
        order: 2;
    }

    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-card {
        padding: 24px;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .neighborhood-content {
        padding: 24px 0;
    }

    .section-card {
        padding: 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .ads-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ad-image,
    .ad-placeholder {
        height: 200px;
    }

    .sidebar-card {
        padding: 20px;
    }

    .cta-footer-section {
        padding: 32px 0;
    }

    .cta-footer-actions {
        flex-direction: column;
    }

    .cta-footer-actions .btn {
        width: 100%;
    }

    .empty-state {
        padding: 32px 16px;
    }

    .empty-state-icon {
        font-size: 3rem;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .faq-answer-content {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Small Mobile (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ad-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ad-footer .btn {
        width: 100%;
    }

    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .breadcrumb-section,
    .content-sidebar,
    .cta-footer-section {
        display: none;
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .section-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   NEIGHBORHOODS INDEX PAGE STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Stats Section
   -------------------------------------------------------------------------- */
.neighborhoods-stats-section {
    background: white;
    padding: 48px 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-box {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-box:hover {
    transform: translateY(-4px);
    border-color: var(--secondary);
    box-shadow: 0 8px 24px rgba(244, 121, 32, 0.15);
}

.stat-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-box:hover .stat-icon {
    background: var(--primary);
    color: white;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Intro Section
   -------------------------------------------------------------------------- */
.neighborhoods-intro-section {
    background: var(--bg-light);
    padding: 48px 0;
}

.neighborhoods-intro-section .seo-content {
    max-width: 900px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Neighborhoods Grid Section
   -------------------------------------------------------------------------- */
.neighborhoods-grid-section {
    background: white;
    padding: 56px 0;
}

.section-title-center {
    text-align: center;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title-center i {
    color: var(--secondary);
}

.neighborhoods-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.neighborhood-card-index {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.neighborhood-card-index:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary);
}

.neighborhood-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.neighborhood-card-index:hover .neighborhood-image-wrapper img {
    transform: scale(1.08);
}

.neighborhood-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.neighborhood-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #2a4d7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.neighborhood-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.neighborhood-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.neighborhood-card-meta {
    margin-bottom: 16px;
    flex: 1;
}

.ads-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 6px 12px;
    border-radius: 16px;
}

.ads-count i {
    color: var(--secondary);
}

.neighborhood-card-action {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s ease;
}

.neighborhood-card-index:hover .btn-link {
    color: var(--secondary);
    gap: 12px;
}

.btn-link i {
    transition: transform 0.2s ease;
}

.neighborhood-card-index:hover .btn-link i {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Description Section
   -------------------------------------------------------------------------- */
.neighborhoods-description-section {
    background: var(--bg-light);
    padding: 48px 0;
}

.neighborhoods-description-section .seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.neighborhoods-description-section h2 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.neighborhoods-description-section ul {
    max-width: 800px;
    margin: 24px auto;
}

.neighborhoods-description-section li {
    margin-bottom: 16px;
    padding-left: 8px;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.neighborhoods-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #2a4d7a 100%);
    padding: 64px 0;
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.cta-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.95;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-actions .btn {
    min-width: 200px;
}

/* --------------------------------------------------------------------------
   Responsive - Tablet (max-width: 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .neighborhoods-index-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .section-title-center {
        font-size: 1.7rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .neighborhoods-stats-section {
        padding: 32px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }

    .stat-box {
        padding: 24px 20px;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .neighborhoods-intro-section,
    .neighborhoods-grid-section,
    .neighborhoods-description-section {
        padding: 32px 0;
    }

    .section-title-center {
        font-size: 1.5rem;
        margin-bottom: 32px;
    }

    .neighborhoods-index-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .neighborhood-image-wrapper {
        height: 200px;
    }

    .neighborhoods-cta-section {
        padding: 48px 0;
    }

    .cta-content h2 {
        font-size: 1.7rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
        min-width: unset;
    }
}

/* --------------------------------------------------------------------------
   Responsive - Small Mobile (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .section-title-center {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 8px;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .neighborhood-card-title {
        font-size: 1.1rem;
    }

    .neighborhoods-description-section h2 {
        font-size: 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }
}
