/* =========================================
   SÍREMLÉKEK - KLASSZIKUS SZÉLES DIZÁJN
   ========================================= */
.memorial-portal {
    background: #fdfdfd; 
    padding: 100px 5% 150px;
    min-height: 100vh;
}

.portal-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeInDown 1s ease-out forwards;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-header .eyebrow {
    display: block;
    font-family: 'Montserrat', sans-serif;
    color: #c2a370;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.portal-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.2rem;
    color: #314152;
    margin: 0 0 15px 0;
}

.portal-header p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 300;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1350px;
    margin: 0 auto;
}

.portal-card {
    position: relative;
    height: 560px;
    border-radius: 4px;
    display: block; 
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    opacity: 0; 
}

.portal-card:nth-child(1) { animation: fadeUp 1s ease 0.2s forwards; }
.portal-card:nth-child(2) { animation: fadeUp 1s ease 0.4s forwards; }
.portal-card:nth-child(3) { animation: fadeUp 1s ease 0.6s forwards; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-bg {
    position: absolute;
    inset: -20px; 
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,15,15,0.95) 0%, rgba(15,15,15,0.5) 45%, rgba(15,15,15,0.1) 100%);
    z-index: 2;
    transition: background 0.6s ease;
}

.card-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
}

.card-num {
    position: absolute;
    top: 30px;
    right: 35px;
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: rgba(194, 163, 112, 0.35);
    font-weight: 700;
    line-height: 1;
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 4;
}

.card-content h3, 
.card-content p, 
.card-content .card-cta {
    transform: translateY(20px);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.4s ease;
}

.card-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0 0 15px 0;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.card-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #dcdcdc; 
    margin: 0 0 25px 0;
}

.card-cta {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #c2a370;
    display: inline-flex;
    align-items: center;
    transition: letter-spacing 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s ease;
}

.portal-card:hover .card-bg { transform: scale(1.05); }
.portal-card:hover::before { background: linear-gradient(to top, rgba(15,15,15,0.98) 0%, rgba(15,15,15,0.7) 50%, rgba(15,15,15,0.3) 100%); }
.portal-card:hover .card-num { color: rgba(194, 163, 112, 0.8); transform: scale(1.1); }
.portal-card:hover h3, .portal-card:hover p, .portal-card:hover .card-cta { transform: translateY(0); }
.portal-card:hover h3 { color: #c2a370; }
.portal-card:hover p { color: #ffffff; }
.portal-card:hover .card-cta { letter-spacing: 3px; color: #ffffff; }

/* =========================================
   PRÉMIUM KATALÓGUS MODAL - PESZLENKŐ DIZÁJN
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background-color: #fdfdfd; 
    width: 100%; 
    max-width: 1250px; 
    max-height: 90vh;
    border-radius: 24px; /* Látványos, modern lekerekítés */
    display: flex; 
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid #c2a370; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: modalPopIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: scale(0.95) translateY(-30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Sötétkék Fejléc (Azonos a főoldallal) --- */
.modal-header {
    background-color: #314152; 
    padding: 30px 60px;
    border-bottom: 3px solid #c2a370;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.modal-title {
    font-family: 'Cinzel', serif;
    color: #c2a370;
    font-size: 2.2rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.close-button {
    font-size: 40px; 
    color: #c2a370; 
    cursor: pointer; 
    transition: all 0.4s ease;
    line-height: 1;
}

.close-button:hover { 
    transform: rotate(90deg) scale(1.1); 
    color: #ffffff; 
}

/* --- Modal Body & Background Gradient --- */
.modal-body-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

.modal-bg-gradient {
    position: absolute;
    inset: 0;
    /* A főoldali elegáns, mozgó színátmenet */
    background: radial-gradient(circle at 50% 0%, rgba(49, 65, 82, 0.2) 0%, rgba(49, 65, 82, 0.05) 50%, #fdfdfd 100%);
    opacity: 0.8;
    z-index: 1;
}

.modal-scroll-area {
    padding: 60px; 
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.catalog-subtitle {
    text-align: center;
    color: #666;
    margin-top: 0;
    margin-bottom: 40px;
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- ÚJ, DIZÁJNOSABB FILTER SÁV --- */
.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.filter-bar {
    background: #ffffff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(49, 65, 82, 0.08);
    display: inline-flex;
    gap: 5px;
    border: 1px solid rgba(194, 163, 112, 0.2);
}

.filter-btn {
    background: transparent;
    border: 2px solid transparent; 
    color: #314152;
    padding: 12px 28px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

/* Mérnöki keret-rajzoló animáció a gombokon */
.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #c2a370;
    border-radius: 50px;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.filter-btn:hover::before {
    transform: scaleX(1);
}

.filter-btn.active {
    background-color: #c2a370; /* Arany aktív háttér */
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(194, 163, 112, 0.4);
}

.filter-btn.active::before {
    transform: none; /* Kikapcsoljuk az animációt az aktív gombon */
    border: none;
}

/* --- PRÉMIUM KATALÓGUS RÁCS ÉS KÁRTYÁK --- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    transition: all 0.4s ease;
}

.catalog-item {
    background: #ffffff;
    border-radius: 16px; /* Látványosabb kártya lekerekítés */
    overflow: hidden;
    border: 1px solid rgba(49, 65, 82, 0.1);
    box-shadow: 0 15px 35px rgba(49, 65, 82, 0.08);
    opacity: 0; 
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

/* Staggered (lépcsőzetes) beúszás a kártyáknak */
.catalog-item:nth-child(1) { animation: fadeUp 1s ease 0.2s forwards; }
.catalog-item:nth-child(2) { animation: fadeUp 1s ease 0.4s forwards; }
.catalog-item:nth-child(3) { animation: fadeUp 1s ease 0.6s forwards; }
.catalog-item:nth-child(n+4) { animation: fadeUp 1s ease 0.8s forwards; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.catalog-item:hover {
    transform: translateY(-15px) scale(1.03); /* Erőteljesebb kiemelkedés */
    box-shadow: 0 25px 60px rgba(194, 163, 112, 0.2);
    border-color: #c2a370;
}

.catalog-img-wrapper {
    padding: 20px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fcfbf9;
}

.catalog-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.catalog-item:hover .catalog-img-wrapper img {
    transform: scale(1.1); /* Kép finom kizoomolása */
}

/* Sötétkék badge arany vonallal a kártya alján */
.catalog-label {
    padding: 20px 30px;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-grow: 1;
}

.catalog-label span {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #314152;
    font-size: 1.2rem;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 10px;
}

.catalog-label span::after {
    content: '';
    position: absolute;
    left: 0; 
    bottom: 0;
    width: 0; 
    height: 2px;
    background: #c2a370;
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.catalog-item:hover .catalog-label span {
    color: #c2a370; /* Hoverre aranyra vált a kód */
}

.catalog-item:hover .catalog-label span::after {
    width: 100%; /* Kirajzolódik az arany vonal */
}

/* Mobil nézet finomhangolása */
@media (max-width: 1100px) {
    .modal-scroll-area { padding: 40px; }
    .catalog-title { font-size: 1.8rem; }
    .filter-bar { gap: 3px; border-radius: 4px; padding: 5px; flex-wrap: wrap; justify-content: center; }
    .filter-btn { padding: 10px 15px; font-size: 0.85rem; }
    .filter-btn::before { display: none; } /* Mobilon kikapcsoljuk az animációt */
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
    .catalog-img-wrapper { height: 200px; }
}