/* Modern Monthly Calendar Website Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #f1f5f9;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --holiday-color: #dc2626;
    --weekend-color: #64748b;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Header and Navigation */
.header {
    background: #f8f8f8;
    color: #333333;
    padding: 10px 0;
    border-bottom: 1px solid #dddddd;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    color: #0077cc;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: #0077cc;
    text-decoration: none;
    font-weight: normal;
    font-size: 0.9rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Enhanced intro section */
.intro-enhanced {
    background: #f8f9fa;
    border-left: 4px solid #0077cc;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.fact-item {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

/* Content Grid Layouts */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.content-block {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.content-block h3 {
    margin-bottom: 1rem;
    color: #0077cc;
    font-size: 1.1rem;
}

.content-block ul {
    list-style: none;
    padding: 0;
}

.content-block li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.content-block li:last-child {
    border-bottom: none;
}

/* International and History Lists */
.international-list, .history-list {
    max-height: 300px;
    overflow-y: auto;
}

.holiday-date, .event-date {
    font-weight: bold;
    color: #0077cc;
    margin-right: 0.5rem;
}

.holiday-type, .countries {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* Moon Phases */
.moon-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.moon-item {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

/* Business Information */
.business-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.quarter-info, .payroll-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quarter-info h4, .payroll-info h4 {
    color: #0077cc;
    margin-bottom: 0.75rem;
}

/* Planning Tools */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.template-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card h4 {
    color: #0077cc;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Interactive Tools */
.interactive-tools {
    margin: 2rem 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tool-card h4 {
    color: #0077cc;
    margin-bottom: 1rem;
}

.calculator-widget {
    margin-top: 1rem;
}

.date-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.result {
    margin-top: 0.5rem;
    font-weight: bold;
    color: #0077cc;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-social {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-social:hover {
    background: #5a6268;
}

.btn-social.facebook { background: #1877f2; }
.btn-social.twitter { background: #1da1f2; }
.btn-social.email { background: #6c757d; }
.btn-social.copy { background: #28a745; }

/* Month Info Detailed */
.month-info-detailed {
    margin: 2rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-card h4 {
    color: #0077cc;
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    margin: 2rem 0;
}

.faq-item {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.faq-item h4 {
    color: #0077cc;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.faq-item p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Related Links */
.related-links {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.related-links h3 {
    color: #0077cc;
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.related-link {
    background: white;
    padding: 1rem;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: #0077cc;
    transition: transform 0.2s;
}

.related-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555555;
}

.breadcrumbs a {
    color: #0077cc;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Page Titles */
h1 {
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: #333333;
    text-align: center;
}

h2 {
    font-size: 1.4rem;
    font-weight: normal;
    margin: 1.5rem 0 1rem 0;
    color: #333333;
}

/* Calendar Grid */
.calendar-container {
    background: white;
    border: 1px solid #dddddd;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-family: Arial, sans-serif;
}

.calendar th,
.calendar td {
    border: 1px solid #dddddd;
    text-align: center;
    vertical-align: top;
    position: relative;
}

/* Week number column */
.week-number {
    background: #f8f9fa !important;
    font-weight: bold;
    color: #666;
    font-size: 0.8rem;
    width: 40px;
    height: 80px !important;
}

/* Enhanced holiday and event display */
.international-holiday {
    font-size: 0.7rem;
    background: #e3f2fd;
    color: #1976d2;
    padding: 1px 3px;
    border-radius: 2px;
    display: block;
    margin-top: 2px;
    line-height: 1.1;
}

.moon-phase {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.9rem;
}

.historical-event {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.calendar th {
    background: #f0f0f0;
    font-weight: normal;
    padding: 10px 8px;
    font-size: 0.9rem;
    color: #333333;
    text-transform: none;
    letter-spacing: normal;
}

.calendar td {
    width: 14.28%;
    height: 85px;
    padding: 6px;
    font-size: 0.9rem;
    background: white;
}

.calendar .day-number {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 1rem;
}

.calendar .holiday {
    background: #ffe5e5;
}

.calendar .holiday .day-number {
    color: #333333;
    font-weight: bold;
}

.calendar .weekend {
    background: #fafafa;
    color: #333333;
}

.calendar .other-month {
    color: #cccccc;
    background: #fafafa;
}

.calendar .today {
    background: #e6f3ff;
    color: #333333;
    font-weight: bold;
    border: 2px solid #0077cc;
}

.calendar .holiday-name {
    font-size: 0.65rem;
    background: #d32f2f;
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    display: block;
    margin-top: 2px;
    line-height: 1.1;
    font-weight: normal;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 15px;
    background: #0077cc;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-weight: normal;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 10px;
    font-family: Arial, sans-serif;
}

.btn:hover {
    background: #005fa3;
    text-decoration: none;
}

.btn-secondary {
    background: #666666;
    color: white;
}

.btn-secondary:hover {
    background: #555555;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

/* Navigation between months */
.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.month-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.month-nav a:hover {
    background: var(--secondary-color);
}

/* Content sections */
.content-section {
    background: white;
    border: 1px solid #dddddd;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Statistics and Facts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #dddddd;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0077cc;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #666666;
    margin-top: 0.3rem;
}

/* Lists */
.holidays-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.holidays-list li {
    padding: 8px 0;
    border-bottom: 1px solid #dddddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

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

.holiday-date {
    font-weight: bold;
    color: #d32f2f;
}

.fun-facts {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    border: 1px solid #dddddd;
}

.fun-facts h3 {
    color: #0077cc;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.fun-facts ul {
    list-style: disc;
    margin-left: 20px;
}

.fun-facts li {
    padding: 0.3rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Year Grid */
.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.year-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.year-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.month-link {
    padding: 0.5rem;
    background: var(--secondary-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.month-link:hover {
    background: var(--primary-color);
    color: white;
}

/* SVG Animations */
.month-animation {
    max-width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: block;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .calendar td {
        height: 65px;
        padding: 4px;
        font-size: 0.8rem;
    }
    
    .calendar .holiday-name {
        font-size: 0.55rem;
        padding: 1px 2px;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .month-nav {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .calendar-container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .month-animation {
        max-width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .calendar td {
        height: 50px;
        font-size: 0.75rem;
    }
    
    .calendar .holiday-name {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .month-animation {
        max-width: 80px;
        height: 80px;
    }
}

/* PDF Export Styles */
.pdf-export .header,
.pdf-export .nav,
.pdf-export .breadcrumbs,
.pdf-export .month-nav,
.pdf-export .footer,
.pdf-export .content-section,
.pdf-export .btn-group {
    display: none !important;
}

.pdf-export .calendar-container {
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: 2px solid #000;
}

.printing .calendar-container {
    transform: scale(1);
    transform-origin: top left;
}

/* Animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.calendar-container {
    animation: fadeIn 0.6s ease-out;
}

.content-section {
    animation: fadeIn 0.8s ease-out;
}

/* Additional Button Styles */
.btn-tertiary {
    background: #17a2b8;
    color: white;
}

.btn-tertiary:hover {
    background: #138496;
}

.btn-outline {
    background: transparent;
    color: #0077cc;
    border: 2px solid #0077cc;
}

.btn-outline:hover {
    background: #0077cc;
    color: white;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Enhanced Footer */
.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-content a {
    color: #0077cc;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Holiday and Quarterly Page Styles */
.holidays-grid {
    margin: 2rem 0;
}

.holidays-table {
    overflow-x: auto;
}

.holidays-table table {
    width: 100%;
    height: auto;
}

.holidays-table th,
.holidays-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #e9ecef;
}

.holidays-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.federal-badge {
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.observance-badge {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.quarter-details {
    font-size: 0.9rem;
    line-height: 1.4;
}

.quarter-details p {
    margin: 0.5rem 0;
}

.quarter-details strong {
    color: #0077cc;
}