/* ==================== MODERN LAW FIRM DESIGN - RENEWED ==================== */

/* ==================== VARIABLES ==================== */
:root {
    --header-height: 5rem;

    /* Modern Professional Color Palette */
    --primary-color: #0b1f35;
    --primary-light: #153957;
    --primary-dark: #061522;
    --secondary-color: #1b3d55;
    --accent-color: #2d5873;
    --accent-light: #d8e7ef;
    
    --text-color: #4a5568;
    --text-light: #718096;
    --text-dark: #2d3748;
    --title-color: #1a202c;
    
    --white-color: #ffffff;
    --body-color: #f7fafc;
    --container-color: #ffffff;
    --border-color: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --title-font: 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --body-font: 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --serif-font: 'Playfair Display', serif;
    
    --biggest-font-size: 4rem;
    --h1-font-size: 3rem;
    --h2-font-size: 2.25rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;

    /* Font Weight */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-black: 900;

    /* Spacing */
    --section-padding: 6rem;
    --container-padding: 1.5rem;

    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    color: var(--text-color);
    background-color: var(--body-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--title-font);
    color: var(--title-color);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

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

button {
    font-family: var(--body-font);
    border: none;
    outline: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

/* ==================== REUSABLE CLASSES ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding) 0;
}

.section__title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    font-weight: var(--font-bold);
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

.section__subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 4rem;
    font-size: 1.125rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50px;
    font-weight: var(--font-semibold);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy);
}

.button--secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.button--secondary:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* ==================== HEADER & NAVIGATION ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-light);
    z-index: var(--z-fixed);
    transition: var(--transition-normal);
}

.header.scroll-header {
    box-shadow: 0 2px 20px var(--shadow-medium);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__logo span {
    color: var(--secondary-color);
}

.nav__logo-img {
    display: block;
    width: auto;
    height: 44px;
    max-width: 180px;
    object-fit: contain;
}

.header.scroll-header .nav__logo-img {
    height: 40px;
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav__link {
    color: var(--text-color);
    font-weight: var(--font-medium);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width var(--transition-normal);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav__toggle,
.nav__close {
    display: none;
}

.language-selector,
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: 1rem;
    padding: 0.42rem 0.72rem;
    background: var(--body-color);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    font-size: 0.82rem;
    font-weight: var(--font-semibold);
    color: var(--text-light);
    transition: var(--transition-normal);
    white-space: nowrap;
}

.language-selector:hover,
.lang-switch:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(11, 31, 53, 0.16);
}

.language-selector:hover .lang-choice,
.lang-switch:hover .lang-choice,
.language-selector:hover .lang-choice.lang-active,
.lang-switch:hover .lang-choice.lang-active {
    color: var(--white-color);
}

.language-selector:hover .lang-divider,
.lang-switch:hover .lang-divider {
    color: rgba(255, 255, 255, 0.48);
}

.lang-choice {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0.08rem 0.1rem;
    color: var(--text-light);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    opacity: 0.58;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.lang-choice,
.lang-choice:hover,
.lang-choice:focus,
.lang-choice:focus-visible,
.lang-choice:active {
    background: transparent;
    box-shadow: none;
}

.lang-choice.lang-active {
    color: var(--primary-color);
    opacity: 1;
}

.lang-choice:hover,
.lang-choice:focus-visible {
    color: var(--white-color);
    opacity: 1;
    outline: none;
}

.lang-divider {
    color: var(--border-color);
    opacity: 0.9;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary-color);
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-image: none;
    background-color: #eef8fc;
    transform: scale(1.02);
}

.hero__pdf-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 48%;
    opacity: 1;
}

.hero__overlay {
    display: none;
}

.hero::before {
    display: none;
}

.hero__container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.65fr);
    gap: 4rem;
    align-items: center;
}

.hero__content {
    color: var(--white-color);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-weight: var(--font-medium);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero__title {
    font-size: clamp(3.4rem, 7vw, 6.8rem);
    color: var(--white-color);
    margin-bottom: 2rem;
    line-height: 0.98;
    font-weight: var(--font-black);
    letter-spacing: -0.055em;
}

.hero__title-line {
    display: block;
}

.hero__title--compact {
    max-width: 980px;
    margin-bottom: 2.25rem;
    font-size: clamp(3rem, 5.4vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero__title--compact .hero__title-line {
    font-size: clamp(3rem, 5.4vw, 4rem);
    white-space: nowrap;
}

.hero__title .highlight {
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.hero__description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero__buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero__button {
    padding: 1.2rem 3rem;
    font-size: 1rem;
}

.hero__button--primary {
    background: var(--secondary-color);
    color: var(--white-color);
}

.hero__button--primary:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(27, 61, 85, 0.3);
}

.hero__button--secondary {
    background: transparent;
    color: var(--white-color);
    border: 2px solid var(--white-color);
}

.hero__button--secondary:hover {
    background: var(--white-color);
    color: var(--primary-color);
}

.hero__image {
    position: relative;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat__item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: var(--transition-normal);
}

.stat__item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat__number {
    font-size: 2.5rem;
    font-weight: var(--font-black);
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat__label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== ABOUT SECTION ==================== */
.about {
    background: var(--white-color);
}

.about__container {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
    gap: 4rem;
    align-items: center;
}

.about__heading .section__title,
.about__heading .section__subtitle {
    text-align: left;
}

.about__heading .section__title {
    font-size: clamp(2.2rem, 3.2vw, 2.5rem);
    line-height: 1.18;
    margin-bottom: 0;
    letter-spacing: -0.035em;
}

.about__heading .section__title::after {
    left: 0;
    transform: none;
    background: var(--primary-color);
}

.about__intro {
    padding: 2.5rem 0 2.5rem 3rem;
    border-left: 1px solid var(--border-color);
}

.about__intro-text {
    margin: 0;
    color: var(--text-dark);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.95;
    word-break: keep-all;
}

.about__image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow-medium);
}

