/* ============================================
   Printable Monthly Calendar - Main Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --primary-light: #3B82F6;
    --secondary: #1F2937;
    --accent: #10B981;
    --danger: #DC2626;
    --warning: #F59E0B;
    --bg: #FFFFFF;
    --bg-alt: #F9FAFB;
    --bg-dark: #111827;
    --text: #1F2937;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-dark: #D1D5DB;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container: 1280px;
    --header-height: 64px;
    --c-red:        #c84b31;
    --c-red-dark:   #a03824;
    --c-red-light:  #f9ede9;
    --c-ink:        #1a1a1a;
    --c-text:       #3d3d3d;
    --c-muted:      #7a7a7a;
    --c-border:     #e8e0d8;
    --c-bg:         #faf8f5;
    --c-white:      #ffffff;
    --c-weekend:    #fff5f3;
    --c-today-bg:   #c84b31;
    --c-today-text: #ffffff;
    --c-holiday:    #fef3cd;
}

/* Theme Variants */
[data-theme="minimal"] { --primary: #374151; --primary-dark: #111827; --primary-light: #6B7280; }
[data-theme="business"] { --primary: #0F172A; --primary-dark: #020617; --primary-light: #334155; }
[data-theme="cute"] { --primary: #EC4899; --primary-dark: #BE185D; --primary-light: #F472B6; }
[data-theme="dark"] { --primary: #E5E7EB; --primary-dark: #F3F4F6; --primary-light: #9CA3AF; --bg: #111827; --bg-alt: #1F2937; --text: #F3F4F6; }
[data-theme="kids"] { --primary: #F59E0B; --primary-dark: #D97706; --primary-light: #FBBF24; }
[data-theme="nature"] { --primary: #059669; --primary-dark: #047857; --primary-light: #10B981; }

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
    flex-shrink: 0;
}

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

.logo-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.logo-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

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

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-light);
    transition: var(--transition);
}

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

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    list-style: none;
}

/* Dropdown visibility is controlled by JS hover handlers */
/* See main.js initDropdowns() function */

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
}

.dropdown-menu a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    transform-origin: center;
}

.site-header,
.main-nav,
.nav-list,
.dropdown-menu {
    min-height: auto !important;
    overflow: visible !important;
}

.no-auto-ads{
    position: relative;
    z-index: 9999;
    display: block;
}

/* Hamburger to X animation */
.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
    padding: 80px 0 60px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 17px;
}

/* ============================================
   CALENDAR TABLE STYLES (TABLE-BASED)
   ============================================ */
.calendar-section {
    padding: 0;
}

.calendar-wrapper {
    margin: 40px 0;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.calendar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.calendar-year {
    color: var(--primary);
}

.calendar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--bg-alt);
    border-color: var(--primary);
    color: var(--primary);
}

