/* ===== CSS 변수 정의 ===== */
:root {
    /* 기본 색상 */
    --primary-color: #4a90e2;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --hover-color: #357abd;
    
    /* 애니메이션 */
    --transition-speed: 0.3s;
    
    /* 카테고리 색상 */
    --cat-color-1: #4a90e2;
    --cat-color-2: #f5a623;
    --cat-color-3: #7ed957;
    --cat-color-4: #e94e77;
    --cat-color-5: #8f6ed5;
    --cat-color-6: #ffb347;
    --cat-color-7: #50e3c2;
    --cat-color-8: #e67e22;
    
    /* 그림자 */
    --shadow-light: 0 2px 8px rgba(0,0,0,0.07);
    --shadow-medium: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-heavy: 0 4px 32px rgba(0,0,0,0.15);
    
    /* 여백 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* 둥근 모서리 */
    --radius-sm: 0.7rem;
    --radius-md: 1.1rem;
    --radius-lg: 1.2rem;
    --radius-xl: 2rem;
}

/* ===== 기본 리셋 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    transition: background .5s ease;
    overflow-y: scroll;
}

/* ===== 성능 최적화 ===== */
img {
    max-width: 100%;
    height: auto;
    will-change: transform;
    margin-left: auto;
    margin-right: auto;
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(30px);
    }
    80% {
        opacity: 1;
        transform: scale(1.03) translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes sk-bounce {
    0%, 100% { transform: scale(0.0); }
    50% { transform: scale(1.0); }
}

.fade-in {
    animation: fadeIn var(--transition-speed) ease-in;
    will-change: opacity;
}

/* ===== 스크롤 최적화 ===== */
.toc-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* ===== 레이아웃 ===== */
.container, .content, .content-article {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}

.content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    contain: layout style paint;
    justify-items: center;
}

.center-content {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#main-content {
    position: relative;
    min-height: 60vh;
    width: 100%;
    padding-bottom: 150px; /* 플로팅 메뉴 높이만큼 여백 추가 */
}

/* ===== 반응형 이미지 ===== */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ===== 지연 로딩 ===== */
.lazy-load {
    opacity: 0;
    transition: opacity var(--transition-speed) ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* ===== 헤더 스타일 ===== */
h1 {
    text-align: center;
    margin: var(--spacing-lg) 0;
    color: var(--primary-color);
}

h2 {
    color: var(--primary-color);
    margin: var(--spacing-md) 0;
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--border-color);
}

.main-title {
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-color);
}

.main-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #666;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    max-width: 550px;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
}

/* ===== 공통 버튼 ===== */
.btn {
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* ===== 플로팅 메뉴 ===== */
.floating-menu {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-medium);
    padding: var(--spacing-xs) var(--spacing-lg);
    z-index: 1000;
}

.floating-menu button {
    background: none;
    border: none;
    font-size: 1.7rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 50%;
    transition: background 0.2s;
}

.floating-menu button:disabled {
    color: #bbb;
    cursor: not-allowed;
}

.floating-menu button:hover:not(:disabled) {
    background: #f0f4fa;
}

/* 이전/다음 버튼 그룹 */
.nav-arrows {
    display: flex;
    gap: var(--spacing-md);
}

/* ===== 플로팅 메뉴 툴팁 (개선) ===== */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 10px); }
}

.menu-item-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.tooltip-item {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background-color: #4a4238; /* 다크 브라운 */
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.menu-item-wrapper:hover .tooltip-item,
.tooltip-item.show {
    opacity: 1;
    visibility: visible;
}

.tooltip-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #4a4238 transparent transparent transparent; /* 다크 브라운 */
}

/* ===== 카테고리 모달 ===== */
.category-modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-modal .modal-content {
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    background: #fff;
    margin: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    min-width: 340px;
    max-width: 95vw;
    max-height: 80vh;
    overflow: hidden;
    padding: 0;
    animation: modalPopIn 0.38s cubic-bezier(.22,1.12,.62,1.01);
    will-change: opacity, transform;
}

.modal-header {
    width: 100%;
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--spacing-md);
    background: #f7faff;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    border-bottom: 1px solid #e3eaf3;
    position: relative;
    z-index: 2;
}