.about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about__image:hover img {
    transform: scale(1.05);
}

.about__content {
    padding: 2rem 0;
}

.about__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1.5rem;
}

.about__description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature__icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.feature__content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.feature__content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==================== SERVICES SECTION ==================== */
.services {
    background: var(--body-color);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

.service__card {
    background: var(--white-color);
    padding: 1.35rem 1.4rem 1.25rem;
    border-radius: 0;
    text-align: left;
    transition: background var(--transition-normal);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service__card::before {
    display: none;
}

.service__card:hover {
    transform: none;
    box-shadow: none;
    background: #f7f8fa;
}

.service__card:hover::before {
    transform: none;
}

.service__number {
    font-size: 0.7rem;
    font-weight: var(--font-semibold);
    letter-spacing: 0.12em;
    color: var(--text-light);
    line-height: 1;
    margin-bottom: 0.65rem;
    opacity: 1;
    font-family: var(--body-font);
}

.service__icon {
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    display: block;
    margin: 0 0 0.7rem;
    font-size: 1.15rem;
    color: var(--secondary-color);
    line-height: 1;
}

.service__card:hover .service__icon {
    transform: none;
}

.service__title {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
    color: var(--title-color);
    line-height: 1.35;
}

.service__description {
    color: var(--text-light);
    line-height: 1.55;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
}

.service__list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
    flex: 1;
}

.service__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.78rem;
    line-height: 1.4;
}

.service__list i {
    display: none;
}

.service__list li::before {
    content: '–';
    color: var(--text-light);
    flex-shrink: 0;
}

.service__link {
    color: var(--secondary-color);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.service__link:hover {
    gap: 0.65rem;
    color: var(--accent-color);
}

/* ==================== PROFESSIONALS SECTION ==================== */
.professionals {
    background: var(--white-color);
}

.professionals__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.professional__card {
    background: var(--white-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--border-color);
    transition: background var(--transition-normal);
}

.professional__card:hover {
    transform: none;
    box-shadow: none;
    background: #f7f8fa;
}

.professional__image {
    position: relative;
    overflow: hidden;
    height: 370px;
    background: var(--body-color);
    border-bottom: 1px solid var(--border-color);
}

.professional__img-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.professional__img-wrapper i {
    font-size: 5rem;
    color: var(--text-light);
}

.professional__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: transform 0.5s ease;
    transform-origin: center 20%;
}

.professional__card:hover .professional__img {
    transform: scale(1.04);
}

.professional__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(26, 26, 46, 0.8));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.professional__card:hover .professional__overlay {
    opacity: 1;
}

