/* Page Specific Overrides */
body {
    background-color: #fafafa;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* Ensure page-estimate class allows scrolling and has proper font rendering */
.page-estimate {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

html {
    overflow-y: auto !important;
    height: auto !important;
}

/* Navigation Override for Estimate Page */
body .navbar,
html .navbar,
.navbar.navbar {
    background-color: #ffffff !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Logo and text color fixes */
.navbar .brand-name {
    color: #1a1a1a !important;
}

.navbar .brand-tagline {
    color: #666 !important;
}

.navbar .nav-link {
    color: #1a1a1a !important;
    padding: 10px 18px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    border-radius: 25px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.3s ease !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

.navbar .nav-link:hover {
    color: #d4af8c !important;
    background: rgba(212, 175, 140, 0.1) !important;
    border-color: rgba(212, 175, 140, 0.3) !important;
}

.navbar .nav-link.active {
    color: white !important;
    background: #d4af8c !important;
    border-color: #d4af8c !important;
    font-weight: 400 !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* Specific styling for estimate navigation */
.navbar .nav-link.estimate-nav.active,
.navbar .nav-link.estimate-nav {
    background: transparent !important;
    color: #333333 !important;
    border-radius: 0 !important;
    padding: 8px 16px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    margin: 0 !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    border: none !important;
}

/* 홈페이지에서는 흰색 텍스트 + 투명한 배경 + 굵은 글자 */
body.page-home .navbar .nav-link.estimate-nav {
    color: white !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    font-weight: 400 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
}

/* Consultation navigation styling */
.navbar .nav-link.consultation-nav {
    background: transparent !important;
    color: #333333 !important;
    border-radius: 0 !important;
    padding: 8px 16px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    margin: 0 !important;
    border: none !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* 홈페이지에서는 흰색 텍스트 + 투명한 배경 + 굵은 글자 */
body.page-home .navbar .nav-link.consultation-nav {
    color: white !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    font-weight: 400 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
}

/* =================================================== */
/* 🎯 모든 네비게이션 메뉴 완전 통일 - 최고 우선순위 */
/* =================================================== */
html body .navbar .nav-link,
html body .nav-item .nav-link,
html body .nav-menu .nav-link,
html body .navbar .nav-link.estimate-nav,
html body .navbar .nav-link.consultation-nav,
html body .nav-item .nav-link.estimate-nav,
html body .nav-item .nav-link.consultation-nav,
html body .navbar .nav-link.estimate-nav.active,
html body .navbar .nav-link.consultation-nav.active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    transform: none !important;
    filter: none !important;
    color: #333333 !important;
}

/* 🏠 홈페이지에서 네비게이션 텍스트 강제 검정색 적용 - 최고 우선순위 */
html body.page-home .navbar .nav-link,
html body.page-home .nav-item .nav-link,
html body.page-home .nav-menu .nav-link,
html body.page-home .navbar .nav-link.estimate-nav,
html body.page-home .navbar .nav-link.consultation-nav,
html body.page-home .nav-item .nav-link.estimate-nav,
html body.page-home .nav-item .nav-link.consultation-nav {
    color: #000000 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    font-weight: 400 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    font-family: 'Noto Sans KR', 'Roboto', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif !important;
}

html body .navbar .nav-link:hover,
html body .nav-item .nav-link:hover {
    color: #666666 !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Logo Styles - styles.css 기본 스타일 사용 */

/* Remove after effects */
.navbar .nav-link::after {
    display: none !important;
}

/* 🔧 FORCE 네비게이션 폰트 굵기 400 - 최상위 우선순위 */
html body .navbar .nav-link,
html body .navbar .nav-link.estimate-nav,
html body .navbar .nav-link.consultation-nav,
html body .navbar .nav-link.active,
html body .navbar .nav-link.estimate-nav.active,
html body .navbar .nav-link.consultation-nav.active,
html body .nav-item .nav-link,
html body .nav-menu .nav-link {
    font-weight: 400 !important;
}

.cta-button {
    background: linear-gradient(135deg, #d4af8c, #c19a6b) !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    letter-spacing: -0.3px !important;
    border: 1px solid transparent !important;
    margin: 0 2px !important;
}

.cta-button::after {
    display: none !important;
}

.cta-button:hover {
    background: linear-gradient(135deg, #c19a6b, #a68660) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 85px;
        left: -120%;
        width: 100vw;
        height: calc(100vh - 85px);
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 3rem 0;
        box-shadow: none;
        z-index: 999999;
        transition: left 0.3s ease;
        overflow-y: auto;
        display: flex;
        transform: translateX(-20px);
        visibility: hidden;
    }

    .nav-menu.active {
        left: 0;
        transform: translateX(0);
        visibility: visible;
    }

    .nav-item {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }
    
    .nav-item:last-child {
        border-bottom: none !important;
    }
    
    .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 20px 40px !important;
        font-size: 18px !important;
        font-weight: 400 !important;
        text-align: center !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .nav-menu .nav-link:not(.estimate-nav):not(.consultation-nav),
    .nav-menu.active .nav-link:not(.estimate-nav):not(.consultation-nav) {
        color: #000000 !important;
        background: rgba(240, 240, 240, 0.05) !important;
        text-decoration: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        font-weight: 400 !important;
    }
    
    .nav-menu .nav-link:not(.estimate-nav):not(.consultation-nav):hover,
    .nav-menu.active .nav-link:not(.estimate-nav):not(.consultation-nav):hover {
        color: #d4af8c !important;
        background: rgba(212, 175, 140, 0.15) !important;
    }
    
    /* 모바일 메뉴의 특별 버튼들 색상 */
    .nav-menu .estimate-nav,
    .nav-menu.active .estimate-nav {
        color: white !important;
        background: linear-gradient(135deg, #d4af8c, #c19a6b) !important;
        border-radius: 25px !important;
    }
    
    .nav-menu .consultation-nav,
    .nav-menu.active .consultation-nav {
        color: white !important;
        background: linear-gradient(135deg, #007bff, #0056b3) !important;
        border-radius: 25px !important;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Main Content */
.estimate-container {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
    height: auto;
    overflow-y: visible;
}

/* Header */
.estimate-header {
    background: linear-gradient(135deg, #d4af8c 0%, #c19a6b 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.estimate-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.estimate-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    max-width: 600px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Form */
.estimate-form {
    padding: 40px 0;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #d4af8c;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Option Grid */
.option-grid {
    display: grid;
    gap: 16px;
}

.plan-options {
    grid-template-columns: repeat(3, 1fr);
}

.area-options {
    grid-template-columns: repeat(6, 1fr);
}

.area-options .option-button {
    font-size: 1rem;
    padding: 24px 16px;
}

.extension-options {
    grid-template-columns: repeat(4, 1fr);
}

.status-options {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.material-options {
    grid-template-columns: repeat(3, 1fr);
}

.renovation-options {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Option Cards */
.option-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.option-card:hover {
    border-color: #d4af8c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 140, 0.15);
}

.option-card.selected {
    border-color: #d4af8c;
    background: #faf9f7;
    box-shadow: 0 8px 25px rgba(212, 175, 140, 0.2);
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.option-header {
    margin-bottom: 20px;
}

.option-header h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.option-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4af8c;
}

.option-content ul {
    list-style: none;
    text-align: left;
}

.option-content li {
    padding: 4px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.option-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #d4af8c;
    font-weight: 700;
}

/* Option Buttons */
.option-button {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c2c2c;
    font-family: inherit;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.option-button:hover {
    border-color: #d4af8c;
    background: #faf9f7;
}

.option-button.selected {
    border-color: #d4af8c;
    background: #d4af8c;
    color: white;
}

/* Material Cards */
.material-card {
    text-align: center;
}

.material-image {
    font-size: 3rem;
    color: #d4af8c;
    margin-bottom: 20px;
}

.material-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.material-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Renovation Cards */
.renovation-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.renovation-card p {
    color: #666;
    margin-bottom: 20px;
}

.renovation-card ul {
    list-style: none;
    text-align: left;
}

.renovation-card li {
    padding: 6px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
}

.renovation-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #d4af8c;
    font-weight: 700;
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin-top: 100px;
}

.submit-button {
    background: linear-gradient(135deg, #d4af8c, #c19a6b);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    box-shadow: 0 8px 25px rgba(212, 175, 140, 0.3);
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(212, 175, 140, 0.4);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-notice {
    color: #666;
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 12px 16px;
        height: 60px;
    }

    .nav-logo h2 {
        font-size: 1.3rem;
    }

    .nav-logo span {
        font-size: 0.8rem;
    }

    .estimate-container {
        padding-top: 60px;
    }

    .estimate-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .option-grid {
        gap: 12px;
    }

    .plan-options,
    .material-options,
    .renovation-options {
        grid-template-columns: 1fr;
    }

    .area-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

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

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

    .option-card {
        padding: 24px 20px;
    }

    .option-button {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .submit-button {
        padding: 18px 40px;
        font-size: 1.1rem;
    }

    .form-section {
        margin-bottom: 25px;
    }

    .estimate-form {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    .area-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

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

    .status-options {
        grid-template-columns: 1fr;
    }

    .option-button {
        padding: 14px 12px;
        font-size: 0.8rem;
    }
    
    .estimate-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .submit-button {
        padding: 16px 32px;
        font-size: 1rem;
    }
}

/* Ultra small devices (iPhone SE and smaller) */
@media (max-width: 375px) {
    .option-button {
        padding: 12px 10px;
        font-size: 0.75rem;
    }
    
    .estimate-title {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .submit-button {
        padding: 14px 28px;
        font-size: 0.9rem;
    }
    
    .option-card {
        padding: 18px 15px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Global override for all border-left decorations */
.detail-item,
.meta-item,
.breakdown-item,
.info-item,
.project-description,
.estimate-result {
    border-left: transparent !important;
}