:root{
    --primary:#0D2E5C;
    --primary-light:#17407A;

    --gold:#C8952D;
    --gold-light:#D4A437;

    --dark:#082142;
    --dark-2:#061A35;

    --light:#F8F8F6;
    --white:#FFFFFF;

    --text:#5E6675;
    --border:#E2E5EA;

    --shadow:0 15px 40px rgba(13,46,92,.12);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    font-size:85%;
    scroll-behavior: smooth;
}

body{
    font-family:'Inter',sans-serif;
    background:#FAFAF8;
    color:#222;
    line-height:1.7;
    overflow-x:hidden;
}

h1,h2,h3{
    font-family:'Cinzel',serif;
    font-weight:600;
}

img{
    max-width:100%;
    display:block;
}

.section{
    padding:55px 5%;
}

h2{
    text-align:center;
    font-size:2.3rem;
    color:var(--primary);
    letter-spacing:1px;
}

.line{
    width:70px;
    height:3px;
    background:var(--gold);
    margin:10px auto 20px;
    border-radius:50px;
}

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:1000;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(8,33,66,.96);
    backdrop-filter:blur(18px);

    border-bottom:1px solid rgba(255,255,255,.08);
}

nav ul{
    display:flex;
    list-style:none;
}

nav a{
    display:block;
    padding:20px 24px;
    text-decoration:none;
    color:#fff;
    font-size:.9rem;
    letter-spacing:1.5px;
    text-transform:uppercase;
    transition:.3s;
}

nav a:hover{
    color:var(--gold);
}

.nav-toggle{
    display:none;
    border:none;
    background:none;
    color:#fff;
    font-size:1.8rem;
    cursor:pointer;
}

.hero{
    min-height:100vh;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    text-align:center;

    background:#fff;
}

.hero-brand{
    margin-bottom:30px;
}

.hero-logo{
    width:220px;
    margin:0 auto 20px;
}

.hero h1{
    font-family:'Cinzel',serif;
    font-size:4rem;
    color:var(--primary);
    margin-bottom:5px;
    letter-spacing:2px;
}

.hero-subtitle{
    font-family:'Inter',sans-serif;
    font-size:1.1rem;
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:10px;
    font-weight:600;
}

.hero-divider{
    width:180px;
    height:2px;
    background:var(--gold);
    margin:18px auto;
}

.hero-motto{
    color:var(--primary);
    letter-spacing:4px;
    font-size:.9rem;
    text-transform:uppercase;
}

.btn{
    display:inline-flex;
    align-items:center;
    gap:8px;

    padding:12px 24px;

    background:linear-gradient(
        135deg,
        var(--gold),
        var(--gold-light)
    );

    color:white;
    text-decoration:none;

    border-radius:50px;
    border:none;

    font-size:.9rem;
    font-weight:600;
    letter-spacing:.8px;

    box-shadow:0 8px 20px rgba(200,149,45,.22);

    transition:.3s ease;
}

.btn::before{
    content:"⚖";
    font-size:.85rem;
}

.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 25px rgba(200,149,45,.3);
}

.about-text{
    max-width:900px;
    margin:auto;
    text-align:center;
    color:var(--text);
    font-size:1.02rem;
}

.dark{
    background:var(--dark);
}

.dark h2{
    color:white;
}

.team-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    max-width:1200px;
    margin:auto;

    perspective:1200px;
}

.lawyer-card{
    background:white;
    border-radius:0;
    overflow:hidden;
    box-shadow:var(--shadow);

    transform:
        rotateY(180deg)
        rotateX(15deg)
        scale(.75);

    opacity:0;

    transition:
        transform 1.2s cubic-bezier(.2,.8,.2,1),
        opacity 1.2s ease;
}

.lawyer-card.reveal{
    transform:
        rotateY(0deg)
        rotateX(0deg)
        scale(1);

    opacity:1;
}

.lawyer-card img{
    width:100%;
    height:340px;
    object-fit:cover;

    backface-visibility:hidden;
}

.lawyer-content{
    padding:16px;
    text-align:center;

    backface-visibility:hidden;
}

.lawyer-content h3{
    color:var(--primary);
    font-size:1rem;
    margin-bottom:8px;
}

.lawyer-content p{
    color:var(--text);
    font-size:.82rem;
    line-height:1.5;
}

.practice-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:22px;
    max-width:1200px;
    margin:auto;
}

.practice-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:4px;
    overflow:hidden;
    cursor:pointer;

    padding:0;

    transition:.3s;
}

.practice-card:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.practice-card h3{
    background:var(--primary);
    color:white;

    padding:12px;
    margin:0;

    text-align:center;
    font-size:.95rem;
}

.practice-card h3::before {
    content: "› ";
    color: var(--gold);
    display: inline-block;
    transition: transform 0.3s ease;
    transform-origin: left center;
}

.practice-card:hover h3::before {
    transform: scale(3) translateX(4px);
}

.practice-card p{
    padding:12px;
    margin:0;

    color:var(--text);
    text-align:left;
    font-size:.82rem;
    line-height:1.4;
}

