/* ===== REFERENCES PAGE ===== */

.page-references{
    position:relative;
    z-index:2;
}

/* HERO */
.hero-references{
    position:relative;
    padding:160px 0 54px;
    background-image:url("../../images/contact-hero-bg.png");
    background-size:cover;
    background-position:center 25%;
}

.hero-references::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 18% 42%, rgba(255,140,50,0.24) 0%, rgba(255,140,50,0.10) 18%, rgba(255,140,50,0.02) 34%, transparent 48%),
        linear-gradient(
            90deg,
            rgba(7,10,16,0.96) 0%,
            rgba(8,12,18,0.88) 34%,
            rgba(8,12,18,0.52) 58%,
            rgba(8,12,18,0.18) 78%,
            rgba(8,12,18,0.08) 100%
        );
}

.hero-references .hero-content{
    position:relative;
    max-width:720px;
    padding:8px 0 0;
}

.hero-references h1{
    font-size:64px;
    line-height:0.96;
    font-weight:800;
    letter-spacing:-1.2px;
    margin-bottom:12px;
}

.hero-references p{
    max-width:620px;
    opacity:0.88;
    color:rgba(255,255,255,0.88);
    margin-bottom:22px;
    line-height:1.55;
}

.hero-buttons{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}

.hero-references .btn-primary,
.reference-form-actions .btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    padding:0 22px;
    border:none;
    border-radius:10px;
    font-size:15px;
    font-weight:700;
    text-decoration:none;
    color:#ffffff;
    background:linear-gradient(180deg, #ffb347 0%, #ff8c32 100%);
    box-shadow:0 10px 22px rgba(255,140,50,0.28), 0 0 24px rgba(255,140,50,0.16);
    transition:all .28s ease;
    cursor:pointer;
}

.hero-references .btn-primary:hover,
.reference-form-actions .btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 26px rgba(255,140,50,0.34), 0 0 28px rgba(255,140,50,0.18);
}

/* SECTION WRAPS */
.references-form-section,
.references-list-section,
.references-projects-section{
    padding:16px 0 18px;
}

/* ===== REFERENCE FORM TOGGLE ===== */
.references-form-section{
    max-height:0;
    overflow:hidden;
    opacity:0;
    transform:translateY(-20px);
    transition:all .45s ease;
    padding:0;
}

.references-form-section.is-open{
    max-height:1200px;
    opacity:1;
    transform:translateY(0);
    padding:16px 0 18px;
}

.references-form-section .container,
.references-list-section .container,
.references-projects-section .container{
    padding:20px 22px 18px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(3,5,8,0.78) 0%, rgba(2,4,7,0.94) 100%);
    border:1px solid rgba(255,255,255,0.06);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04), 0 20px 40px rgba(0,0,0,0.45), 0 0 22px rgba(255,140,50,0.05);
    backdrop-filter:blur(16px) saturate(120%);
    -webkit-backdrop-filter:blur(16px) saturate(120%);
}

.section-title{
    margin-bottom:16px;
}

.section-title h2{
    font-size:22px;
    line-height:1.15;
    margin-bottom:6px;
    background:linear-gradient(90deg, #ffb14a 0%, #ffffff 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.section-title p{
    opacity:0.72;
    font-size:13px;
    line-height:1.5;
    color:rgba(230,237,243,0.82);
}

/* FORM */
#reference-form{
    scroll-margin-top:120px;
}

.form-success,
.form-error{
    margin-bottom:16px;
    padding:14px 16px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
}

.form-success{
    color:#d6ffe7;
    background:rgba(35,120,70,0.24);
    border:1px solid rgba(70,174,52,0.35);
}

.form-error{
    color:#ffe2e2;
    background:rgba(160,45,45,0.24);
    border:1px solid rgba(255,100,100,0.30);
}

.reference-form{
    position:relative;
    overflow:hidden;
    padding:20px 18px 18px;
    border-radius:12px;
    background:linear-gradient(180deg, rgba(20,24,34,0.58) 0%, rgba(15,20,30,0.72) 100%);
    backdrop-filter:blur(16px) saturate(118%);
    -webkit-backdrop-filter:blur(16px) saturate(118%);
    border:1px solid rgba(255,255,255,0.10);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 26px rgba(0,0,0,0.22);
}

.reference-form::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 30%, transparent 56%);
    pointer-events:none;
}

.reference-form .form-row{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
    margin-bottom:14px;
    position:relative;
    z-index:1;
}

.reference-form input,
.reference-form textarea,
.reference-form select{
    width:100%;
    border:none;
    outline:none;
    border-radius:10px;
    padding:14px 16px;
    background:linear-gradient(180deg, rgba(18,22,30,0.82) 0%, rgba(13,18,28,0.94) 100%);
    border:1px solid rgba(255,255,255,0.08);
    color:#ffffff;
    font-size:14px;
    line-height:1.45;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
    transition:all .28s ease;
}

.reference-form input::placeholder,
.reference-form textarea::placeholder{
    color:rgba(230,237,243,0.48);
}

.reference-form input:focus,
.reference-form textarea:focus,
.reference-form select:focus{
    border-color:rgba(255,140,50,0.55);
    box-shadow:0 0 0 3px rgba(255,140,50,0.10), 0 0 18px rgba(255,140,50,0.10);
}

.reference-form textarea{
    resize:vertical;
    min-height:160px;
}

.reference-rating-label{
    display:block;
    margin-bottom:6px;
    text-align:center;
    font-size:15px;
    font-weight:700;
    color:#ffffff;
}

.reference-form-actions{
    position:relative;
    z-index:1;
    display:flex;
    justify-content:center;
    margin-top:4px;
}

