/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --holiday-color: #dc2626;
    --weekend-color: #fef3c7;
    --today-color: #2563eb;
    --bridge-color: #fde68a;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
}

h1 { font-size: 2.25rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; margin-bottom: 1rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.75rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* ===== HEADER & NAVIGATION ===== */
.main-header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    background-color: var(--bg-tertiary);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.breadcrumb-list a {
    color: var(--text-secondary);
}

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

.breadcrumb-list li[aria-current="page"] {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 2rem 0;
}

/* ===== INTRO SECTION ===== */
.intro-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.intro-text {
    max-width: 900px;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* ===== CALENDAR SECTION ===== */
.calendar-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.year-display h2 {
    margin-bottom: 0;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    background-color: var(--border-color);
}

.view-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Month Navigation */
.month-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.month-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.month-nav-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

#current-month-name {
    min-width: 200px;
    text-align: center;
    margin: 0;
}

/* Year Grid */
.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.mini-month {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.mini-month-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.mini-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 0.5rem;
}

.mini-month-weekday {
    text-align: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.25rem;
}

.mini-month-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.mini-month-day:hover:not(.empty) {
    background-color: var(--primary-light);
    color: white;
}

.mini-month-day.empty {
    cursor: default;
}

.mini-month-day.weekend {
    background-color: var(--weekend-color);
}

.mini-month-day.holiday {
    background-color: var(--holiday-color);
    color: white;
    font-weight: 600;
}

.mini-month-day.today {
    background-color: var(--today-color);
    color: white;
    font-weight: 700;
}

.mini-month-day.bridge {
    background-color: var(--bridge-color);
}

/* Month View */
.month-calendar {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.month-weekday {
    text-align: center;
    font-weight: 600;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.month-day {
    min-height: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.month-day:hover:not(.empty) {
    background-color: var(--bg-tertiary);
}

.month-day.empty {
    background-color: var(--bg-secondary);
}

.month-day.weekend {
    background-color: var(--weekend-color);
}

.month-day.holiday {
    background-color: #fef2f2;
}

.month-day.today {
    border: 2px solid var(--today-color);
}

.month-day.bridge {
    background-color: var(--bridge-color);
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.month-day.holiday .day-number {
    background-color: var(--holiday-color);
    color: white;
}

.month-day.today .day-number {
    background-color: var(--today-color);
    color: white;
}

.holiday-name {
    font-size: 0.75rem;
    color: var(--holiday-color);
    font-weight: 500;
}

.kw-badge {
    font-size: 0.625rem;
    color: var(--text-muted);
    float: right;
}

/* Calendar Legend */
.calendar-legend {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.calendar-legend h4 {
    margin-bottom: 1rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.legend-color.holiday {
    background-color: var(--holiday-color);
    border-color: var(--holiday-color);
}

.legend-color.weekend {
    background-color: var(--weekend-color);
}

.legend-color.today {
    background-color: var(--today-color);
    border-color: var(--today-color);
}

.legend-color.bridge {
    background-color: var(--bridge-color);
}

/* ===== HOLIDAYS SECTION ===== */
.holidays-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.holidays-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.holiday-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.holiday-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.holiday-list {
    list-style: none;
}

.holiday-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.holiday-list li:last-child {
    border-bottom: none;
}

.holiday-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== KW SECTION ===== */
.kw-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.kw-table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.kw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.kw-table th,
.kw-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.kw-table th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.kw-table tr:hover {
    background-color: var(--bg-secondary);
}

/* ===== FAQ SECTION ===== */
.faq-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.guide-content {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.5rem;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-tertiary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 1.5rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ===== LATEST POSTS ===== */
.latest-posts {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-card a {
    display: block;
    padding: 1.5rem;
    color: inherit;
}

.post-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.post-card:hover h3 {
    color: var(--primary-color);
}

.post-card p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.read-more {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.all-posts-link {
    text-align: center;
}

/* ===== SEO SECTION ===== */
.seo-section {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.seo-content {
    max-width: 900px;
}

.seo-content p:last-child {
    margin-bottom: 0;
}

/* ===== FOOTER ===== */
.main-footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 0;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* ===== PAGE STYLES ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.page-content {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

/* ===== BLOG STYLES ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.blog-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-card h2 a {
    color: var(--text-primary);
}

.blog-card h2 a:hover {
    color: var(--primary-color);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-excerpt {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

/* Blog Single */
.blog-single {
    max-width: 800px;
    margin: 0 auto;
}

.blog-single-header {
    margin-bottom: 2rem;
}

.blog-single-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.blog-single-content h2 {
    margin-top: 2rem;
}

.blog-single-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.blog-single-content ul,
.blog-single-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.blog-single-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== TOOLS PAGE ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tool-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin-bottom: 0.75rem;
}

.tool-card p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .year-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .year-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .holidays-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .month-weekday {
        padding: 0.75rem 0.25rem;
        font-size: 0.875rem;
    }

    .month-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .day-number {
        width: 24px;
        height: 24px;
        font-size: 0.875rem;
    }

    .holiday-name {
        font-size: 0.625rem;
    }

    .kw-badge {
        font-size: 0.5rem;
    }

    .month-navigation {
        gap: 1rem;
    }

    #current-month-name {
        min-width: 150px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .calendar-section,
    .holidays-section,
    .kw-section,
    .faq-section,
    .latest-posts,
    .seo-section,
    .intro-section,
    .page-content {
        padding: 1.5rem 1rem;
    }

    .year-grid {
        grid-template-columns: 1fr;
    }

    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .legend-items {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-header,
    .breadcrumbs,
    .main-footer,
    .calendar-controls,
    .calendar-legend,
    .latest-posts {
        display: none;
    }

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

    body {
        background: white;
    }

    .calendar-section,
    .holidays-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