.practice-details{
    display:none;
}

.practice-modal{
    position:fixed;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(0,0,0,.75);

    opacity:0;
    visibility:hidden;

    transition:.3s;
    z-index:9999;
}

.practice-modal.show{
    opacity:1;
    visibility:visible;
}

.modal-card{
    width:min(92%,600px);

    background:white;
    border:1px solid var(--border);
    border-radius:4px;
    overflow:hidden;
    padding:0;

    position:relative;

    box-shadow:0 15px 40px rgba(0,0,0,.15);

    transform:translateY(20px);
    transition:.3s;
}

.practice-modal.show .modal-card{
    transform:translateY(0);
}

.modal-card h3{
    background:var(--primary);
    color:white;
    position:relative;

    margin:0;
    padding:14px 20px;

    text-align:center;
    font-size:1.1rem;
}

.modal-card h3::after{
    content:"";
    position:absolute;
    bottom:0;
    left:0;

    width:100%;
    height:3px;

    background:var(--gold);
}

.modal-card p{
    padding:20px;
    color:var(--text);
    line-height:1.7;
    font-size:.9rem;
}

.close-modal{
    position:absolute;
    top:8px;
    right:14px;

    width:32px;
    height:32px;

    border:none;
    background:rgba(255,255,255,.15);

    color:white;

    border-radius:50%;

    font-size:1.4rem;
    line-height:1;
    cursor:pointer;

    transition:.3s;
}

.close-modal:hover{
    background:rgba(255,255,255,.3);
}

.contact-actions{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:40px;
}

.action-card{
    text-decoration:none;
    color:white;

    display:flex;
    flex-direction:column;
    align-items:center;

    transition:.3s;
}

.action-card:hover{
    transform:translateY(-5px);
}

.action-card img{
    width:48px;
    height:48px;
    margin-bottom:10px;
}

.action-card span{
    font-size:.9rem;
}

footer{
    background:var(--dark);
    color:white;
    text-align:center;
    padding:25px;
    font-size:.7rem;
}

.contact-wrapper{
    max-width:1100px;
    margin:auto;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:50px;
}

.contact-location{
    display:flex;
    align-items:center;
    gap:15px;

    background:rgba(255,255,255,.05);
    border:1px solid rgba(200,149,45,.25);

    padding:18px 22px;
    border-radius:16px;

    min-width:320px;
}

.contact-location{
    text-decoration:none;
    cursor:pointer;
    transition:.3s;
}

.contact-location:hover{
    transform:translateY(-3px);
    border-color:var(--gold);
}

.contact-location img{
    width:45px;
    height:45px;
    flex-shrink:0;

    animation: softPulse 2.5s infinite;
    border-radius:50%;
    background:rgba(122,122,166,.12);
    padding:10px;
}

.contact-location h3{
    color:var(--gold);
    font-size:1rem;
    margin-bottom:4px;
}

.contact-location p{
    color:white;
    font-size:.82rem;
    line-height:1.5;
}

.contact-actions{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:35px;
}

.scroll-text{
    position:absolute;
    bottom:15px;
    left:50%;
    transform:translateX(-50%);

    color:white;
    text-decoration:none;
    font-size:.8rem;
    letter-spacing:4px;
    font-weight:600;

    animation:scrollPulse 1.8s infinite;
}

.scroll-text::after{
    content:"";
    display:block;
    width:2px;
    height:30px;
    background:white;
    margin:8px auto 0;

    animation:scrollLine 1.8s infinite;
}

.consult-btn{
    display:flex;
    align-items:center;
    gap:10px;

    margin-top:25px;
    margin-left:auto;
    width:fit-content;

    text-decoration:none;

    background:var(--gold);
    color:white;

    padding:12px 18px;
    border-radius:120px;

    font-weight:600;
    transition:.3s;
}

.consult-btn:hover{
    background:var(--gold-light);
    transform:translateY(-2px);
}

.consult-btn img{
    width:16px;
    height:16px;
    object-fit:contain;
}

.scroll-top{
    position:fixed;
    bottom:25px;
    right:25px;

    width:50px;
    height:50px;

    border:none;
    border-radius:50%;

    background:var(--gold);
    color:white;

    font-size:20px;
    font-weight:bold;

    cursor:pointer;

    box-shadow:0 10px 25px rgba(0,0,0,.2);

    opacity:0;
    visibility:hidden;
    transform:translateY(20px);

    transition:.3s ease;

    z-index:9999;
}