.professional__contact {
    width: 44px;
    height: 44px;
    background: var(--secondary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.professional__contact:hover {
    background: var(--accent-color);
    transform: none;
}

.professional__info {
    padding: 1.5rem;
    text-align: center;
}

.professional__name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.professional__position {
    color: var(--secondary-color);
    font-weight: var(--font-semibold);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.professional__divider {
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    margin: 1rem auto;
}

.professional__specialty {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.professional__detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 150px;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--primary-color);
    border-radius: 0;
    color: var(--primary-color);
    font-weight: var(--font-semibold);
    font-size: 0.92rem;
    background: var(--white-color);
    transition: all var(--transition-normal);
}

.professional__detail-link i {
    font-size: 0.85rem;
    transition: transform var(--transition-normal);
}

.professional__detail-link:hover {
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: none;
    transform: none;
}

.professional__detail-link:hover i {
    transform: translateX(4px);
}

.professional__credentials {
    text-align: left;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.professional__credentials li {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.professional__credentials li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.professional__achievements {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
    max-height: 230px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
}

.professional__achievements h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.professional__achievements h5 {
    margin: 0.85rem 0 0.45rem;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: var(--font-semibold);
}

.professional__achievements li {
    position: relative;
    margin-bottom: 0.55rem;
    padding-left: 1rem;
    color: var(--text-color);
    font-size: 0.82rem;
    line-height: 1.55;
}

.professional__achievements li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

.professional__achievements::-webkit-scrollbar {
    width: 6px;
}

.professional__achievements::-webkit-scrollbar-thumb {
    background: rgba(27, 61, 85, 0.28);
    border-radius: 999px;
}

/* ==================== PROFESSIONAL DETAIL PAGES ==================== */
.detail-main {
    background: linear-gradient(180deg, #f7fafc 0%, #ffffff 44%, #f7fafc 100%);
    min-height: 100vh;
    padding-top: var(--header-height);
}

.professional-detail {
    padding-top: 3rem;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

.detail-back:hover {
    color: var(--accent-color);
    transform: translateX(-4px);
}

.detail-hero-card {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) 1fr;
    gap: 3rem;
    align-items: stretch;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(11, 31, 53, 0.12);
}

.detail-photo-panel {
    min-height: 520px;
    background: linear-gradient(135deg, #edf3f7 0%, #d8e7ef 100%);
    overflow: hidden;
}

.detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 16%;
}

.detail-profile-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 4rem 4rem 1rem;
}

.detail-profile-summary .section__subtitle {
    text-align: left;
    margin: 0 0 1rem;
    max-width: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: var(--font-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-name {
    color: var(--title-color);
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-weight: var(--font-bold);
}

.detail-position {
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: var(--font-semibold);
    margin-bottom: 1.25rem;
}

.detail-specialty {
    color: var(--text-color);
    font-size: 1.08rem;
    line-height: 1.8;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-section-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 12px 35px rgba(11, 31, 53, 0.07);
}

.detail-section-card--wide {
    grid-column: 1 / -1;
}

.detail-section-card h2 {
    color: var(--primary-color);
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--accent-light);
}

.detail-list {
    display: grid;
    gap: 0.8rem;
}

.detail-list--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
}

.detail-list li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--text-color);
    line-height: 1.7;
    word-break: keep-all;
}

.detail-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    background: var(--primary-color);
    color: var(--white-color);
}

.contact .section__title {
    color: var(--white-color);
}

.contact .section__subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.contact__container {
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(480px, 1.08fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
    max-width: 1180px;
}

.contact__content {
    width: 100%;
    max-width: 480px;
    min-width: 0;
    justify-self: center;
    grid-column: 1;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.contact .section__header {
    text-align: left;
    margin-bottom: 0.25rem;
}

.contact .section__title {
    text-align: left;
    margin-bottom: 1.75rem;
}

.contact .section__title::after {
    left: 0;
    transform: none;
}

.contact .section__subtitle {
    text-align: left;
    max-width: none;
    margin: 0 0 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact .section__description {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.85;
    margin-top: 2.25rem;
}

.contact__details {
    display: grid;
    gap: 1.25rem;
}

.contact__form-wrapper {
    width: 100%;
    max-width: 670px;
    min-width: 0;
    justify-self: center;
    grid-column: 2;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact__icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white-color);
    flex-shrink: 0;
}

.contact__icon i {
    color: var(--white-color);
}

.contact__text h4,
.contact__details h3 {
    color: var(--white-color);
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.contact__details p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.65;
}

.contact__form {
    background: var(--white-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--title-color);
    font-weight: var(--font-medium);
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    color: var(--text-color);
    transition: var(--transition-normal);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form__textarea {
    resize: vertical;
    min-height: 150px;
}

.form__button {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 10px;
    font-weight: var(--font-semibold);
    font-size: 1rem;
    cursor: pointer;
}

.form__button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--white-color);
    margin-bottom: 1rem;
}

.footer__description {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.social__link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    transition: var(--transition-normal);
}

.social__link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer__title {
    color: var(--white-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer__link:hover {
    color: var(--secondary-color);
    padding-left: 0.5rem;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Renewed footer alignment for current HTML structure */
.footer__container {
    display: block;
    max-width: 1180px;
}

.footer__content {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 2.05fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
    margin-bottom: 3rem;
}

.footer__brand {
    max-width: 390px;
}

.footer__logo-main,
.footer__logo-sub {
    display: block;
}

.footer__logo-main {
    color: var(--white-color);
    font-size: 1.35rem;
    line-height: 1.35;
}

.footer__logo-sub {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.86rem;
    font-weight: var(--font-medium);
    letter-spacing: 0.04em;
}

.footer__links-wrapper {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.8fr) minmax(240px, 1.35fr);
    gap: clamp(1.75rem, 3.5vw, 3rem);
    justify-content: space-between;
}

.footer__links a,
.footer__contact li {
    color: rgba(255, 255, 255, 0.72);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer__links a:hover {
    color: var(--white-color);
    transform: translateX(4px);
}

.footer__contact {
    display: grid;
    gap: 0.85rem;
}

.footer__contact li {
    display: grid;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    line-height: 1.65;
}

.footer__contact i {
    color: var(--accent-light);
    margin-top: 0.25rem;
}

.footer__social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    transition: var(--transition-normal);
}

.footer__social-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.footer__legal {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.footer__legal a:hover {
    color: var(--white-color);
}

/* ==================== SCROLL UP ==================== */
.scrollup {
    position: fixed;
    right: 2rem;
    bottom: -20%;
    background: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-size: 1.25rem;
    box-shadow: 0 5px 20px rgba(27, 61, 85, 0.35);
    transition: var(--transition-normal);
    z-index: var(--z-tooltip);
    cursor: pointer;
}

.scrollup:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

.show-scroll {
    bottom: 3rem;
}

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 1024px) {
    :root {
        --biggest-font-size: 3rem;
        --h1-font-size: 2.5rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.25rem;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__container,
    .about__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact__container {
        grid-template-columns: minmax(260px, 0.88fr) minmax(360px, 1.12fr);
        gap: 2rem;
    }

    .contact__content {
        max-width: 420px;
    }

    .contact__form-wrapper {
        max-width: 600px;
    }

    .hero__image {
        order: -1;
    }

    .footer__content {
        grid-template-columns: minmax(260px, 0.95fr) minmax(0, 2.05fr);
        gap: clamp(2rem, 4vw, 4rem);
    }

    .footer__brand {
        max-width: 390px;
    }

    .footer__links-wrapper {
        grid-template-columns: minmax(145px, 1fr) minmax(110px, 0.8fr) minmax(220px, 1.35fr);
    }

    .detail-hero-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .detail-photo-panel {
        min-height: 560px;
    }

    .detail-profile-summary {
        padding: 3rem;
    }

    .detail-content-grid,
    .detail-list--columns {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        background: var(--white-color);
        width: 80%;
        height: 100vh;
        padding: 6rem 2rem 2rem;
        box-shadow: -2px 0 20px var(--shadow-medium);
        transition: var(--transition-normal);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2rem;
    }

    .nav__toggle,
    .nav__close {
        display: block;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
    }

    .nav__close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }

    .language-selector,
    .lang-switch {
        margin-left: 0;
        margin-top: 0;
        width: fit-content;
    }

    .nav__logo-img {
        height: 38px;
        max-width: 150px;
    }

    .about__intro {
        padding: 1.5rem 0 0;
        border-left: 0;
        border-top: 1px solid var(--border-color);
    }

    .hero__stats {
        grid-template-columns: 1fr;
    }

    .services__grid,
    .professionals__grid {
        grid-template-columns: 1fr;
    }

    .professional__image {
        height: 430px;
    }

    .detail-photo-panel {
        min-height: 480px;
    }

    .detail-profile-summary {
        padding: 2.25rem;
    }

    .detail-actions .button {
        width: 100%;
        justify-content: center;
    }

    .contact__container {
        grid-template-columns: minmax(230px, 0.85fr) minmax(330px, 1.15fr);
        gap: 1.5rem;
        align-items: center;
    }

    .contact__content {
        max-width: 360px;
        justify-self: start;
    }

    .contact__form-wrapper {
        max-width: 520px;
        justify-self: end;
    }

    .contact .section__header,
    .contact .section__title,
    .contact .section__subtitle {
        text-align: left;
    }

    .contact .section__title::after {
        left: 0;
        transform: none;
    }

    .contact__details {
        max-width: none;
        margin: 0;
    }

    .contact__item {
        gap: 1rem;
    }

    .contact__icon {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }

    .contact__form {
        padding: 2.25rem;
    }

    .footer__content,
    .footer__links-wrapper {
        grid-template-columns: 1fr;
    }

    .footer__brand,
    .footer__section {
        max-width: 560px;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }

    .footer__contact li {
        grid-template-columns: 1.1rem minmax(0, max-content);
        justify-content: center;
        text-align: left;
    }

    .footer__bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --biggest-font-size: 2.5rem;
        --h1-font-size: 2rem;
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero__title {
        font-size: clamp(2.8rem, 14vw, 4.2rem);
    }

    .hero__title--compact .hero__title-line {
        font-size: clamp(2.35rem, 10.5vw, 3.35rem);
        white-space: normal;
    }

    .hero__button {
        width: 100%;
        justify-content: center;
    }

    .professional__image {
        height: 380px;
    }

    .professional__info {
        padding: 1.35rem 1.1rem 1.5rem;
    }

    .detail-photo-panel {
        min-height: 390px;
    }

    .detail-section-card {
        padding: 1.5rem;
    }

    .contact {
        --container-padding: 0.75rem;
    }

    .contact__container {
        grid-template-columns: minmax(145px, 0.8fr) minmax(185px, 1.2fr);
        gap: 0.75rem;
        align-items: start;
    }

    .contact__content {
        max-width: none;
        justify-self: stretch;
        grid-column: 1;
    }

    .contact__form-wrapper {
        max-width: none;
        justify-self: stretch;
        grid-column: 2;
    }

    .contact .section__header,
    .contact .section__title,
    .contact .section__subtitle {
        text-align: left;
    }

    .contact .section__title {
        font-size: clamp(1.55rem, 7vw, 2.15rem);
        margin-bottom: 1.25rem;
    }

    .contact .section__title::after {
        left: 0;
        transform: none;
        width: 56px;
    }

    .contact .section__description {
        margin-top: 1.8rem;
        font-size: 0.78rem;
        line-height: 1.65;
    }

    .contact__details {
        max-width: none;
        margin: 0;
        gap: 0.8rem;
    }

    .contact__item {
        gap: 0.55rem;
    }

    .contact__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .contact__text h4,
    .contact__details h3 {
        font-size: 0.82rem;
        margin-bottom: 0.2rem;
    }

    .contact__details p {
        font-size: 0.72rem;
        line-height: 1.55;
        word-break: keep-all;
    }

    .contact__form {
        padding: 1rem;
        border-radius: 14px;
    }

    .form__group {
        margin-bottom: 0.85rem;
    }

    .form__input,
    .form__textarea {
        padding: 0.75rem;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    .form__textarea {
        min-height: 120px;
    }

    .contact__form .button {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        font-size: 0.78rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* ==================== FINAL FOOTER LAYOUT OVERRIDE ==================== */
/* 배포 환경에서도 이전 footer grid 규칙이나 1024px breakpoint에 밀리지 않도록 마지막에 고정합니다. */
.footer .footer__container.container {
    display: block !important;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.footer .footer__content {
    display: grid !important;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2.1fr) !important;
    gap: clamp(2.25rem, 4.5vw, 5rem) !important;
    align-items: start;
    margin-bottom: 0;
}

.footer .footer__brand {
    max-width: 390px;
}

.footer .footer__links-wrapper {
    display: grid !important;
    grid-template-columns: minmax(150px, 1fr) minmax(110px, 0.8fr) minmax(250px, 1.45fr) !important;
    gap: clamp(1.75rem, 3vw, 3rem) !important;
    align-items: start;
}

.footer .footer__bottom {
    display: flex !important;
    width: 100%;
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: left;
}

.footer .footer__copyright {
    max-width: 520px;
}

.footer .footer__legal {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

@media screen and (max-width: 900px) {
    .footer .footer__content,
    .footer .footer__links-wrapper {
        grid-template-columns: 1fr !important;
    }

    .footer .footer__brand,
    .footer .footer__section {
        max-width: 560px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .footer .footer__social {
        justify-content: center;
    }

    .footer .footer__contact li {
        grid-template-columns: 1.1rem minmax(0, max-content);
        justify-content: center;
        text-align: left;
    }

    .footer .footer__bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* ==================== FINAL PROFESSIONAL DETAIL HERO OVERRIDE ==================== */
/* 첨부 레퍼런스처럼 인물 사진이 히어로 배경으로 깔리고, 이름/직위/연락처는 좌측에 명확히 보이도록 구성합니다. */
.detail-main {
    background: #f7fafc;
}

.professional-detail {
    padding-top: 2rem;
}

.detail-hero-card {
    position: relative;
    display: block !important;
    min-height: clamp(520px, 60vh, 680px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #0b1f35;
    box-shadow: 0 24px 80px rgba(11, 31, 53, 0.18);
    isolation: isolate;
}

.detail-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(4, 17, 31, 0.88) 0%, rgba(4, 17, 31, 0.68) 34%, rgba(4, 17, 31, 0.2) 66%, rgba(4, 17, 31, 0.54) 100%),
        linear-gradient(180deg, rgba(4, 17, 31, 0.36) 0%, rgba(4, 17, 31, 0.08) 42%, rgba(4, 17, 31, 0.64) 100%);
    pointer-events: none;
}

.detail-hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at 26% 46%, rgba(255, 255, 255, 0.1), transparent 26%);
    pointer-events: none;
}

.detail-photo-panel {
    position: absolute;
    inset: 0;
    min-height: auto !important;
    margin: 0;
    background: linear-gradient(135deg, #0b1f35 0%, #243d55 100%);
    overflow: hidden;
}

.detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 18%;
    transform: scale(1.02);
    filter: saturate(0.96) contrast(1.03);
}

.detail-profile-summary {
    position: relative;
    z-index: 3;
    width: min(92%, 560px);
    min-height: inherit;
    justify-content: center;
    padding: clamp(4.5rem, 9vw, 7rem) clamp(1.75rem, 5vw, 5.5rem);
    color: var(--white-color);
}

.detail-profile-summary .section__subtitle {
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.08em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.detail-name {
    color: var(--white-color);
    font-size: clamp(3rem, 7vw, 5.5rem);
    text-shadow: 0 7px 34px rgba(0, 0, 0, 0.44);
}

.detail-position {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.34);
}

.detail-specialty {
    color: rgba(255, 255, 255, 0.88);
    border-top-color: rgba(255, 255, 255, 0.28);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.34);
}

.detail-actions .button {
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

.detail-actions .button--secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: var(--white-color);
    backdrop-filter: blur(10px);
}

.detail-actions .button--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.72);
    color: var(--white-color);
}

@media screen and (max-width: 1024px) {
    .detail-hero-card {
        min-height: 600px;
    }

    .detail-profile-summary {
        width: min(94%, 520px);
        padding: 4rem 2.5rem;
    }

    .detail-photo {
        object-position: 62% 18%;
    }
}

@media screen and (max-width: 768px) {
    .professional-detail {
        padding-top: 1.25rem;
    }

    .detail-hero-card {
        min-height: 560px;
    }

    .detail-hero-card::before {
        background:
            linear-gradient(180deg, rgba(4, 17, 31, 0.3) 0%, rgba(4, 17, 31, 0.72) 56%, rgba(4, 17, 31, 0.92) 100%),
            linear-gradient(90deg, rgba(4, 17, 31, 0.35), rgba(4, 17, 31, 0.1));
    }

    .detail-photo {
        object-position: 58% 12%;
    }

    .detail-profile-summary {
        width: 100%;
        min-height: 560px;
        justify-content: flex-end;
        padding: 3rem 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .detail-hero-card {
        min-height: 520px;
    }

    .detail-profile-summary {
        min-height: 520px;
        padding: 2.75rem 1.25rem;
    }

    .detail-name {
        font-size: clamp(2.65rem, 15vw, 4.1rem);
    }

    .detail-specialty {
        font-size: 0.98rem;
    }
}

/* ==================== FINAL DETAIL HERO FULL-WIDTH IMAGE OVERRIDE ==================== */
/* BKL 프로필처럼 상세 상단 이미지는 화면 가로폭 전체를 사용하고, 어두운 반투명 오버레이는 제거합니다. */
.detail-hero-card {
    width: 100vw;
    max-width: none;
    min-height: clamp(320px, 31vw, 460px) !important;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: transparent;
    box-shadow: none;
}

.detail-hero-card::before,
.detail-hero-card::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

.detail-photo-panel {
    background: transparent;
}

.detail-photo {
    object-fit: cover;
    object-position: center center;
    transform: none;
    filter: none;
}

.detail-profile-summary {
    min-height: clamp(320px, 31vw, 460px) !important;
    width: min(92%, 1180px);
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(2.25rem, 4vw, 4.5rem) var(--container-padding);
}

.detail-profile-summary .section__subtitle,
.detail-name,
.detail-position,
.detail-specialty {
    color: var(--white-color);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
}

.detail-profile-summary .section__subtitle {
    font-size: clamp(0.72rem, 1vw, 0.82rem);
    margin-bottom: 0.65rem;
}

.detail-name {
    font-size: clamp(2.15rem, 4.2vw, 3.8rem);
    margin-bottom: 0.65rem;
}

.detail-position {
    font-size: clamp(0.95rem, 1.45vw, 1.15rem);
    margin-bottom: 0.65rem;
}

.detail-specialty {
    border-top: 0;
    padding-top: 0;
    font-size: clamp(0.88rem, 1.25vw, 1rem);
    line-height: 1.65;
}

@media screen and (max-width: 768px) {
    .detail-hero-card {
        min-height: clamp(300px, 48vw, 420px) !important;
    }

    .detail-profile-summary {
        min-height: clamp(300px, 48vw, 420px) !important;
        width: min(92%, 1180px);
        justify-content: center;
        padding: 2rem var(--container-padding);
    }
}

@media screen and (max-width: 480px) {
    .detail-hero-card,
    .detail-profile-summary {
        min-height: 340px !important;
    }

    .detail-name {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .detail-position,
    .detail-specialty {
        font-size: 0.9rem;
    }
}

/* ==================== CALCULATORS PAGE ==================== */
.page-calculators .calc-main {
    --body-font: 'Times New Roman', Times, serif;
    --title-font: 'Times New Roman', Times, serif;
    --serif-font: 'Times New Roman', Times, serif;
    font-family: 'Times New Roman', Times, serif;
}

.page-calculators .calc-main h1,
.page-calculators .calc-main h2,
.page-calculators .calc-main h3,
.page-calculators .calc-main h4,
.page-calculators .calc-main input,
.page-calculators .calc-main select,
.page-calculators .calc-main button,
.page-calculators .calc-main .button,
.page-calculators .calc-main table,
.page-calculators .calc-main .calc-tab,
.page-calculators .calc-main label,
.page-calculators .calc-main p,
.page-calculators .calc-main li,
.page-calculators .calc-main span,
.page-calculators .calc-main td,
.page-calculators .calc-main th {
    font-family: 'Times New Roman', Times, serif;
}

.calc-main { padding-top: var(--header-height); }

.calc-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white-color);
}

.calc-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.calc-back:hover { color: var(--white-color); }
.calc-hero .section__subtitle { color: var(--accent-light); }

.calc-hero__title {
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white-color);
    margin-bottom: 1rem;
}

.calc-hero__intro,
.calc-hero__contact {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
    font-size: 0.95rem;
}

.calc-hero__contact { margin-top: 0.75rem; font-size: 0.875rem; }
.calc-section { padding: 3rem 0 4rem; background: var(--body-color); }

.calc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.calc-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: var(--font-semibold);
    cursor: pointer;
    border-radius: 0;
    transition: var(--transition-fast);
}

.calc-tab:hover { color: var(--primary-color); }

.calc-tab--active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
}

.calc-panel { display: none; }
.calc-panel.active { display: block; }

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.calc-form {
    background: var(--white-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
}

.calc-form__title { font-size: 1.35rem; margin-bottom: 0.25rem; color: var(--title-color); }

.calc-form__stage {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.calc-form__group { margin-bottom: 1.25rem; }

.calc-form__group label {
    display: block;
    font-size: 0.875rem;
    font-weight: var(--font-medium);
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.calc-form__group input,
.calc-form__group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--white-color);
}

.calc-form__group input:focus,
.calc-form__group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.calc-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.calc-form__checks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.calc-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-color);
    cursor: pointer;
}