.close-modal {
    position: static;
    margin-left: auto;
    background: #f7faff;
    border: none;
    font-size: 1.7rem;
    color: #888;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(74,144,226,0.08);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #e3f0ff;
    color: #e94e77;
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--spacing-md) var(--spacing-md);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f7faff;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
    border-radius: 16px;
    background: #f7faff;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 16px;
}

.category-modal ul {
    list-style: none;
    padding: 0;
}

.category-modal li {
    margin-bottom: var(--spacing-xs);
}

/* ===== 카테고리 섹션 ===== */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-section {
    margin-bottom: 1.2em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #e3eaf3;
}

.cat-title {
    flex: 1;
}

.item-list {
    padding-left: 2.7rem;
    margin-top: 0.2rem;
}

.item-btn.active {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.cat-order, .item-order {
    flex-shrink: 0;
    min-width: 2.2em;
    margin-right: 0.5em;
    font-size: 1.08em;
    font-weight: bold;
    text-align: right;
    letter-spacing: -0.5px;
    display: inline-block;
    vertical-align: middle;
}

/* ===== 메뉴 뱃지 ===== */
.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.12em 0.7em;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 1em;
    vertical-align: middle;
    letter-spacing: -0.5px;
    white-space: nowrap;
    min-width: 2em;
    text-align: center;
    line-height: normal;
    margin-left: 0.5em;
    margin-right: 0;
    width: auto !important;
    flex: none !important;
    box-sizing: border-box;
}

