/* Referenciak Gallery Layout */
.referenciak-gallery-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.referenciak-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.referenciak-item {
    position: relative;
    height: 450px;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    outline: none;
}

.referenciak-item:hover,
.referenciak-item:focus {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.referenciak-item.has-gallery {
    cursor: zoom-in;
}

.referenciak-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 30px;
}

.referenciak-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding: 30px 40px;
    border-radius: 0 0 30px 30px;
    width: 100%;
    height: 225px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    flex-direction: column;
    justify-content: flex-end;
}

.referenciak-title {
    width: 100%;
}

.referenciak-title h3 {
    margin: 0 0 8px 0;
    font-family: "Onest", sans-serif;
    font-weight: 500;
    font-size: 29px;
    line-height: 41px;
    max-width: 480px;
    letter-spacing: 0;
    color: #FFFFFF;
}

.referenciak-gallery-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Onest", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.referenciak-gallery-indicator svg {
    opacity: 0.8;
}

/* Szöveges bejegyzések stílusai */
.referenciak-text-post {
    background: #ffffff;
    cursor: default;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border: 1px solid #E6E6E6;
    padding: 40px;
}



.referenciak-text-content {
    padding: 40px;
    text-align: center;
    width: 100%;
}

.referenciak-text-title {
    margin: 0 0 20px 0;
    font-weight: 600;
    font-size: 46px;
    line-height: 55px;
    font-family: "Onest", sans-serif;
    letter-spacing: 0px;
    color: #000000;
    text-align: left;
}

.referenciak-text-body {
    margin-bottom: 25px;
    font-weight: 500;
    font-size: 29px;
    line-height: 41px;
    font-family: "Onest", sans-serif;
    letter-spacing: 0px;
    color: #000000;
    text-align: left;
}

.referenciak-text-body p {
    margin: 0 0 15px 0;
}

.referenciak-text-body p:last-child {
    margin-bottom: 0;
}

.referenciak-text-button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #FFFFFF;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-family: "Onest", sans-serif;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.referenciak-text-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    text-decoration: none;
    color: #FFFFFF;
}

/* Modal Styles */
.referenciak-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.referenciak-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 80%);
    cursor: pointer;
}

.referenciak-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 15px;
    max-width: 1180px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

/* Fix cím overlay az első képen */
.referenciak-modal-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0) 100%);
    padding: 30px 30px 60px 30px;
    border-radius: 15px 15px 0 0;
}

.referenciak-modal-title {
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 40px;
    color: #FFFFFF;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Abszolút bezáró gomb a képen */
.referenciak-modal-close-absolute {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 10003;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.referenciak-modal-close-absolute:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.referenciak-modal-gallery {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.referenciak-gallery-image {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.referenciak-gallery-image:hover {
    transform: scale(1.02);
}

.referenciak-gallery-image:first-child {
    border-radius: 15px 15px 0 0;
}

.referenciak-gallery-image:last-child {
    border-radius: 0 0 15px 15px;
}

/* Load More gomb stílusai */
.referenciak-load-more-wrapper {
    display: block;
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    width: 100%;
    clear: both;
}


.referenciak-load-more {
    background: #fffacd00;
    padding: 16px 32px;
    cursor: pointer;
    width: 342px;
    height: 53px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 250px;
    justify-content: center;
    border: 2px solid #000000;
    border-radius: 100px;
    font-weight: bold;
    font-size: 18px;
    line-height: 29px;
    font-family: "Inter", sans-serif;
    letter-spacing: 0px;
    color: #000000;
}

.referenciak-load-more:hover {
    background: #000000;
    transform: translateY(-2px);
}

.referenciak-load-more:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.load-more-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Responsive tablet */
@media (max-width: 1024px) {
    .referenciak-grid {
        gap: 20px;
        margin: 30px 0;
    }
    
    .referenciak-item {
        height: 358px;
    }
    
    .referenciak-overlay {
        padding: 20px;
        height: 160px;
    }
    
    .referenciak-title h3 {
            font-size: 23px;
        line-height: 32px;
        margin-bottom: 6px;
    }
    
    .referenciak-gallery-indicator {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .referenciak-modal-content {
        max-width: 90%;
        margin: 10px;
    }
    
    .referenciak-modal-title-overlay {
        padding: 25px 25px 50px 25px;
    }
    
    .referenciak-modal-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .referenciak-modal-close-absolute {
        bottom: 25px;
        right: 25px;
        width: 46px;
        height: 46px;
    }
    
    /* Szöveges bejegyzés tablet */
    .referenciak-text-content {
        padding: 30px;
    }
    
    .referenciak-text-title {
        font-size: 24px;
        line-height: 32px;
    }
    
    .referenciak-text-body {
        font-size: 15px;
        line-height: 24px;
    }
    
    .referenciak-load-more {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 220px;
    }
}

/* Responsive mobil */
@media (max-width: 768px) {
    .referenciak-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    .referenciak-item {
        height: 250px;
    }
    
    .referenciak-overlay {
        padding: 15px;
        height: 140px;
    }
    
    .referenciak-title h3 {
        font-size: 18px;
        line-height: 24px;
        margin-bottom: 6px;
    }
    
    .referenciak-gallery-indicator {
        font-size: 11px;
        padding: 2px 5px;
    }
    
    .referenciak-modal {
        padding: 10px;
    }
    
    .referenciak-modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .referenciak-modal-title-overlay {
        padding: 20px 20px 40px 20px;
    }
    
    .referenciak-modal-title {
        font-size: 24px;
        line-height: 32px;
    }
    
    .referenciak-modal-close-absolute {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    
    /* Szöveges bejegyzés mobil */
    .referenciak-text-content {
        padding: 25px 20px;
    }
    
    .referenciak-text-title {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 15px;
    }
    
    .referenciak-text-body {
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 20px;
    }
    
    .referenciak-text-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .referenciak-load-more-wrapper {
        margin-top: 40px;
        padding: 15px 0;
    }
    
    .referenciak-load-more {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 200px;
    }
}

/* Custom scrollbar a modal gallery-hez */
.referenciak-modal-gallery::-webkit-scrollbar {
    width: 6px;
}

.referenciak-modal-gallery::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.referenciak-modal-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.referenciak-modal-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}