/* Project Hero Block */

.project-hero-block {
    position: relative;
    width: 100%;
    height: 861px;
    overflow: hidden;
    --bg-color: #1a1a1a;
    background-color: var(--bg-color);
}

.project-hero-block.alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

.project-hero-block {
    --wp--style--global--content-size: 100% !important;
    --wp--style--global--wide-size: 100% !important;
    max-width: 100% !important;
}

/* Split background: left side color, right side image */
.project-hero-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 0;
}

.project-hero-block.has-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: var(--bg-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Editor Preview Mode */
.project-hero-block.is-preview.alignfull {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.project-hero-block.is-preview {
    border: 1px solid #ddd;
    min-height: 400px;
}

.project-hero-block.is-preview:not(.has-bg) {
    background-color: var(--bg-color, #1a1a1a) !important;
}

.project-hero-block.is-preview::before {
    background-color: var(--bg-color, #1a1a1a) !important;
}

.project-hero-block.is-preview .pre-anim-fade-up {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    visibility: visible !important;
}

/* Container */
.project-hero-container {
    position: relative;
    max-width: 1512px;
    height: 100%;
    margin: 0 auto;
    padding: 48px 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 2;
}

/* Back Button */
.project-hero-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    margin-bottom: 60px;
}

.project-hero-back.is-in {
    animation: pre-fade-up 0.6s ease forwards;
    opacity: 1;
}

.project-hero-back:hover {
    opacity: 0.8;
    transform: translateX(-4px);
}

.project-hero-back svg {
    width: 40px;
    height: 40px;
}

/* Logo */
.project-hero-logo {
    opacity: 0;
    margin-left: 100px;

}

.project-hero-logo.is-in {
    animation: pre-fade-up 0.6s ease forwards;
    animation-delay: 0.1s;
    opacity: 1;
}

.project-hero-logo-img {
    width: 310px;
    height: 200px;
    object-fit: contain;
    display: block;
}

.project-hero-logo-placeholder {
    width: 310px;
    height: 141px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Form Container */
.project-hero-form-container {
    background: rgba(255, 255, 255, 0.70)!important;
    border-radius: 12px;
    padding: 32px;
    opacity: 0;
    margin: 0 0 0 100px;

    width: 390px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.project-hero-form-container.is-in {
    animation: pre-fade-up 0.6s ease forwards;
    animation-delay: 0.2s;
    opacity: 1;
}

.project-hero-form-title {
    font-family: var(--wp--preset--font-family--at-surt, 'Surt-Normal-TRIAL', sans-serif);
    font-weight: 700; /* Bold */
    font-size: 24px;
    line-height: 1.2;
    color: #af1f22;
    margin: 0 0 24px 0;
    letter-spacing: -0.01em;
}

.project-hero-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.form-field-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-family: var(--wp--preset--font-family--at-surt, 'Surt-Normal-TRIAL', sans-serif);
    font-weight: 400;
    font-size: 16px;
    color: #1a1a1a;
    outline: none;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #666666;
}

.form-input:focus {
    background: #e0e0e0;
    outline: none;
}

.project-hero-form-button {
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: #af1f22;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--wp--preset--font-family--at-surt, 'Surt-Normal-TRIAL', sans-serif);
    font-weight: 600; /* Semibold */
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 8px;
    box-sizing: border-box;
}

.project-hero-form-button:hover {
    background: #8f1a1d;
    transform: translateY(-1px);
}

.project-hero-form-button:active {
    transform: translateY(0);
}

/* RTL Support */
[dir="rtl"] .project-hero-back:hover {
    transform: translateX(4px);
}

[dir="rtl"] .project-hero-form-title {
    text-align: right;
}

/* Responsive - 769px to 1440px (tablet / small desktop) */
@media (min-width: 769px) and (max-width: 1440px) {
    .project-hero-container {
        padding: clamp(40px, 4vw, 48px) clamp(40px, 4.5vw, 60px);
        max-width: 100%;
    }
    
    .project-hero-logo-img {
        width: clamp(200px, 18vw, 300px);
        height: auto;
    }
    
    .project-hero-form-container {
        max-width: min(354px, 90%);
    }
    
    .project-hero-form-title {
        font-size: clamp(1.5rem, 1.8vw, 2rem);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .project-hero-block {
        height: auto;
        min-height: 600px;
    }

    .project-hero-container {
        padding: 40px 48px;
    }

    .project-hero-logo-img {
        width: 250px;
        height: 114px;
    }

    .project-hero-form-container {
        width: 100%;
        max-width: 354px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .project-hero-block {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    /* Remove split background on mobile - make it full width */
    .project-hero-block::before {
        width: 100% !important;
        height: 100% !important;
    }

    /* Show background image above form on mobile with black overlay */
    .project-hero-block.has-bg::after {
        display: block !important;
        position: absolute !important;
        width: 100% !important;
        height: 300px !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), var(--bg-url) !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        z-index: 1 !important;
    }

    .project-hero-container {
        padding: 24px 20px !important;
        padding-top: 340px !important;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .project-hero-container {
        align-items: flex-start !important;
    }

    .project-hero-back {
        margin: 0 0 32px 0 !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .project-hero-back svg {
        width: 36px !important;
        height: 36px !important;
    }

    .project-hero-logo {
        margin: 0 auto 32px auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .project-hero-logo-img {
        width: 100% !important;
        max-width: 280px !important;
        height: auto !important;
        aspect-ratio: 310 / 141 !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }

    .project-hero-logo-placeholder {
        width: 100% !important;
        max-width: 280px !important;
        height: auto !important;
        aspect-ratio: 310 / 141 !important;
        margin: 0 auto !important;
    }

    .project-hero-form-container {
        padding: 24px 20px !important;
        width: 80% !important;
        max-width: 80% !important;
        margin: 0 auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        background: rgba(255, 255, 255, 0.70) !important;
        border-radius: 12px !important;
    }

    .project-hero-form-title {
        font-size: 22px !important;
        margin: 0 0 20px 0 !important;
    }

    .project-hero-form {
        gap: 16px !important;
        width: 100% !important;
    }

    .form-field-group {
        width: 100% !important;
    }

    .form-input {
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        padding: 0 16px !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
    }

    .project-hero-form-button {
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        font-size: 16px !important;
        margin-top: 8px !important;
        box-sizing: border-box !important;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .project-hero-container {
        padding: 20px 16px !important;
    }

    .project-hero-back {
        margin: 0 0 24px 0 !important;
        width: 32px !important;
        height: 32px !important;
    }

    .project-hero-back svg {
        width: 32px !important;
        height: 32px !important;
    }

    .project-hero-logo {
        margin: 0 auto 24px auto !important;
    }

    .project-hero-logo-img {
        max-width: 240px !important;
        margin: 0 auto !important;
    }

    .project-hero-logo-placeholder {
        max-width: 240px !important;
        margin: 0 auto !important;
    }

    .project-hero-form-container {
        padding: 20px 16px !important;
        width: 80% !important;
        max-width: 80% !important;
        margin: 0 auto !important;
    }

    .project-hero-form-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    .project-hero-form {
        gap: 14px !important;
    }

    .form-input {
        height: 48px !important;
        font-size: 15px !important;
        padding: 0 14px !important;
    }

    .project-hero-form-button {
        height: 48px !important;
        font-size: 15px !important;
    }
}