/* TABLE-BASED CALENDAR GRID */
.calendar-grid {
    padding: 24px;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table thead {
    border-bottom: 2px solid var(--border-dark);
}

.calendar-day-headers {
    background: var(--bg-alt);
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border: none;
}

.calendar-table tbody {
    border: 1px solid var(--border);
}

.calendar-week {
    border-bottom: 1px solid var(--border);
}

.calendar-week:last-child {
    border-bottom: none;
}

.calendar-day {
    background: var(--bg);
    height: 120px;
    padding: 0;
    vertical-align: top;
    border-right: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.calendar-day-inner {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: var(--bg-alt);
}

.calendar-day.other-month {
    background: #f9fafb;
    color: var(--text-muted);
}

.calendar-day.weekend {
    background: #fffbeb;
}

.calendar-day.holiday {
    background: #fee2e2;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-day.today .day-number {
    color: var(--primary);
    font-weight: 700;
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    flex-shrink: 0;
    line-height: 1.2;
}

.holiday-name {
    font-size: 11px;
    color: var(--danger);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 4px;
    max-height: 2.6em;
}

.moon-phase {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
}

.day-note {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    padding: 2px 4px;
    background: rgba(37,99,235,0.08);
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   YEAR CALENDAR
   ============================================ */
.year-calendar-wrapper {
    margin: 40px 0;
}

.year-title {
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
}

.year-calendar-grid {
    display: grid;
    gap: 24px;
}

.year-calendar-grid.layout-3x4 {
    grid-template-columns: repeat(3, 1fr);
}

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

.year-month-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
}

.year-month-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.year-month-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    color: var(--primary);
}

/* COMPACT CALENDAR (TABLE-BASED) */
.compact-calendar {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.compact-calendar thead {
    border-bottom: 1px solid var(--border);
}

.compact-calendar tbody {
    border: 1px solid var(--border);
}

.compact-calendar tr {
    border-bottom: 1px solid var(--border);
}

.compact-calendar tr:last-child {
    border-bottom: none;
}

.compact-calendar th {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 2px;
    border: none;
}

.compact-calendar td {
    aspect-ratio: 1;
    text-align: center;
    font-size: 12px;
    padding: 4px 2px;
    vertical-align: middle;
    border-right: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.compact-calendar td:last-child {
    border-right: none;
}

.compact-calendar td:hover {
    background: var(--bg-alt);
}

.compact-day {
    border-radius: 4px;
}

.compact-day.other-month {
    color: var(--text-muted);
}

.compact-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 50%;
}

.compact-day.holiday {
    color: var(--danger);
    font-weight: 600;
}

/* ============================================
   CALENDAR CONTROLS
   ============================================ */
.calendar-controls {
    background: var(--bg-alt);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-item select,
.control-item input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    min-width: 140px;
    transition: var(--transition);
}

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

.control-item.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.control-item.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: 0;
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(37,99,235,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   MONTHS GRID (Homepage)
   ============================================ */
.months-grid-section {
    padding: 40px 0;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.month-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.month-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    color: var(--primary);
}

.month-card-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.month-card-year {
    font-size: 14px;
    color: var(--text-light);
}

/* =========================================
   Calendar Templates Section
========================================= */
.calendar-template-section {
    padding: 60px 0;
    background: var(--bg-alt);
}

.calendar-template-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.calendar-template-section .section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.calendar-template-section .section-subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* =========================================
   Grid
========================================= */
.calendar-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* =========================================
   Template Card
========================================= */
.calendar-template-section .template-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.calendar-template-section .template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* =========================================
   Preview
========================================= */
.calendar-template-section .template-preview {
    position: relative;
    padding-top: 75%;
    background: #f0f0f0;
    overflow: hidden;
}

.calendar-template-section .template-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
}

/* =========================================
   Info
========================================= */
.calendar-template-section .template-info {
    padding: 20px;
}

.calendar-template-section .template-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.calendar-template-section .template-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* =========================================
   Actions
========================================= */
.calendar-template-section .template-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-template-section .template-actions a {
    flex: 1;
    min-width: 60px;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.calendar-template-section .template-actions a:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.calendar-template-section .template-actions a:active {
    transform: translateY(0);
}

/* Button Colors */
.calendar-template-section .btn-word {
    background: #2b579a;
}

.calendar-template-section .btn-excel {
    background: #1f7244;
}

.calendar-template-section .btn-pdf {
    background: #c0392b;
}

/* ─────────────────────────────────────────────
   DOWNLOAD BUTTONS
───────────────────────────────────────────── */

.download-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.2rem;
  align-items: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .52rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--c-white);
  color: var(--c-ink);
  white-space: nowrap;
}
.download-btn:hover {
  border-color: var(--c-red);
  color: var(--c-red);
  box-shadow: var(--shadow-sm);
}
.download-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

.download-btn[data-format="pdf"] {
  background: var(--c-red); color: white; border-color: var(--c-red);
}
.download-btn[data-format="pdf"]:hover {
  background: var(--c-red-dark); border-color: var(--c-red-dark); color: white;
}
.download-btn[data-format="word"]  { color: #2b579a; border-color: #c8d8f8; }
.download-btn[data-format="word"]:hover  { background: #eef2fc; border-color: #2b579a; }
.download-btn[data-format="excel"] { color: #1e7e47; border-color: #c3e6cb; }
.download-btn[data-format="excel"]:hover { background: #ecf7f0; border-color: #1e7e47; }
.download-btn[data-format="png"]   { color: #6f42c1; border-color: #d4c6f0; }
.download-btn[data-format="png"]:hover   { background: #f3eff9; border-color: #6f42c1; }
.download-btn.btn-print { color: var(--c-ink); border-color: var(--c-border); }
.download-btn.btn-print:hover { background: var(--c-ink); color: white; border-color: var(--c-ink); }
.download-btn.btn-clear-notes { color: var(--c-muted); font-weight: 500; }
.download-btn.btn-clear-notes:hover { color: #c0392b; border-color: #e57373; background: #fff5f5; }

.inactive{
    opacity:0.5;
    cursor:not-allowed;
    pointer-events:none;
}

@keyframes spin { to { transform: rotate(360deg); } }
.download-btn .spin, svg.spin { animation: spin .7s linear infinite; display: inline-block; }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .calendar-controls,
    .download-options,
    .back-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }

    .calendar-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }

    .calendar-day {
        height: 80px;
        page-break-inside: avoid;
    }

    .calendar-day-inner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    body {
        background: white;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: #9CA3AF;
    padding: 60px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
}

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

.footer-tagline {
    font-size: 14px;
    line-height: 1.6;
    color: #9CA3AF;
}

.footer-links h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9CA3AF;
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
}

.footer-legal a {
    color: #9CA3AF;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.back-to-top[hidden] {
    display: none;
}

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .nav-list.active {
        display: flex;
        animation: slideDown 0.25s ease forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-list .nav-link {
        padding: 12px 16px;
        font-size: 16px;
    }

    .nav-list .has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: var(--bg-alt);
        border-radius: var(--radius);
        margin-top: 4px;
        display: none; /* Hidden by default on mobile */
    }

    .nav-list .has-dropdown.open .dropdown-menu {
        display: block; /* Show only when explicitly opened via hover/click */
    }

    .hero {
        padding: 60px 0 40px;
    }

    .calendar-day {
        height: 60px;
        padding: 4px;
    }

    .day-number {
        font-size: 14px;
    }

    .holiday-name {
        display: none;
    }

    .year-calendar-grid.layout-3x4,
    .year-calendar-grid.layout-4x3 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .control-item select,
    .control-item input {
        width: 100%;
    }

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

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

    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   EDITABLE NOTES STYLES
   ============================================ */

.day-note-area {
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--primary);
    background: transparent;
    border: 1px dashed transparent;
    border-radius: 4px;
    cursor: text;
    transition: var(--transition);
    word-break: break-word;
    outline: none;
    overflow-y: auto;
}

.day-note-area:hover {
    border-color: var(--border-dark);
    background: rgba(37, 99, 235, 0.03);
}

.day-note-area:focus {
    border-color: var(--primary);
    background: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.day-note-area:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.day-note-area:not(:empty) {
    background: rgba(37, 99, 235, 0.06);
    border-color: transparent;
}

/* Save/Clear Notes Buttons */
.btn-save-notes {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
}

.btn-save-notes:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.btn-clear-notes {
    background: transparent !important;
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.btn-clear-notes:hover {
    background: var(--danger) !important;
    color: white !important;
}

/* Calendar cell with note */
.calendar-day.has-note {
    background: rgba(37, 99, 235, 0.04);
}

/* Note indicator dot */
.calendar-day .note-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Print styles for notes */
@media print {
    .calendar-day-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .day-note-area {
        border: none !important;
        background: transparent !important;
        padding: 2px 0;
        font-size: 9pt;
        color: #2563EB;
        flex: 1 1 auto;
        min-height: 0;
    }

    .day-note-area:empty::before {
        content: none;
    }

    .btn-save-notes,
    .btn-clear-notes {
        display: none !important;
    }
}
