/* =========================================================
   DESIGN SYSTEM
   ========================================================= */

:root {
    color-scheme: light;

    --background: #edf2f7;
    --surface: #ffffff;
    --ink: #172c43;
    --muted: #526276;

    --primary: #173b59;
    --primary-hover: #102b42;
    --accent: #896024;

    --border: rgba(35, 61, 88, 0.15);
    --glass-border: rgba(255, 255, 255, 0.82);

    --shadow: 0 16px 45px rgba(27, 49, 75, 0.09);
    --shadow-hover: 0 24px 60px rgba(27, 49, 75, 0.15);

    --radius: 24px;
    --radius-small: 14px;

    --container: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 145px;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.site-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
}

.site-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 8% 12%,
            rgba(153, 190, 225, 0.36),
            transparent 45%
        ),
        radial-gradient(
            ellipse at 94% 30%,
            rgba(220, 194, 149, 0.25),
            transparent 42%
        ),
        linear-gradient(160deg, #f5f7fa, #eaf0f6);
}

[hidden] {
    display: none !important;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--primary);
    text-underline-offset: 0.2em;
}

a,
button,
input,
textarea,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #245c93;
    outline-offset: 5px;
}

::selection {
    color: #ffffff;
    background: var(--primary);
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    text-wrap: balance;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -0.035em;
}

h1 {
    margin-bottom: 1.4rem;
    font-size: clamp(2.4rem, 5.3vw, 4.9rem);
}

