/* ============================================
   WINGDING TRANSLATOR - MAIN STYLESHEET
   Version: 1.0
   ============================================ */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2B6CB0;
    --primary-dark: #215387;
    --primary-light: #4A90D9;
    --dark: #1A202C;
    --dark-light: #2D3748;
    --gray: #4A5568;
    --gray-light: #718096;
    --gray-bg: #EDF2F7;
    --light-bg: #F7FAFC;
    --white: #ffffff;
    --shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
    --max-width: 1290px;
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 17px;
    line-height: 1.6;
    color: var(--dark-light);
    background: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark);
    line-height: 1.5;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 32px;
    font-weight: 700;
}
h2 {
    font-size: 28px;
    font-weight: 700;
}
h3 {
    font-size: 24px;
    font-weight: 700;
}
h4 {
    font-size: 22px;
    font-weight: 700;
}
h5 {
    font-size: 20px;
    font-weight: 700;
}
h6 {
    font-size: 18px;
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

hr {
    border: none;
    border-top: 2px solid var(--gray-bg);
    margin: 2rem 0;
}

/* ===== LAYOUT ===== */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.logo-text span {
    color: var(--primary);
}

/* ===== NAVIGATION ===== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a {
    padding: 0.6rem 0.8rem;
    color: var(--gray);
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--dark);
    background: var(--gray-bg);
}

.main-nav .dropdown {
    position: relative;
}

.main-nav .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    z-index: 100;
}

.main-nav .dropdown:hover .dropdown-content {
    display: block;
}

.main-nav .dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0;
}

.main-nav .dropdown-content a:hover {
    background: var(--gray-bg);
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
}

.mobile-toggle:hover {
    background: var(--gray-bg);
}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 2rem 1.5rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-drawer-overlay.active {
    display: block;
}

.mobile-drawer .close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    float: right;
    color: var(--gray);
}

.mobile-drawer nav {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-drawer nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-bg);
    color: var(--dark-light);
}

.mobile-drawer nav a:hover {
    color: var(--primary);
}

/* ===== HERO / PAGE HEADER ===== */
.page-header {
    background: var(--gray-bg);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-light);
    font-size: 1.1rem;
}

/* ===== CONTENT AREA ===== */
.main-content {
    flex: 1;
    padding: 2rem 0 3rem;
}

/* ===== TRANSLATOR TOOL ===== */
.translator-tool {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin: 1.5rem 0;
}

.translator-tool .input-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.translator-tool textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    background: var(--light-bg);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    transition: var(--transition);
}

.translator-tool textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.translator-tool textarea[readonly] {
    background: var(--white);
    cursor: default;
}

.toggle-view {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-view .toggle {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-light);
    transition: var(--transition);
}

.toggle-view .toggle.active {
    background: var(--primary);
    color: var(--white);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 34px;
    transition: 0.4s;
    cursor: pointer;
}

.slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}

.switch input:checked+.slider {
    background: var(--primary);
}

.switch input:checked+.slider::before {
    transform: translateX(20px);
}

.stats {
    font-size: 14px;
    color: var(--gray-light);
    margin: 0.75rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.stats span {
    font-weight: 600;
    color: var(--dark-light);
}

.btn {
    padding: 0.4rem 1.2rem;
    background: var(--gray-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background: #d5dce6;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.outputs {
    margin-top: 1.5rem;
}

.output-section {
    margin-bottom: 1.25rem;
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1rem;
}

.output-section h2 {
    font-size: 18px;
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.output-section .copy-btn {
    margin-top: 0.5rem;
    padding: 4px 12px;
    font-size: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.output-section .copy-btn:hover {
    background: var(--primary-dark);
}

.decode {
    display: none;
}

.decode.visible {
    display: block;
}

#decode-status {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 0.5rem;
}

/* ===== FAQ ACCORDION ===== */
.accordion-wrap {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 1.5rem 0;
}

.accordion-item {
    border-bottom: 1px solid var(--gray-bg);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--light-bg);
}

.accordion-header .icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-header .icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-body-inner {
    padding: 0 1.25rem 1.25rem;
}

.accordion-item.open .accordion-body {
    max-height: 500px;
}

/* ===== BLOG CARDS ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card .content {
    padding: 1.25rem;
}

.blog-card .content h3 {
    font-size: 20px;
    margin-bottom: 0.5rem;
}

.blog-card .content p {
    color: var(--gray-light);
    margin-bottom: 0.75rem;
}

.blog-card .content .read-more {
    color: var(--primary);
    font-weight: 600;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== BUTTONS ===== */
.button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.button:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.button-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.button-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-bg);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-grid h4 {
    font-size: 16px;
    margin-bottom: 0.75rem;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
}

.footer-grid ul li {
    margin-bottom: 0.4rem;
}

.footer-grid ul a {
    color: var(--gray-light);
    font-size: 14px;
}

.footer-grid ul a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--gray-bg);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 14px;
    color: var(--gray-light);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-bg);
    color: var(--gray);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-bg);
}

.comparison-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background: var(--light-bg);
}

.comparison-table tr:hover {
    background: var(--gray-bg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 24px;
    }
    .translator-tool {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .header-inner {
        min-height: 64px;
    }

    .logo img {
        max-height: 32px;
    }

    .translator-tool {
        padding: 1rem;
    }

    .input-toggle-container {
        flex-direction: column;
        align-items: stretch;
    }

    .toggle-view {
        justify-content: center;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .page-header {
        padding: 1.5rem 0;
    }

    .stats {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 24px;
    }
    h2 {
        font-size: 20px;
    }

    .translator-tool textarea {
        font-size: 14px;
        padding: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 14px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 10px;
    }
}