:root {
    --primary-navy: #0A192F;
    --secondary-navy: #112240;
    --point-gold: #C6A87C;
    --point-gold-light: #D4B991;
    --text-white: #E6F1FF;
    --text-slate: #8892B0;
    --bg-light: #F9F9F7;
    --bg-white: #FFFFFF;
    --container-width: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.3s;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Redesign */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    /* White background */
    backdrop-filter: blur(10px);
    z-index: 100;
    height: 150px;
    /* Increased height */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 130px;
    /* Increased Logo Size */
    display: block;
}

/* Hero Section Redesign */
.hero {
    padding-top: 150px;
    /* Match header height */
    background-color: var(--primary-navy);
    position: relative;
    overflow: hidden;
}

.hero-wrapper {
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* New 3D Abstract Background */
.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('hero_new.png') no-repeat center center;
    background-size: cover;
    z-index: 0;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    color: var(--text-white);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.highlight-underline {
    color: var(--point-gold);
    border-bottom: 4px solid var(--point-gold);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-slate);
    margin-bottom: 40px;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn-primary-gold {
    background-color: var(--point-gold);
    color: var(--primary-navy);
    padding: 18px 36px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(198, 168, 124, 0.4);
}

.btn-primary-gold:hover {
    background-color: var(--point-gold-light);
    transform: translateY(-2px);
}

.btn-outline-gold {
    border: 1px solid var(--point-gold);
    color: var(--point-gold);
    padding: 18px 36px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 18px;
}

.btn-outline-gold:hover {
    background-color: rgba(198, 168, 124, 0.1);
}

/* Hero Stats Card - Glassmorphism */
.hero-stats-card {
    background: rgba(17, 34, 64, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(198, 168, 124, 0.3);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 16px;
    color: var(--text-slate);
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.text-gold {
    color: var(--point-gold);
}

/* Sections Common */
.section-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-navy);
    text-align: center;
    line-height: 1.3;
}

.section-desc {
    color: #666;
    font-size: 18px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* Intro Section */
.section-intro {
    padding: 100px 0;
    background-color: var(--bg-white);
    text-align: center;
}

/* Advantage Section (Cards) */
.section-advantage {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.advantage-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 4px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.advantage-card:hover {
    transform: translateY(-10px);
    border-color: var(--point-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.adv-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.adv-text h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-navy);
}

/* Performance Section */
.section-performance {
    background-color: var(--primary-navy);
    color: white;
    padding: 100px 0;
}

.section-performance .section-title {
    color: white;
    margin-bottom: 60px;
}

.performance-wrapper {
    display: flex;
    gap: 50px;
    align-items: center;
}

.perf-image-container {
    flex: 1;
}

.perf-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.perf-table-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--point-gold);
    font-weight: 600;
}

.case-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-slate);
}

.case-amount {
    color: white;
    font-weight: 600;
}

.page-btn {
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.page-btn.active {
    background-color: var(--point-gold);
    border-color: var(--point-gold);
    color: var(--primary-navy);
}

/* Process Section */
.section-process {
    padding: 100px 0;
    background-color: white;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-card {
    background: var(--bg-light);
    border-radius: 50%;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.step-card img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.step-item:hover .step-card {
    border-color: var(--point-gold);
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.step-num {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--point-gold);
    color: var(--primary-navy);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.step-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-navy);
}

/* Footer */
.footer {
    background-color: #020c1b;
    color: var(--text-slate);
    padding: 60px 0;
    border-top: 1px solid #112240;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* or flex-start */
    gap: 40px;
}

.footer strong {
    color: var(--point-gold);
}

.footer-logo img {
    height: 120px;
    /* Adjust size as needed */
}

/* Floating Banner & Modal */
.floating-banner {
    position: fixed;
    right: 30px;
    bottom: 40px;
    z-index: 1000;
    cursor: pointer;
    animation: floating-bounce 2.5s infinite ease-in-out;
}

.banner-content {
    display: flex;
    align-items: center;
    background: var(--point-gold);
    padding: 12px 25px 12px 12px;
    border-radius: 60px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--primary-navy);
}

.banner-content:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--point-gold-light);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.banner-text {
    font-weight: 800;
    color: var(--primary-navy);
    margin-left: 15px;
    font-size: 18px;
    white-space: nowrap;
}

.banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes floating-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Modal Styling */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px 20px 80px 20px;
}

.chat-modal.hidden {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: var(--point-gold);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-navy);
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

.step-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.full-width {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.mt-10 {
    margin-top: 10px;
}

.btn-outline-red {
    background: #fff;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Chat Styling */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background: var(--point-gold);
    color: var(--primary-navy);
    border-bottom-right-radius: 2px;
}

.message.admin {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #eee;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    display: flex !important;
    gap: 10px;
    width: 100%;
}

.chat-input-area input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.chat-input-area input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.welcome-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2px solid var(--point-gold);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(198, 168, 124, 0.1);
}

.welcome-logo {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}

.welcome-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    white-space: pre-line;
    margin-bottom: 20px;
}

.welcome-text strong {
    color: #e67e22;
    font-size: 16px;
}

