/* 
   Style for DUN XIN CO., LTD.
   Pure CSS Layout - Full Background Version
*/

:root {
    --primary-green: #8B9B84;
    --dark-green: #73836B;
    --warm-white: transparent;
    --warm-gray-beige: transparent;
    --ink-black: #333333;
    --light-gray: rgba(245, 243, 240, 0.8);
    --border-color: rgba(0, 0, 0, 0.05);
    --text-muted: #666660;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--ink-black);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: url('hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #F7F5F2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 54px; /* Increased by 20% from 45px */
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-zh {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.brand-en {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: var(--ink-black);
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 60%;
    height: 1px;
    background: var(--primary-green);
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--primary-green);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section */
.hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero-container-fluid {
    width: 100%;
    padding: 0 5%;
    display: flex;
    align-items: center;
}

.hero-content-left {
    max-width: 550px;
    text-align: left;
    z-index: 2;
    margin-left: 0;
}

.hero-top-tag {
    margin-bottom: 30px;
}

.hero-top-tag span {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
}

.tag-line {
    width: 60px;
    height: 1px;
    background: #CCC;
    margin-top: 10px;
}

.hero-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 3.2rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink-black);
    margin-bottom: 35px;
    letter-spacing: 1px;
}

.highlight-green {
    color: var(--primary-green);
    font-weight: 400;
}

.hero-subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.25rem;
    color: var(--ink-black);
    letter-spacing: 1px;
    margin-bottom: 45px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-description-group p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 5px;
}

/* Common Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.header-line {
    width: 40px;
    height: 2px;
    background-color: var(--primary-green);
    margin: 0 auto 20px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: 1px;
}

/* Sections General */
.services, .pricing, .workflow, .contact {
    padding: 60px 0; /* Reduced from 100px to 60px */
    background-color: transparent;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.service-card {
    text-align: center;
    padding: 52px 40px;
    background: rgba(255, 253, 250, 0.94);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(80, 80, 70, 0.08);
    box-shadow: 0 6px 24px rgba(40, 40, 35, 0.035);
    transition: var(--transition);
}

.service-card:hover {
    background: rgba(255, 253, 250, 0.96);
    transform: translateY(-2px);
}

.service-icon-box {
    margin-bottom: 18px;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.service-card p {
    font-size: 0.9rem;
    color: #555;
}

.card-footer-line {
    width: 20px;
    height: 1px;
    background: var(--primary-green);
    margin: 18px auto 0;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 42px;
}

.pricing-card {
    background: rgba(255, 253, 250, 0.94);
    backdrop-filter: blur(2px);
    padding: 46px 30px;
    text-align: center;
    border: 1px solid rgba(80, 80, 70, 0.08);
    box-shadow: 0 6px 24px rgba(40, 40, 35, 0.035);
}

.pricing-index {
    color: var(--primary-green);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.pricing-icon {
    margin-bottom: 18px;
    opacity: 0.7;
}

.pricing-card h4 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.pricing-card p {
    font-size: 0.85rem;
    color: #555;
}

.pricing-cta-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
}

.pricing-note {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

.btn-green-cta {
    display: inline-block;
    background-color: var(--primary-green);
    color: white;
    padding: 16px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(150, 165, 141, 0.3);
}

.btn-green-cta:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(150, 165, 141, 0.4);
}

/* Workflow Timeline */
.workflow-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 40px;
}

.workflow-timeline::before {
    content: '';
    position: absolute;
    top: 105px;
    left: 10%;
    right: 10%;
    height: 1px;
    border-top: 1px dashed rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-num {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 15px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.workflow-step h5 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.workflow-step p {
    font-size: 0.85rem;
    color: #555;
}

/* Contact Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}

.contact-info h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.contact-subtitle {
    color: #4A4A46;
    margin-bottom: 30px;
    line-height: 1.7;
}

.info-line {
    width: 30px;
    height: 1px;
    background: var(--primary-green);
    margin-bottom: 32px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 20px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.6;
}

.info-text span {
    font-size: 0.9rem;
    color: #666660;
    line-height: 1.7;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Removed margin-bottom here because form-group already has it */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 15px; /* Consistent padding for all inputs */
    height: 50px; /* Explicit height for consistency */
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    transition: var(--transition);
    appearance: none; /* Reset for select */
}

.form-group textarea {
    height: auto; /* Textarea should not have fixed height */
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
}

.form-privacy {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-privacy input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
}

.privacy-text {
    font-size: 0.875rem;
    color: #666660;
    line-height: 1.6;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    background: var(--ink-black);
    color: white;
    padding: 18px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-green);
}

/* Form submission feedback */
.form-status {
    min-height: 1.5em;
    margin: 12px 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.form-error {
    color: #8A5F5B;
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Form Success Modal */
body.modal-open {
    overflow: hidden;
}

.success-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.success-modal[hidden] {
    display: none;
}

.success-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.success-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 35, 0.22);
    backdrop-filter: blur(2px);
}

.success-modal-dialog {
    position: relative;
    width: min(460px, calc(100vw - 40px));
    padding: 40px 42px 36px;
    border: 1px solid rgba(80, 80, 70, 0.1);
    border-radius: 18px;
    background: #FCFBF8;
    color: var(--ink-black);
    text-align: center;
    box-shadow: 0 12px 35px rgba(40, 40, 35, 0.08);
    transform: translateY(8px);
    transition: transform 0.22s ease;
}

.success-modal.is-visible .success-modal-dialog {
    transform: translateY(0);
}

.success-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #666660;
    font-size: 1.65rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.success-modal-close:hover,
.success-modal-close:focus-visible {
    color: var(--primary-green);
    outline: none;
}

.success-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border: 1px solid var(--primary-green);
    border-radius: 50%;
    color: var(--primary-green);
}