.calc-check.is-disabled,
.calc-check:has(input:disabled) {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.55;
}

.calc-check input:disabled {
    cursor: not-allowed;
}

.calc-form__hint {
    margin: -0.2rem 0 0.25rem 1.55rem;
    color: var(--text-light);
    font-size: 0.78rem;
    line-height: 1.65;
    word-break: keep-all;
}

.calc-form__hint[hidden] {
    display: none;
}

.calc-check__fee {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-light);
}

.calc-oa-rates {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.calc-oa-rate {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.calc-oa-rate__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.calc-oa-rate__fee {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: right;
}

.calc-form__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.calc-form__actions .button { padding: 0.75rem 1.5rem; font-size: 0.9rem; }

.calc-result {
    background: var(--white-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    min-height: 200px;
    opacity: 0.5;
}

.calc-result--visible { opacity: 1; }
.calc-result__empty { color: var(--text-light); font-size: 0.9rem; }

.calc-result__summary { margin-bottom: 1.5rem; }

.calc-result__total {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.calc-result__total-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.calc-result__total-value {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
}

.calc-result__split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.calc-result__split-item {
    padding: 1rem;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calc-result__split-item--official { border-left: 3px solid var(--accent-color); }
.calc-result__split-item--professional { border-left: 3px solid var(--secondary-color); }
.calc-result__split-item span { font-size: 0.8rem; color: var(--text-light); }
.calc-result__split-item strong { font-size: 1.1rem; color: var(--title-color); }

.calc-result__breakdown h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--title-color); }

.calc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.calc-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.calc-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.calc-table__desc { line-height: 1.5; }
.calc-table__note { font-size: 0.75rem; color: var(--text-light); }

.calc-breakdown-group { margin-bottom: 1.25rem; }

.calc-breakdown-group__title {
    font-size: 0.8rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-color);
}

.calc-table__subtotal { background: var(--body-color); }
.calc-table__subtotal td { padding-top: 0.75rem; border-bottom: none; }

.calc-result__grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    margin-top: 0.75rem;
    border-top: 2px solid var(--primary-color);
    color: var(--title-color);
    font-size: 1rem;
}

.calc-result__grand-total strong { font-size: 1.2rem; color: var(--primary-color); }

.tm-class-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tm-class-rows .calc-form__row {
    grid-template-columns: minmax(90px, 0.8fr) minmax(160px, 1fr) minmax(180px, 1.1fr);
    align-items: end;
    margin-bottom: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tm-class-rows .calc-form__group--check {
    padding-bottom: 0.85rem;
}

.tm-class-rows .calc-form__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calc-notes {
    margin-top: 2.5rem;
    padding: 1.25rem 0;
    background: transparent;
    border-top: 1px solid var(--border-color);
}

.calc-notes h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--title-color); }
.calc-notes h4 { font-size: 0.9rem; margin: 1rem 0 0.5rem; color: var(--text-dark); }
.calc-notes ul { list-style: disc; padding-left: 1.25rem; }
.calc-notes li { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; margin-bottom: 0.35rem; }
.calc-notes__block + .calc-notes__block { margin-top: 1rem; }

@media screen and (max-width: 1024px) {
    .calc-layout { grid-template-columns: 1fr; }
}

@media screen and (max-width: 768px) {
    .calc-tabs { flex-direction: column; }
    .calc-form, .calc-result { padding: 1.5rem; }
    .calc-form__row, .tm-class-rows .calc-form__row, .calc-result__split { grid-template-columns: 1fr; }
    .tm-class-rows .calc-form__group--check { padding-bottom: 0; }
}