.modal-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    position: relative;
}

.chat-banner-container {
    width: 100%;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-banner-gif {
    width: 100%;
    height: auto;
    display: block;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.option-btn {
    width: 100%;
    padding: 12px;
    background: #fffdeb;
    border: 1px solid var(--point-gold);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000;
}

.option-btn:hover {
    background: var(--point-gold);
}

.send-btn {
    background: var(--point-gold);
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: var(--primary-navy);
}

/* --- Mobile Response Styles --- */
@media (max-width: 900px) {

    /* Header */
    .header {
        height: 100px;
    }

    .logo img {
        height: 80px;
    }

    .hero {
        padding-top: 100px;
    }

    /* Hero Section */
    .hero-wrapper {
        min-height: auto;
        padding: 60px 20px;
    }

    .hero-content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .btn-primary-gold,
    .btn-outline-gold {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    /* Hero Stats */
    .hero-stats-card {
        width: 100%;
        padding: 20px;
    }

    .stat-row {
        padding: 12px 0;
    }

    .stat-value {
        font-size: 18px;
    }

    /* Sections Common */
    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .section-desc {
        font-size: 15px;
        padding: 0 10px;
    }

    .section-intro,
    .section-process,
    .section-advantage,
    .section-performance {
        padding: 60px 0;
    }

    /* Advantage Grid */
    .advantage-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .advantage-card {
        padding: 24px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .adv-icon-img {
        margin-bottom: 16px;
    }

    /* Performance Section */
    .performance-wrapper {
        flex-direction: column-reverse;
        /* Table first (actually image container is reversed) */
        gap: 30px;
    }

    .perf-image-container,
    .perf-table-container {
        width: 100%;
        flex: auto;
    }

    .perf-img {
        height: 200px;
        object-fit: cover;
    }

    /* Process Section */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-top: 40px;
    }

    .step-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Footer Mobile */
    .footer .container {
        flex-direction: column-reverse;
        /* Logo on top, Info on bottom */
        text-align: center;
        gap: 30px;
    }

    .footer-logo img {
        height: 80px;
        margin-bottom: 0;
    }
}

/* Admin Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #666;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #020c1b;
}

.msg-time {
    font-size: 10px;
    color: #aaa;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.message.user .msg-time {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
    .floating-banner {
        right: 15px;
        bottom: 15px;
    }

    .banner-text {
        font-size: 13px;
    }

    .modal-container {
        max-width: 100%;
        height: 70vh;
        border-radius: 20px 20px 0 0;
    }

    .chat-modal {
        padding: 0;
    }
}

/* Contract Styles */
.contract-paper {
    width: 210mm;
    min-height: 297mm;
    background: white;
    padding: 20mm;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    color: #333;
    font-family: "Batang", serif;
    /* Serif for document look */
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    /* For stamp */
}

.doc-title {
    text-align: center;
    font-size: 24pt;
    font-weight: bold;
    margin-bottom: 40px;
    text-decoration: underline;
    text-underline-offset: 10px;
}

.doc-preamble {
    margin-bottom: 30px;
    line-height: 1.8;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.doc-table th,
.doc-table td {
    border: 1px solid #000;
    padding: 10px;
}

.doc-table th {
    background: #f9f9f9;
    width: 15%;
    text-align: center;
    font-weight: bold;
}

.doc-date {
    text-align: center;
    margin: 50px 0;
    font-size: 16pt;
}

.doc-signatures {
    display: flex;
    justify-content: flex-end;
    gap: 50px;
    margin-bottom: 50px;
}

.sig-block {
    position: relative;
    line-height: 1.8;
}

/* Seal (Stamp) */
.seal {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: 3px solid red;
    border-radius: 50%;
    color: red;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    opacity: 0.8;
    line-height: 1.2;
    z-index: 10;
    font-family: "Gulim", sans-serif;
}

.info-table-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.info-box {
    flex: 1;
    border: 1px solid #ccc;
    background: #eee;
    padding: 5px;
}

.info-box-header {
    background: #e0e0e0;
    padding: 5px 10px;
    font-weight: bold;
}

.ib-table {
    width: 100%;
    border-collapse: collapse;
}

.ib-table td {
    border: 1px solid #ddd;
    padding: 8px;
    background: white;
}

.ib-table td:first-child {
    background: #fafafa;
    text-align: center;
    font-weight: bold;
    width: 30%;
}

/* Header Nav */
.header-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 900px) {
    .header-nav {
        right: 15px;
    }
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 10px 20px;
    border: 2px solid #FFD700;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #FFD700;
    color: white;
}

/* Print Overrides */
@media print {
    body * {
        visibility: hidden;
    }

    #contract-doc-modal,
    #contract-doc-modal * {
        visibility: visible;
    }

    #contract-doc-modal {
        position: absolute;
        left: 0;
        top: 0;
        background: white;
        padding: 0;
        z-index: 9999;
    }

    .doc-actions {
        display: none !important;
    }

    .contract-paper {
        box-shadow: none;
        margin: 0;
        width: 100%;
    }
}