/* --- VARIABLES --- */
:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --nav-height: 70px;
    --border-radius-sm: 8px;
    --transition-fast: 0.2s ease;
}

[data-theme="dark"] {
    --bg-color: #111827;
    --card-bg: #1f2937;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: #1e3a8a;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* --- HEADER & NAV --- */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
}
.logo span { color: var(--primary-color); }

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Submenu Desktop & Mobile */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    padding-right: 28px !important;
}

.has-submenu > a::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s;
}

.has-submenu.open > a::after {
    transform: translateY(-50%) rotate(180deg);
}

.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1000;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu.open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    display: block;
    margin: 0;
    padding: 0;
}

.submenu a {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s;
}

.submenu a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Hamburger Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
    border-radius: 2px;
}

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

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

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

/* --- RESPONSIVE MENU --- */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .main-nav {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateY(0);
        box-shadow: var(--shadow);
    }

    .main-nav > ul {
        flex-direction: column;
        width: 100%;
        text-align: left;
        gap: 0;
    }

    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav > ul > li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        width: 100%;
        padding: 14px 12px;
        border-radius: 0;
    }

    /* Submenu Mobile */
    .submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: var(--bg-color);
        margin-top: 0;
        padding: 0;
    }

    .has-submenu.open > .submenu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        padding: 8px 0;
    }

    .submenu a {
        padding-left: 32px;
        font-size: 0.88rem;
    }
}

/* --- DARK MODE TOGGLE --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}
.theme-switch input { display: none; }
.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 12px;
}
.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 18px;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }

.icon-sun, .icon-moon {
    width: 16px;
    height: 16px;
}

/* --- BREADCRUMB --- */
.breadcrumb-area {
    padding: 15px 0;
    background-color: var(--bg-color);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li a {
    color: var(--primary-color);
}

.breadcrumb li a:hover {
    text-decoration: underline;
}

.breadcrumb li.active {
    color: var(--text-color);
    font-weight: 500;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    color: var(--border-color);
    margin-left: 8px;
}

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: 40px 0 80px;
}

.seo-article {
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.seo-article h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.seo-article h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.seo-article p, .seo-article li {
    margin-bottom: 10px;
    color: var(--text-color);
}

.steps-list { margin-left: 20px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.feature-item {
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 8px;
    text-align: center;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; }

/* --- FOOTER --- */
.site-footer {
    background-color: var(--card-bg);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

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

.copyright { 
    color: var(--text-muted); 
    font-size: 0.9rem;
    order: 1;
}

.footer-links { 
    order: 2;
    display: flex;
    gap: 20px;
}

.footer-links a { 
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .copyright,
    .footer-links {
        order: 0;
        width: 100%;
    }
    
    .footer-links {
        justify-content: center;
    }
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
