/* 
   CUSTOM HERO HEADER CSS - Elite Ingatlaniroda
   Clean Luxury Animation (Static text).
*/

/* 0. FORCE PARENT CONTAINERS TO BE COMPACT - REMOVED TO RESTORE SPACING */
.s-hn,
.n-l-i,
.slogan-container,
.s-c {
    /* Spacing is now managed by individual components */
}

/* 1. Main Container */
.custom-hero-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 50%;
    min-width: 320px;
    margin: 0 auto;

    /* VERTICAL CENTERING ADJUSTMENT */
    margin-top: 55px;
    /* Increased from 35px for better breathing room */
    margin-bottom: 15px;
    /* Increased from 5px */

    text-align: center;

    /* Subtle Entrance Animation */
    animation: fade-in-up 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 2. Logo Image Wrapper */
.custom-logo-wrapper {
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;

    /* CONTINUOUS FLOATING ANIMATION LOGO ONLY */
    animation: luxury-float 6s ease-in-out infinite;
}

.custom-logo-link {
    display: inline-block;
    width: auto;
    max-width: fit-content;

    background: rgba(251, 248, 246, 0.5);
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    border-radius: 12px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(106, 82, 61, 0.12);

    /* ONLY ANIMATE TRANSFORM & SHADOW TO PREVENT BACKGROUND "FLICKER" ON LOAD */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    will-change: transform, box-shadow;
}

.custom-logo-link:hover {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(197, 160, 101, 0.15);
    transform: translateY(-4px);
}

/* 3. The Logo Image */
.custom-logo-img {
    display: block;
    width: 200px;
    /* Increased slightly for better visibility (from 186px) */
    height: auto;
    max-width: 90vw;

    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.custom-logo-img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

/* 4. Brand Text (Optional/Backup) */
.custom-logo-text-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;

    /* STATIC TEXT */
    animation: none;
}

.custom-logo-brand {
    font-family: 'Roboto Slab', 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    color: #6a523d;
    letter-spacing: 2.5px;
    text-transform: none;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 25px;
}

.custom-logo-brand::before,
.custom-logo-brand::after {
    content: '';
    display: block;
    width: 55px;
    height: 1px;
    background-color: #6a523d;
    transition: width 0.6s ease;
}

.custom-hero-header:hover .custom-logo-brand::before,
.custom-hero-header:hover .custom-logo-brand::after {
    width: 80px;
    opacity: 0.8;
}

/* 5. Responsive Adjustments */
@media (max-width: 1200px) {
    .custom-hero-header {
        margin-top: 45px;
    }

    .custom-logo-img {
        width: 175px;
    }
}

@media (max-width: 900px) {

    /* Critical Fix for scroll arrow overlap and vertical spacing */
    .custom-hero-header {
        margin-top: 40px;
        margin-bottom: 25px;
    }

    .custom-logo-img {
        width: 135px;
        /* Reduced from 150px for better balance */
    }
}

@media (max-width: 768px) {

    /* Hide desktop hero header on mobile to avoid double logo with mobile-logo-trigger */
    .custom-hero-header {
        display: none !important;
    }

    .custom-logo-brand {
        font-size: 20px;
        gap: 15px;
    }

    .custom-logo-brand::before,
    .custom-logo-brand::after {
        width: 25px;
    }
}

/* Small heights fix */
@media (max-height: 700px) {
    .custom-hero-header {
        margin-top: 20px;
        margin-bottom: 5px;
    }

    .custom-logo-img {
        width: 120px;
    }
}

/* --- ANIMATION KEYFRAMES --- */

/* Luxury Float */
@keyframes luxury-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Entrance */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HERO TITLE STYLES (Refactored from home.htm) --- */

.hero-glass-title {
    background: rgba(140, 115, 85, 0.28) !important;
    /* Warm Amber/Gold Glass effect */
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%) !important;

    backdrop-filter: blur(10px) saturate(130%) !important;
    /* Balanced blur to see background details */
    -webkit-backdrop-filter: blur(10px) saturate(130%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    /* Thinner, more subtle border */
    border-radius: 40px !important;
    /* Even tighter pill shape */
    padding: 8px 22px !important;
    /* Minimalist fit around text */
    display: block !important;
    text-align: center !important;
    width: fit-content !important;
    margin: 0 auto !important;
    max-width: 85% !important;
    /* Sufficiently wide but not overwhelming */
    box-sizing: border-box !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;

    font-family: 'Roboto Slab', 'Times New Roman', serif !important;
    letter-spacing: 2px !important;
    transition: all 0.5s ease !important;
}

.hero-glass-title font,
.hero-glass-title * {
    color: #382b1f !important;
    /* Lighter by ~20% than #221a13 */
    text-shadow: none !important;
    font-weight: 700 !important;
    text-transform: none !important;
    font-size: 28px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    display: inline-block !important;
}

.hero-glass-title {
    color: #382b1f !important;
}

/* Response Fix for small screens to prevent overlaps */
@media (max-width: 900px) {
    .hero-glass-title {
        margin-top: 120px !important;
        /* Move down to avoid menu overlap */
        padding: 20px 30px;
        max-width: 90%;
    }

    .hero-glass-title font,
    .hero-glass-title {
        font-size: 16px !important;
        /* Smaller text to fit two lines */
        line-height: 1.2 !important;
        white-space: nowrap !important;
        /* Force stay on lines as much as possible */
        text-align: center !important;
    }

    .hero-glass-title br {
        display: block !important;
        /* Ensure the <br> still breaks the lines where intended */
    }
}

@media (max-width: 768px) {
    .hero-glass-title {
        margin-top: 180px !important;
        /* Adjusted to balance with big logo above */
        padding: 15px 20px;
    }

    .hero-glass-title font,
    .hero-glass-title {
        font-size: 14px !important;
        /* Even smaller for very narrow screens */
        line-height: 1.2 !important;
    }

    .hero-glass-title {
        padding: 5px 12px !important;
        /* Ultra compact padding */
        width: 95% !important;
        max-width: 95% !important;
    }
}

@media (max-height: 800px) and (max-width: 768px) {
    .hero-glass-title {
        margin-top: 140px !important;
        /* Move up on short screens */
    }
}