/* REFERENCES LIST */
.reference-card{
    position:relative;
    overflow:hidden;
    padding:20px 18px 18px;
    border-radius:12px;
    background:linear-gradient(180deg, rgba(20,24,34,0.58) 0%, rgba(15,20,30,0.72) 100%);
    backdrop-filter:blur(16px) saturate(118%);
    -webkit-backdrop-filter:blur(16px) saturate(118%);
    border:1px solid rgba(255,255,255,0.10);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 26px rgba(0,0,0,0.22);
    transition:all .35s ease;
}

.reference-card:hover{
    transform:translateY(-4px);
    border:1px solid rgba(255,140,50,0.48);
    box-shadow:
        0 0 18px rgba(255,140,50,0.18),
        0 0 42px rgba(255,140,50,0.08),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.reference-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 30%, transparent 56%);
    pointer-events:none;
}

.reference-card h3{
    position:relative;
    z-index:1;
    font-size:22px;
    line-height:1.15;
    margin-bottom:8px;
    background:linear-gradient(90deg, #ffb14a 0%, #ffffff 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.reference-meta{
    position:relative;
    z-index:1;
    font-size:14px;
    line-height:1.55;
    color:rgba(230,237,243,0.82);
    margin-bottom:8px;
}

.reference-stars{
    position:relative;
    z-index:1;
    display:flex;
    gap:2px;
    margin-bottom:12px;
    color:#ffb14a;
    font-size:16px;
}

.reference-text{
    position:relative;
    z-index:1;
    font-size:14px;
    line-height:1.65;
    color:rgba(230,237,243,0.88);
}

/* PROJECTS */
.projects-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
}

.project-card{
    overflow:hidden;
    border-radius:12px;
    background:linear-gradient(180deg, rgba(18,22,30,0.62) 0%, rgba(13,18,28,0.78) 100%);
    backdrop-filter:blur(15px) saturate(118%);
    -webkit-backdrop-filter:blur(15px) saturate(118%);
    border:1px solid rgba(255,255,255,0.08);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 24px rgba(0,0,0,0.22);
    transition:.35s;
}

.project-card:hover{
    transform:translateY(-4px);
    box-shadow:
        0 0 18px rgba(255,140,50,0.16),
        0 0 42px rgba(255,140,50,0.08),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.project-card img{
    width:100%;
    height:136px;
    object-fit:cover;
}

.project-card h3{
    padding:14px 16px 4px;
    font-size:17px;
    line-height:1.18;
    color:#ffffff;
}

.project-card p{
    padding:0 16px 16px;
    font-size:12px;
    line-height:1.45;
    opacity:0.75;
    color:rgba(230,237,243,0.82);
}

/* RESPONSIVE */
@media (max-width:1100px){
    .projects-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width:700px){
    .hero-references{
        padding:140px 0 18px;
        background-position:center 20%;
    }

    .hero-references h1{
        font-size:34px;
        line-height:0.98;
        letter-spacing:-0.8px;
        margin-bottom:10px;
    }

    .hero-references p{
        max-width:100%;
        font-size:13px;
        line-height:1.5;
        opacity:0.86;
        margin-bottom:16px;
    }

    .hero-references .btn-primary,
    .reference-form-actions .btn-primary{
        min-height:42px;
        padding:0 16px;
        font-size:13px;
        border-radius:10px;
    }

    .hero-buttons{
        gap:10px;
    }

    .references-form-section .container,
    .references-list-section .container,
    .references-projects-section .container{
        padding:14px 12px 12px;
        border-radius:14px;
    }

    .reference-form,
    .reference-card{
        padding:14px 12px 12px;
        border-radius:12px;
    }

    .reference-card h3,
    .section-title h2{
        font-size:16px;
        line-height:1.12;
        margin-bottom:8px;
    }

    .reference-meta,
    .reference-text,
    .section-title p{
        font-size:12px;
        line-height:1.45;
    }

    .reference-form .form-row{
        gap:10px;
        margin-bottom:10px;
    }

    .reference-form input,
    .reference-form textarea,
    .reference-form select{
        padding:12px 13px;
        font-size:13px;
        border-radius:10px;
    }

    .reference-form textarea{
        min-height:140px;
    }

    .reference-rating-label{
        font-size:13px;
        margin-bottom:4px;
    }

    .form-success,
    .form-error{
        padding:12px 13px;
        font-size:12px;
        border-radius:10px;
        margin-bottom:12px;
    }

    .references-form-section,
    .references-list-section,
    .references-projects-section{
        padding:10px 0 16px;
    }

    .project-card img{
        height:150px;
    }

    .projects-grid{
        display:grid;
        grid-auto-flow:column;
        grid-auto-columns:minmax(240px, 240px);
        grid-template-columns:none;
        gap:12px;
        overflow-x:auto;
        overflow-y:hidden;
        padding-bottom:6px;
        scroll-snap-type:x proximity;
        -webkit-overflow-scrolling:touch;
    }

    .projects-grid::-webkit-scrollbar{
        height:6px;
    }

    .projects-grid::-webkit-scrollbar-thumb{
        background:rgba(255,140,50,0.35);
        border-radius:999px;
    }

    .project-card{
        min-height:240px;
        aspect-ratio:1 / 1;
        scroll-snap-align:start;
        display:flex;
        flex-direction:column;
    }

    .project-card img{
        height:140px;
        flex:0 0 auto;
    }

    .project-card h3{
        font-size:16px;
        padding:12px 14px 4px;
    }

    .project-card p{
        font-size:12px;
        padding:0 14px 14px;
        margin-top:auto;
    }
}

@media (min-width:1025px){
    .page-references .container{
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
        margin-left: auto;
        margin-right: auto;
    }

    .references-form-section .container,
    .references-list-section .container,
    .references-projects-section .container{
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
    }
}

.site-footer{
    position:relative;
    z-index:10;
}