.menu-badge.common { background: #e3f2fd; color: #1976d2; border: none; }
.menu-badge.new { background: #f3e5f5; color: #7b1fa2; border: none; }
.menu-badge.disease { background: #ffebee; color: #d32f2f; border: none; }
.menu-badge.badge-management { background: #e0f2f1; color: #00796b; border: none; }
.menu-badge.behavior { background: #fff3e0; color: #f57c00; border: none; }
.menu-badge.health { background: #e1f5fe; color: #0277bd; border: none; }
.menu-badge.special { background: #fce4ec; color: #c2185b; border: none; }

/* ===== 카테고리 색상 ===== */
.cat-order.cat-color-1, .item-order.cat-color-1 { color: var(--cat-color-1); }
.cat-order.cat-color-2, .item-order.cat-color-2 { color: var(--cat-color-2); }
.cat-order.cat-color-3, .item-order.cat-color-3 { color: var(--cat-color-3); }
.cat-order.cat-color-4, .item-order.cat-color-4 { color: var(--cat-color-4); }
.cat-order.cat-color-5, .item-order.cat-color-5 { color: var(--cat-color-5); }
.cat-order.cat-color-6, .item-order.cat-color-6 { color: var(--cat-color-6); }
.cat-order.cat-color-7, .item-order.cat-color-7 { color: var(--cat-color-7); }
.cat-order.cat-color-8, .item-order.cat-color-8 { color: var(--cat-color-8); }

.category-section.cat-color-1 .cat-btn { border-left: none; background: #f5faff; }
.category-section.cat-color-2 .cat-btn { border-left: none; background: #fff8f0; }
.category-section.cat-color-3 .cat-btn { border-left: none; background: #f6fff5; }
.category-section.cat-color-4 .cat-btn { border-left: none; background: #fff5f8; }
.category-section.cat-color-5 .cat-btn { border-left: none; background: #f7f5ff; }
.category-section.cat-color-6 .cat-btn { border-left: none; background: #fffaf5; }
.category-section.cat-color-7 .cat-btn { border-left: none; background: #f5fffd; }
.category-section.cat-color-8 .cat-btn { border-left: none; background: #fffaf5; }

/* ===== 콘텐츠 HTML ===== */
.content-html {
    width: 100%;
    position: relative;
    z-index: 1;
    background: transparent;
}

/* ===== 로딩 스피너 ===== */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100px;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
    background: none;
}

.spinner.fade-out {
    opacity: 0;
}

.double-bounce1, .double-bounce2 {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.6;
    position: absolute;
    animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
    animation-delay: -1.0s;
}

.spinner-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    z-index: 10;
    border-radius: 8px;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ===== 반응형 ===== */
@media (max-width: 700px) {
    .content-article {
        padding: 1.2rem 0.5rem;
    }
    .cat-btn, .item-btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        word-break: break-all;
        overflow-wrap: break-word;
        justify-content: flex-start;
        align-items: center;
        gap: 0.18em;
        padding: 0.6em 0.7em;
    }
    .cat-btn .menu-badge, .item-btn .menu-badge {
        font-size: 0.62em;
        padding: 0.04em 0.22em;
        min-width: 1.1em;
        margin-left: 0.18em;
        flex-shrink: 0;
        line-height: 1.2;
    }
    .cat-btn .cat-title, .item-btn .cat-title {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1em;
        display: flex;
        align-items: center;
        gap: 0.2em;
    }
    .cat-btn .icon, .item-btn .icon {
        flex-shrink: 0;
        margin-right: 0.18em;
        font-size: 1.1em;
        display: inline-block;
        vertical-align: middle;
    }
    .cat-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 1em;
        word-break: break-all;
    }
    .menu-badge {
        flex-shrink: 1;
        min-width: 1.1em;
        font-size: 0.65em;
        padding: 0.06em 0.28em;
        margin-left: 0.2em;
    }
    .category-section {
        padding-left: 0.2em;
        padding-right: 0.2em;
        border-radius: 0.7em;
    }
    .cat-order, .item-order {
        min-width: 2em;
        font-size: 1em;
        margin-right: 0.35em;
    }
}

@media (max-width: 700px) {
  .menu-badge {
      font-size: 0.8em;
      padding: 0.10em 0.6em;
      min-width: 1.5em;
      margin-left: 0.3em;
  }
}

/* ===== 카테고리 버튼 ===== */
.category-section .cat-btn.section {
    width: 100%;
    display: flex;
    align-items: center;
}

.cat-btn:not(.section), .item-btn {
    font-size: 1.02em;
    color: #222;
    background: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(74,144,226,0.07);
    border-radius: 0.9em;
    padding: 0.85em 1.2em;
    margin-bottom: 0.3em;
    display: flex;
    align-items: center;
    gap: 0.7em;
}

/* 카드형 컨텐츠 박스 공통 스타일 */
.card-box, .benefits, .step-guide, .sub-method, .breed-card, .checklist, .fun-fact, .info-box, .highlight, .tip, .references, .management, .cause, .diagnosis, .nutrition, .environment, .challenges, .activity, .health-check, .warning {
    width: 100%;
    max-width: 700px;
    min-width: 320px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 700px) {
  .card-box, .benefits, .step-guide, .sub-method, .breed-card, .checklist, .fun-fact, .info-box, .highlight, .tip, .references, .management, .cause, .diagnosis, .nutrition, .environment, .challenges, .activity, .health-check, .warning {
      max-width: 100%;
      min-width: 0;
      width: 100%;
  }
  .content {
      grid-template-columns: 1fr !important;
  }
}

/* ===== Welcome 페이지 전용 배경 ===== */
body.welcome-background {
    background: linear-gradient(135deg, #f5f0e6 0%, #e6e2d6 100%);
}
.welcome-background .main-title {
    color: #4a4238;
}
.welcome-background .main-subtitle {
    color: #5d554b;
}

/* ===== 섹션 인덱스 스타일 ===== */
.section-index {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-index h3 {
    color: #4a4238;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.section-toc {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.section-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-toc li {
    margin-bottom: 0.5rem;
}

.section-toc button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.section-toc button:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.section-toc .item-number {
    color: var(--primary-color);
    font-weight: 600;
    min-width: 2.5rem;
}

/* Welcome 페이지 섹션 리스트 */
.welcome-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.welcome-section-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.welcome-section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.welcome-section-card h4 {
    color: #4a4238;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-section-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.welcome-section-badges-container {
    margin-top: auto;
    padding-top: 1rem;
}

.welcome-section-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.welcome-section-badge.common { background: #e3f2fd; color: #1976d2; }
.welcome-section-badge.new { background: #f3e5f5; color: #7b1fa2; }
.welcome-section-badge.disease { background: #ffebee; color: #d32f2f; }
.welcome-section-badge.badge-management { background: #e0f2f1; color: #00796b; }
.welcome-section-badge.behavior { background: #fff3e0; color: #f57c00; }
.welcome-section-badge.health { background: #e1f5fe; color: #0277bd; }
.welcome-section-badge.special { background: #fce4ec; color: #c2185b; }

@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }

    .main-subtitle {
        padding: 0 1rem;
    }

    .welcome-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .section-toc button {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .welcome-section-card {
        padding: 1.2rem;
    }

    .welcome-section-card h4 {
        font-size: 1.1rem;
    }
    
    .section-index h3 {
        font-size: 1.2rem;
    }
}

.submit-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto 0;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #868f96 0%, #596164 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.question-warning {
    background-color: #ffebee;
    color: #c62828;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #ef9a9a;
    animation: fadeIn 0.4s ease-out;
}

.needs-answer {
    animation: shake 0.6s;
    border: 1px solid #d32f2f;
    border-radius: 12px;
    background-color: #fff9f9;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Owner Match Quiz Result Card */
.result-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 1.6rem;
}

.breed-card.result {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breed-card.result:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.breed-card.result .breed-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 20px;
  border: 4px solid #f8f0e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.breed-card.result .breed-desc {
  flex-grow: 1;
}

.breed-card.result .breed-desc h4 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  color: #333;
}

.breed-card.result .breed-desc p {
  margin: 0 0 1rem;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.breed-card.result .breed-desc .why {
  font-size: 0.85rem;
  color: #6c757d;
  background-color: #f8f9fa;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  margin: 0;
  border: 1px solid #dee2e6;
}

.breed-card.result .breed-desc .why strong {
  color: #495057;
}

/* Custom Radio Button Styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-group label {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 2px solid #dfe9f5;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  color: #555;
  position: relative;
}

.form-group label:hover {
  border-color: #b0c4de;
  background: #f5f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.form-group label::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #b0c4de;
  border-radius: 50%;
  margin-right: 12px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0;
  transition: background-size 0.2s ease-out, border-color 0.2s ease-out;
  flex-shrink: 0;
}

.form-group label::after {
  display: none;
}

.form-group input[type="radio"]:checked ~ label,
.form-group label:has(input[type="radio"]:checked) {
  border-color: #d97a8c;
  background: #fff0f3;
  color: #333;
  font-weight: 500;
}

.form-group input[type="radio"]:checked ~ label::before,
.form-group label:has(input[type="radio"]:checked)::before {
  border-color: #d97a8c;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 100 80' fill='%23f4acb7' xmlns='http://www.w3.org/2000/svg'%3e%3cellipse cx='50' cy='55' rx='30' ry='20'/%3e%3ccircle cx='18' cy='25' r='10'/%3e%3ccircle cx='38' cy='15' r='10'/%3e%3ccircle cx='62' cy='15' r='10'/%3e%3ccircle cx='82' cy='25' r='10'/%3e%3c/svg%3e");
  background-size: 16px 16px;
}

.form-group input[type="radio"]:focus ~ label,
.form-group label:has(input[type="radio"]:focus) {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 122, 140, 0.3);
}

/* Alternative approach using JavaScript-friendly selectors */
.form-group label.checked {
  border-color: #d97a8c;
  background: #fff0f3;
  color: #333;
  font-weight: 500;
}

.form-group label.checked::before {
  border-color: #d97a8c;
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 100 80' fill='%23f4acb7' xmlns='http://www.w3.org/2000/svg'%3e%3cellipse cx='50' cy='55' rx='30' ry='20'/%3e%3ccircle cx='18' cy='25' r='10'/%3e%3ccircle cx='38' cy='15' r='10'/%3e%3ccircle cx='62' cy='15' r='10'/%3e%3ccircle cx='82' cy='25' r='10'/%3e%3c/svg%3e");
  background-size: 16px 16px;
}

/* Submit Button Enhancement */
.submit-btn {
  background: linear-gradient(135deg, #d97a8c, #f4acb7);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 2rem;
  box-shadow: 0 4px 12px rgba(217, 122, 140, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 122, 140, 0.4);
  background: linear-gradient(135deg, #f4acb7, #d97a8c);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(217, 122, 140, 0.3);
}

/* 
article.content-article {
  padding: 2rem 2.5rem;
  background-color: var(--background-color-content);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
}

.content-article h2 {
  /* ... existing code ... */
/* } */