h2 {
    margin-bottom: 1.1rem;
    font-size: clamp(1.8rem, 3.4vw, 2.65rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    width: min(calc(100% - 2.5rem), var(--container));
    margin-inline: auto;
}

.site-main {
    min-height: 60vh;
    padding-bottom: 4rem;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 15px;
    z-index: 1000;
    padding: 0.75rem 1.1rem;
    color: #ffffff;
    background: var(--primary);
    border-radius: 10px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* =========================================================
   SUPRAFEȚE GLASS
   ========================================================= */

.glass-card,
.related-card,
.content-section,
.contact-banner,
.hero-panel,
.lawyer-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@supports (
    (backdrop-filter: blur(16px))
    or (-webkit-backdrop-filter: blur(16px))
) {
    .glass-card,
    .hero-panel,
    .lawyer-card,
    .related-card {
        background: rgba(255, 255, 255, 0.73);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}

.eyebrow {
    margin-bottom: 0.8rem;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading {
    max-width: 740px;
    margin-bottom: 1.8rem;
}

.section-intro,
.lead {
    color: var(--muted);
    font-size: clamp(1.05rem, 1.6vw, 1.18rem);
}

.button,
.menu-toggle,
.flip-card__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.8rem 1.25rem;

    border: 1px solid transparent;
    border-radius: var(--radius-small);

    font-weight: 650;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;

    transition:
        transform 180ms var(--ease),
        background-color 180ms ease,
        box-shadow 180ms ease;
}

.button--primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 22px rgba(23, 59, 89, 0.18);
}

.button--secondary,
.flip-card__toggle {
    color: var(--primary);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.86);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

@media (hover: hover) {
    .button:hover,
    .flip-card__toggle:hover {
        transform: translateY(-3px);
    }

    .button--primary:hover {
        color: #ffffff;
        background: var(--primary-hover);
        box-shadow: 0 12px 28px rgba(23, 59, 89, 0.24);
    }

    .button--secondary:hover,
    .flip-card__toggle:hover {
        background: #ffffff;
    }
}

/* =========================================================
   ANTET ȘI NAVIGARE
   ========================================================= */

.site-header {
    position: sticky;
    top: 12px;
    z-index: 50;

    width: min(calc(100% - 1.5rem), 1320px);
    margin: 12px auto 0;

    border: 1px solid var(--glass-border);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 30px rgba(27, 49, 75, 0.06);

    transition: box-shadow 200ms ease;
}

@supports (
    (backdrop-filter: blur(20px))
    or (-webkit-backdrop-filter: blur(20px))
) {
    .site-header {
        background: rgba(255, 255, 255, 0.84);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

.site-header.is-scrolled {
    box-shadow: 0 14px 40px rgba(27, 49, 75, 0.13);
}

.header-inner {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 1.25rem;
    padding-block: 1rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.site-brand__mark {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;

    border: 1px solid rgba(137, 96, 36, 0.28);
    border-radius: 15px;

    color: var(--accent);
    background: linear-gradient(135deg, #fffdf8, #ece5d9);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.site-brand__logo {
    width: 50px;
    max-height: 58px;
    object-fit: contain;
}

.site-brand__text {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.site-brand__name {
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.35;
}

.site-brand__location {
    color: var(--muted);
    font-size: 0.75rem;
}

.site-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.65rem;

    border-radius: 11px;
    color: var(--muted);

    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;

    transition: background-color 180ms ease, color 180ms ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--primary);
    background: rgba(23, 59, 89, 0.08);
}

.header-phone {
    display: grid;
    color: var(--ink);
    line-height: 1.4;
    text-decoration: none;
}

.header-phone__label {
    color: var(--muted);
    font-size: 0.7rem;
}

.header-phone__number {
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 750;
}

.menu-toggle {
    display: none;
    color: var(--primary);
    border-color: var(--border);
    background: #ffffff;
}

/* =========================================================
   BREADCRUMBS ȘI PAGINI
   ========================================================= */

.breadcrumbs {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
    content: "/";
    margin-right: 0.65rem;
    opacity: 0.45;
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.page-hero {
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

.page-hero__content {
    max-width: 850px;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding-block: clamp(3rem, 7vw, 6rem);
}

.hero-copy,
.hero-panel {
    min-width: 0;
}

.hero-panel {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-panel__name {
    margin-bottom: 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
}

.hero-panel__portrait,
.profile-portrait {
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-bottom: 1.5rem;
    border-radius: 18px;
    object-fit: cover;
}

.portrait-placeholder {
    display: grid;
    min-height: 250px;
    margin-bottom: 1.5rem;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;

    color: rgba(23, 59, 89, 0.7);
    background:
        radial-gradient(circle at 25% 20%, #ffffff, transparent 65%),
        linear-gradient(135deg, #d9e5f0, #e9e2d6);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 5rem;
    letter-spacing: -0.08em;
}

.section {
    padding-block: 2rem;
}

.content-flow {
    display: grid;
    gap: 2rem;
}

.content-section {
    padding: clamp(1.5rem, 4vw, 2.8rem);
}

.content-section > p,
.content-section > ul {
    max-width: 80ch;
}

.content-section > :last-child {
    margin-bottom: 0;
}

.content-list {
    padding-left: 1.3rem;
}

.content-list li + li {
    margin-top: 0.55rem;
}

.related-grid,
.card-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.related-card,
.lawyer-card {
    min-width: 0;
    padding: 1.6rem;
    transition:
        opacity 550ms var(--ease),
        transform 550ms var(--ease),
        box-shadow 200ms ease;
}

.related-card h3 a,
.lawyer-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.related-card h3 a:hover,
.lawyer-card h3 a:hover {
    text-decoration: underline;
}

.related-card p,
.lawyer-card p {
    color: var(--muted);
    font-size: 0.94rem;
}

@media (hover: hover) {
    .related-card:hover,
    .lawyer-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
    }
}

.contact-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 3rem);

    background:
        linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.96),
            rgba(221, 233, 244, 0.92)
        );
}

.contact-banner > div {
    max-width: 680px;
}

.contact-banner p:last-child {
    margin-bottom: 0;
}

.contact-banner > .button {
    flex-shrink: 0;
}

/* =========================================================
   CARDURI CARE SE ÎNTORC
   ========================================================= */

.flip-card {
    min-width: 0;
    perspective: 1200px;
}

.flip-card__face {
    padding: 1.8rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.flip-card__back {
    margin-top: 1rem;
}

.flip-ready .flip-card__inner {
    display: grid;
    transform-style: preserve-3d;
    transition: transform 650ms var(--ease);
}

.flip-ready .flip-card__face {
    display: flex;
    flex-direction: column;
    grid-area: 1 / 1;
    min-height: 340px;

    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-ready .flip-card__back {
    margin-top: 0;
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #fdfcf8, #e4edf5);
}

.flip-ready.is-flipped .flip-card__inner {
    transform: rotateY(180deg);
}

.flip-card__face .button {
    align-self: flex-start;
    margin-top: auto;
}

.flip-card__toggle {
    width: 100%;
    margin-top: 0.8rem;
}

/* =========================================================
   MODALE
   ========================================================= */

html.is-modal-open {
    overflow: hidden;
}

.glass-modal {
    width: min(calc(100% - 2rem), 760px);
    max-height: 85vh;
    max-height: 85dvh;
    margin: auto;
    padding: 0;

    overflow: auto;
    overscroll-behavior: contain;

    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 26px;
    background: #f8fafc;
    box-shadow: 0 35px 120px rgba(8, 25, 45, 0.3);
}

.glass-modal[open] {
    animation: modal-enter 240ms var(--ease);
}

.glass-modal::backdrop {
    background: rgba(12, 28, 49, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;

    padding: 1.4rem 1.6rem;
    border-bottom: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.97);
}

.modal-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.modal-close {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;

    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #ffffff;

    font-size: 1.6rem;
    line-height: 1;
}

.modal-close:hover {
    background: #e7edf3;
}

.modal-body {
    padding: 1.6rem;
}

.modal-body .content-section {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.modal-body > :last-child,
.modal-body > :last-child > :last-child {
    margin-bottom: 0;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   ANIMAȚII LA DERULARE
   ========================================================= */

.content-section,
.contact-banner,
[data-reveal] {
    transition:
        opacity 550ms var(--ease),
        transform 550ms var(--ease);
}

.reveal-pending {
    opacity: 0;
    transform: translateY(20px);
}

/* =========================================================
   FORMULARE ȘI ELEMENTE UTILE
   ========================================================= */

.form-grid,
.contact-grid,
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.form-field label {
    font-weight: 650;
}

input,
textarea,
select {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem;
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-block: 1rem;
}

details {
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
}

details + details {
    margin-top: 0.8rem;
}

summary {
    cursor: pointer;
    font-weight: 650;
}

details[open] summary {
    margin-bottom: 1rem;
}

/* =========================================================
   SUBSOL
   ========================================================= */

.site-footer {
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
}

.footer-brand__name {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    line-height: 1.3;
    text-decoration: none;
}

.footer-brand p,
.footer-contact {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-heading {
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: 0;
}

.footer-links,
.footer-social {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: 0.5rem;
}

.footer-links a,
.footer-contact a,
.footer-social a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-social a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-address {
    margin-bottom: 1rem;
    font-style: normal;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding-block: 1.4rem;
    border-top: 1px solid var(--border);

    color: var(--muted);
    font-size: 0.8rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .header-phone {
        display: none;
    }

    .site-nav {
        grid-column: 1 / -1;
    }

    .site-nav__list {
        justify-content: flex-start;
    }

    .nav-ready .menu-toggle {
        display: inline-flex;
    }

    .nav-ready:not(.is-nav-open) .site-nav {
        display: none;
    }

    .nav-ready .site-nav__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .nav-ready .site-nav__link {
        width: 100%;
        padding: 0.8rem;
    }

    .related-grid,
    .card-grid,
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    html {
        scroll-padding-top: 125px;
    }

    .container {
        width: min(calc(100% - 2rem), var(--container));
    }

    .site-header {
        top: 8px;
        margin-top: 8px;
        border-radius: 18px;
    }

    .header-inner {
        gap: 0.8rem;
        padding-block: 0.8rem;
    }

    .site-brand__mark {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .site-brand__name {
        font-size: 0.82rem;
    }

    .site-brand__location {
        font-size: 0.7rem;
    }

    .menu-toggle {
        min-height: 44px;
        padding: 0.65rem 0.8rem;
        font-size: 0.85rem;
    }

    .home-hero,
    .profile-grid,
    .contact-grid,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        gap: 2rem;
    }

    .hero-panel {
        max-width: 480px;
        width: 100%;
    }

    .related-grid,
    .card-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .contact-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-banner > .button {
        width: 100%;
    }

    .footer-grid {
        gap: 2rem;
    }

    .modal-header,
    .modal-body {
        padding: 1.2rem;
    }
}

/* =========================================================
   MIȘCARE REDUSĂ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal-pending {
        opacity: 1;
        transform: none;
    }
}