/* =========================================
   1. STILURI GLOBALE & UTILITARE
   ========================================= */
body {
    background-color: #f8f9fa;
}

.min-h-80 {
    min-height: 80vh;
}

.text-justify {
    text-align: justify;
    white-space: pre-line; 
    line-height: 1.7; 
    color: #444;
}

/* Carduri Generale (Hover Effect)
.card {
    transition: transform 0.2s;
} */

/* .card:hover {
    transform: translateY(-5px);
} */

/* Footer */
.footer-logo {
    max-height: 90px;
    width: auto;
}

/* =========================================
   2. NAVBAR & HEADER (Stiluri Vechi Păstrate)
   ========================================= */
.white {
    color: #e0e0e0;
    margin: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.header-logo {
    max-height: 48px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

/* =========================================
   3. LOADER GLOBAL (Overlay Pagina)
   ========================================= */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* =========================================
   4. COMPONENTE HOMEPAGE & LISTĂ
   ========================================= */
/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)), url('../img/hero_page.jpg') no-repeat center top;
    background-size: cover;
    min-height: 400px;
}

.filter-panel-overlap {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

/* Imagini Carduri Listă */
.card-img-fixed {
    width: auto;
    height: 240px;
    object-fit: contain;
    object-position: center center;
}

.view-associated-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.view-associated-link:hover {
    color: #0d6efd;
}

/* =========================================
   5. HARTA MARE (Pagina /harta)
   ========================================= */
#map {
    width: 100%;
    /* height: 100%; Important pentru pagina full map */
    background: #e9ecef;
    border-radius: 4px;
}

.harta-mare {
    height: 95vh;
    min-height: 700px;
}

/* Overlay Căutare Harta Mare (Stânga) */
.map-overlay-card {
    position: absolute;
    top: 40px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 300px;
    border-left: 5px solid #0d6efd;
}

.map-overlay-card .form-control, 
.map-overlay-card .form-select {
    font-size: 0.9rem;
    box-shadow: none;
    border: 1px solid #ccc;
}

/* Popup Leaflet General */
.popup-title { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; display: block; color: #333; }
.popup-cat { font-size: 0.85em; color: #666; text-transform: uppercase; margin-bottom: 10px; display: block; }
.btn-view { display: block; width: 100%; text-align: center; }

/* Loader Harta */
#map-loader {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   6. PAGINA DETALIU (NOU & INTEGRAT)
   ========================================= */

/* Header Hero Detaliu */
.header-monument {
    background: #f8f9fa;
    padding: 2.5rem 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.monument-title {
    font-weight: 800;
    color: #212529;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

/* Breadcrumb Links */
.breadcrumb-item a { text-decoration: none; color: #0d6efd; font-weight: 500; }

/* Carduri Detaliu */
.detail-card {
    border: none !important;
    /* box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); */
    border-radius: 12px !important;
    margin-bottom: 1.5rem;
    background: #fff;
}

.detail-card .card-header {
    background-color: #fff !important;
    border-bottom: 1px solid #f1f1f1 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
}

/* TABURI CUSTOM (Material Design) */
.nav-tabs {
    border-bottom: #9BC9FF 0.31rem solid;
}

.nav-tabs .nav-link {
    border: none;
    background-color: transparent !important;
    color: #222324;
    font-weight: 500;
    border-radius: 0;
    position: relative;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.nav-tabs .nav-link.active {
    color: #4169E1;
    font-weight: 600;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Să acopere bordura */
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #4169E1;
}

.nav-tabs .nav-link:hover {
    color: #4169E1;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

/* Inscripție */
.inscription-box {
    background: #fffcf0;
    border-left: 5px solid #ffc107;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Imagini Galerie (Detaliu) */
.img-monument-main {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.img-monument-thumb {
    width: 100%;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.img-monument-thumb:hover {
    opacity: 0.8;
}

/* Tabel Eroi Scrollabil */
.table-scroll-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.thead-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #fff;
    box-shadow: 0 2px 2px rgba(0,0,0,0.05);
}

.table-eroi { font-size: 0.9rem; }

/* Sidebar Sticky */
.sticky-sidebar-offset {
    position: sticky;
    top: 20px;
    z-index: 10;
}
@media (max-width: 991px) {
    .sticky-sidebar-offset { position: static; }
}

/* Metadate (Key-Value) */
.meta-label {
    color: #adb5bd; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    display: block; 
    margin-bottom: 2px;
}
.meta-value {
    font-size: 0.95rem; 
    color: #212529; 
    font-weight: 500;
}
.footer {
    background-image: repeating-linear-gradient(-45deg, #f6f6f6 0px, #f6f6f6 7px, #dcdcdc54 7px, #dcdcdc54 9px);
    box-shadow: inset 0 10px 40px #9d9d9d;
    color: #2f2f2f;

    font-size: larger;
    
}


/* =========================================
   7. HARTA DETALIU & OVERLAY ADMIN
   ========================================= */

/* Wrapper Harta Detaliu */
.map-wrapper {
    position: relative;
    width: 100%;
    /* Înălțimea e dată de copilul .harta-mica */
    border-radius: 0 0 0.375rem 0.375rem;
    overflow: hidden;
}

.harta-mica {
    height: 400px; /* Fix pentru pagina detaliu */
    width: 100%;
    z-index: 1;
}

/* Overlay Administrativ (Plutitor Dreapta-Sus) */
.admin-overlay {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    z-index: 1000; /* Peste harta */
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.admin-overlay h6 {
    font-weight: 800;
    color: #212529;
    margin-bottom: 15px;
    border-bottom: 3px solid #0d6efd;
    padding-bottom: 8px;
    display: inline-block;
    font-size: 1rem;
}

.admin-row {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e9ecef;
    padding-bottom: 5px;
}

.admin-label { color: #555; font-weight: 700; font-size: 0.85em; text-transform: uppercase; }
.admin-val { color: #000; font-weight: 600; text-align: right; }

/* Responsive Overlay Detaliu (Mobil) */
@media (max-width: 768px) {
    .harta-mica {
        height: 300px;
    }
    
    .admin-overlay {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #dee2e6;
        box-shadow: none;
        border-radius: 0;
    }
}


.section-monumente {
    position: relative;
    background-image: repeating-linear-gradient(-45deg, #f6f6f6 0px, #f6f6f6 7px, #dcdcdc54 7px, #dcdcdc54 9px);
    box-shadow: inset 0 10px 40px #9d9d9d;
    color: #2f2f2f;


    padding: 80px 0 60px;
    overflow: hidden; /* obligatoriu pentru triunghi */
}

/* Triunghiul roșu */
.section-monumente::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;

    width: 0;
    height: 0;

    border-top: 80px solid #c62828;     /* roșu arhivă */
    border-left: 80px solid transparent;

    z-index: 2;
}