.scroll-top.show{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.scroll-top:hover{
    background:var(--gold-light);
    transform:translateY(-3px);
}

.floating-msg-btn{
    position:fixed;
    bottom:90px;
    right:25px;

    width:55px;
    height:55px;
    border-radius:50%;
    border:none;
    background:var(--primary);
    color:white;
    font-size:22px;
    cursor:pointer;
    box-shadow:0 10px 25px rgba(0,0,0,.25);
    z-index:9999;

    opacity:0;
    visibility:hidden;
    transform:translateY(20px);
    transition:.3s ease;
}

.floating-msg-btn.show{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.msg-popup{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:10000;
}

.msg-popup.show{
    display:flex;
}

.msg-box{
    width:90%;
    max-width:400px;
    background:white;
    padding:20px;
    border-radius:12px;
    position:relative;
}

.msg-box h3{
    margin-bottom:15px;
    color:var(--primary);
    text-align:center;
}

.msg-box input,
.msg-box textarea{
    width:100%;
    margin-bottom:10px;
    padding:10px;
    border:1px solid #ddd;
    border-radius:6px;
    font-family:inherit;
}

.msg-box textarea{
    height:100px;
    resize:none;
}

.msg-box button[type="submit"]{
    width:100%;
    padding:12px;
    background:var(--primary);
    color:white;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

.close-msg{
    position:absolute;
    top:10px;
    right:10px;
    border:none;
    background:none;
    font-size:22px;
    cursor:pointer;
}

@keyframes scrollPulse{

    0%,100%{
        opacity:1;
        transform:translateX(-50%) translateY(0);
    }

    50%{
        opacity:.6;
        transform:translateX(-50%) translateY(5px);
    }

}

@keyframes scrollLine{

    0%{
        opacity:0;
        height:10px;
    }

    50%{
        opacity:1;
        height:30px;
    }

    100%{
        opacity:0;
        height:10px;
    }

}

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(122,122,166,.25);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(122,122,166,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(122,122,166,0);
    }
}


@media (max-width:768px){

    header{
        height:55px;
        justify-content:flex-end;
        padding:0 15px;
        position:fixed;
    }

    .nav-toggle{
        display:block;
        margin-left:auto;
        font-size:2rem;
        z-index:1001;
    }

    nav ul{
    position:fixed;
    top:70px;
    right:-300px;

    width:210px;

    background:white;
    flex-direction:column;

    border-radius:12px;

    box-shadow:0 10px 30px rgba(0,0,0,.12);

    transition:.3s ease;
}

nav ul.active{
    right:15px;
}

nav a{
    color:var(--primary);
    padding:16px 20px;
    border-bottom:1px solid var(--border);
}

nav li:last-child a{
    border-bottom:none;
}

    nav li{
        width:100%;
    }

    nav a{
    width:100%;
    padding:12px 20px;
    font-size:.85rem;
}

    .section{
        padding:45px 20px;
    }

    h2{
        font-size:1.9rem;
    }

    .hero-logo{
        width:160px;
    }

    .hero h1{
        font-size:2rem;
    }

    .hero-subtitle{
        font-size:.9rem;
        letter-spacing:6px;
    }

    .hero-motto{
        font-size:.75rem;
        letter-spacing:2px;
    }

    .btn{
        padding:14px 28px;
    }

    .team-grid{
    display:flex;
    overflow-x:auto;
    gap:14px;
    align-items:center;

    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;

    padding:10px 16px;

    scroll-padding: 0 16px;
    scrollbar-width:none;
    }

    .team-grid::-webkit-scrollbar{
    display:none;
    }

    .lawyer-card{
    flex:0 0 80%;
    max-width:260px;

    scroll-snap-align:center;
    scroll-snap-stop:always;
    }

    .lawyer-card img{
        height:260px;
    }

    .lawyer-content{
        padding:8px;
    }

    .lawyer-content h3{
        font-size:.75rem;
        margin-bottom:4px;
    }

    .lawyer-content p{
        font-size:.58rem;
        line-height:1.3;
    }

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

    .practice-card{
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .practice-card h3{
        width: 100%;
        font-size: 0.9rem;
    }

    .practice-card p{
        display: none;
    }

    .contact-wrapper{
        display:flex;
        flex-direction:column;
        gap:25px;
    }

    .contact-actions{
        order:1;

        display:flex;
        flex-wrap:nowrap;
        justify-content:center;
        gap:10px;

        width:100%;
    }

    .contact-location{
        order:2;

        width:100%;
        max-width:450px;

        margin:auto;

        text-align:center;
        flex-direction:column;
    }

    .action-card{
        width:55px;
        height:55px;

        border-radius:50%;
        background:white;

        display:flex;
        justify-content:center;
        align-items:center;

        border:2px solid var(--gold);

        flex-shrink:0;
    }

    .action-card img{
        width:22px;
        height:22px;
        margin:0;
    }

    .action-card span{
        display:none;
    }

    .contact-location{
        width:100%;
        max-width:400px;

        flex-direction:column;
        text-align:center;

        padding:20px;
    }

    .contact-location img{
        width:42px;
        height:42px;
        margin:auto;
    }

    .modal-card{
    width:95%;
    }

    .modal-card h3{
    padding:12px 45px 12px 15px;
    font-size:.9rem;
    }

    .modal-card p{
    padding:15px;
    font-size:.8rem;
    line-height:1.6;
    }

    .scroll-text{
        display:block;
        bottom:20px;
        font-size:.7rem;
    }
}