/* =========================================
   OLDAL ALAPSTÍLUSOK ÉS HÁTTÉR ANIMÁCIÓ
   ========================================= */
.page-container {
    /* Tiszta, halvány térhatású háttér mozgás nélkül */
    background: radial-gradient(circle at 50% 0%, #ffffff 0%, #f4f4f4 60%, #e9e9e9 100%);
    position: relative;
    overflow: hidden;
}

@keyframes premiumBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.page-header {
    height: 40vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.epitoipar-bg {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                      url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=1920');
}

.header-overlay h1 {
    font-family: 'Cinzel', serif;
    color: #c2a370;
    font-size: 3rem;
    margin-bottom: 10px;
}

/* =========================================
   PRÉMIUM SZOLGÁLTATÁS KÁRTYÁK
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
    padding: 100px 50px 140px 50px;
    max-width: 1300px;
    margin: 0 auto;
}

.service-card {
    background: #ffffff;
    border-radius: 12px; /* Kicsit szögletesebb, férfiasabb forma */
    border: 1px solid #eeeeee; /* Finom, statikus alap szegély */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(49, 65, 82, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* =========================================
   ÚJ: ÉPÍTÉSZETI KERET-RAJZOLÓ ANIMÁCIÓ
   ========================================= */
.service-card::before,
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 12px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

/* Vízszintes (alsó-felső) vonalak, amik középről nyílnak szét */
.service-card::before {
    border-top: 2px solid #c2a370;
    border-bottom: 2px solid #c2a370;
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Függőleges (jobb-bal) vonalak, amik középről nyílnak szét */
.service-card::after {
    border-left: 2px solid #c2a370;
    border-right: 2px solid #c2a370;
    transform: scaleY(0);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hover esetén a vonalak villámgyorsan, precízen körbezárják a kártyát */
.service-card:hover::before {
    transform: scaleX(1);
}
.service-card:hover::after {
    transform: scaleY(1);
}

@keyframes flowingGold {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@media (min-width: 1000px) {
    .service-card:nth-child(2) {
        transform: translateY(-40px);
    }
}

.service-card:nth-child(1) { animation: slideInLeft 0.8s ease-out 0.2s forwards; }
.service-card:nth-child(2) { animation: fadeUpCenter 0.8s ease-out 0.4s forwards; }
.service-card:nth-child(3) { animation: slideInRight 0.8s ease-out 0.6s forwards; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeUpCenter {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(-40px); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

.service-card:hover {
    box-shadow: 0 25px 50px rgba(194, 163, 112, 0.25);
}
.service-card:nth-child(1):hover, .service-card:nth-child(3):hover {
    transform: translateY(-15px);
}
.service-card:nth-child(2):hover {
    transform: translateY(-55px);
}

.service-img {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-bottom: 3px solid #c2a370;
}

.service-img img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover .service-img img {
    transform: scale(1.12) rotate(1.5deg);
}

.card-overlay { display: none; }

.service-info {
    padding: 35px 30px;
    background: linear-gradient(to bottom, #ffffff, #fdfbf7);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-info h3 {
    color: #314152;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.service-info h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; 
    height: 3px;
    background-color: #c2a370;
    transition: width 0.4s ease;
}

.service-card:hover .service-info h3::after {
    width: 100%;
}

.service-info p {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.card-footer {
    margin-top: auto;
    color: #c2a370;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.service-card:hover .card-footer {
    color: #314152;
    transform: translateX(5px);
}

@media (max-width: 1000px) {
    .service-card:nth-child(2) { transform: none; animation: slideInLeft 0.8s ease-out 0.4s forwards; }
    .service-card:nth-child(3) { animation: slideInLeft 0.8s ease-out 0.6s forwards; }
    .service-card:nth-child(2):hover { transform: translateY(-15px); }
    @keyframes fadeUpCenter { to { opacity: 1; transform: translateX(0); } }
}

/* =========================================
   ÚJ, LÁTVÁNYOS MODAL 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: #ffffff;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 16px; 
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: modalPopIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-hero {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(49, 65, 82, 0.1), rgba(49, 65, 82, 0.95));
}

.modal-header-text {
    position: absolute;
    bottom: 25px;
    left: 40px;
    z-index: 2;
}

.modal-title {
    font-family: 'Cinzel', serif;
    color: #c2a370;
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.close-button {
    position: absolute;
    top: 20px; right: 25px;
    width: 45px; height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.close-button:hover {
    background: #c2a370;
    color: #314152;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    overflow-y: auto; 
}

.section-subtitle {
    font-family: 'Cinzel', serif;
    color: #314152;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-left: 4px solid #c2a370;
    padding-left: 15px;
}

.modal-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.feature-list { list-style: none; padding: 0; }
.feature-list li {
    padding: 10px 0; color: #314152; font-weight: 500;
    border-bottom: 1px solid #eee;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before { content: "✔"; color: #c2a370; margin-right: 15px; font-weight: bold; }

.gallery-container {
    max-height: 350px; 
    overflow-y: auto;  
    padding-right: 15px;
}

.gallery-container::-webkit-scrollbar { width: 6px; }
.gallery-container::-webkit-scrollbar-track { background: #f4f4f4; border-radius: 10px; }
.gallery-container::-webkit-scrollbar-thumb { background: #c2a370; border-radius: 10px; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.gallery-img {
    width: 100%; height: 110px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.gallery-img:hover {
    transform: scale(1.05);
    border-color: #c2a370;
    box-shadow: 0 10px 20px rgba(194,163,112,0.3);
}

.modal-action { text-align: left; margin-top: 30px; }

@media (max-width: 850px) {
    .modal-body { grid-template-columns: 1fr; padding: 25px; }
    .modal-hero { height: 150px; }
    .modal-title { font-size: 1.8rem; }
}

/* =========================================
   CTA (CALL TO ACTION) SZEKCIÓ
   ========================================= */
.cta-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1920'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    padding: 100px 20px;
    text-align: center;
    color: #fff;
}

.cta-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(49, 65, 82, 0.88); 
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Cinzel', serif;
    color: #c2a370; 
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.cta-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 45px;
    color: #e0e0e0;
    font-weight: 300;
}

.cta-btn-pulse {
    display: inline-block;
    padding: 18px 50px;
    background-color: #c2a370;
    color: #314152;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 0 0 0 rgba(194, 163, 112, 0.7);
    animation: pulse-gold 2s infinite cubic-bezier(0.66, 0, 0, 1);
    transition: all 0.3s ease;
}

.cta-btn-pulse:hover {
    background-color: #ffffff;
    color: #c2a370;
    animation: none; 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@keyframes pulse-gold {
    to {
        box-shadow: 0 0 0 20px rgba(194, 163, 112, 0);
    }
}

@media (max-width: 768px) {
    .cta-content h2 { font-size: 1.8rem; }
    .cta-content p { font-size: 1rem; }
    .cta-section { 
        padding: 70px 20px; 
        background-attachment: scroll; 
    } 
}