.success-modal-eyebrow {
    margin-bottom: 10px;
    color: var(--primary-green);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.success-modal-dialog h2 {
    margin-bottom: 16px;
    color: var(--ink-black);
    font-family: 'Noto Serif TC', serif;
    font-size: 1.55rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.success-modal-dialog > p:not(.success-modal-eyebrow) {
    margin-bottom: 26px;
    color: #4A4A46;
    font-size: 0.95rem;
    line-height: 1.8;
}

.success-modal-button {
    min-width: 104px;
    padding: 10px 28px;
    border: 0;
    border-radius: 9px;
    background: var(--primary-green);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.success-modal-button:hover,
.success-modal-button:focus-visible {
    background: var(--dark-green);
    outline: none;
}

/* Back to Top Button */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 999;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.scroll-top:hover {
    background: var(--primary-green);
    transform: translateY(-5px);
}

.scroll-top:hover svg {
    stroke: white;
}

/* Footer */
footer {
    background: rgba(242, 240, 237, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0; /* Further reduced to 20px */
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-brand {
    flex: 1;
    display: flex;
    justify-content: flex-start; /* Left aligned */
}

.footer-right {
    text-align: right;
}

.footer-bottom {
    display: none; /* Hide bottom section to further reduce height */
}

/* Mobile navigation */
.mobile-menu-btn {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .services-grid, .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-card {
        min-height: 0;
    }
    
    .contact-layout {
        gap: 48px;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        width: 28px;
        height: 24px;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 1px;
        background: var(--ink-black);
        transition: var(--transition);
    }

    .nav-links {
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 22px;
        padding: 24px 20px 28px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .services-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-cta-box {
        flex-direction: column;
        gap: 16px;
    }
    
    .workflow-timeline {
        flex-direction: column;
        gap: 40px;
    }
    
    .workflow-timeline::before {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .success-modal-dialog {
        width: calc(100vw - 40px);
        padding: 30px 28px;
    }

    .success-modal-dialog h2 {
        font-size: 1.4rem;
    }

    .success-modal-dialog > p:not(.success-modal-eyebrow) {
        font-size: 0.9375rem;
    }

    .success-modal-button {
        min-width: 132px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .footer-right {
        text-align: center;
    }
}
