/* 香港公眾假期網站樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #dc143c;
    --secondary-color: #1e3a8a;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e5e7eb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    font-size: 1.05rem;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    min-height: calc(100vh - 400px);
}

.hero {
    background: linear-gradient(135deg, #fef3f4 0%, #e0e7ff 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

/* Holiday Table */
.holiday-section {
    margin-bottom: 3rem;
}

.holiday-section h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.holiday-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.holiday-table table {
    width: 100%;
    border-collapse: collapse;
}

.holiday-table th {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

.holiday-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.holiday-table tr:last-child td {
    border-bottom: none;
}

.holiday-table tr:hover {
    background-color: var(--light-bg);
}

.date {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

.day {
    color: #666;
    font-size: 0.95rem;
}

.holiday-name {
    font-weight: 600;
    color: var(--text-color);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.blog-card h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.blog-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-card a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Blog Article */
.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.article-content h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* SEO Section */
.seo-description {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 8px;
    margin: 3rem 0;
    border-left: 4px solid var(--primary-color);
}

.seo-description h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.seo-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Contact & About Pages */
.content-section {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.content-section h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.contact-info {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.copyright {
    margin-top: 1rem;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .site-title {
        font-size: 1.5rem;
    }

    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.95rem;
    }

    .holiday-table th,
    .holiday-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
    }

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

    .article-content {
        padding: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .holiday-table th,
    .holiday-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }

    .date {
        font-size: 0.9rem;
    }
}

/* Hero Image */
.hero-image {
    max-width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.action-btn {
    background: white;
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.action-btn span {
    font-size: 1.2rem;
}

/* Timeline Section */
.timeline-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.timeline-section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 2rem 0;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc143c 0%, #1e3a8a 100%);
    z-index: 1;
}

.timeline-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.timeline-marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 4px solid;
    position: relative;
    font-weight: bold;
    color: white;
}

.timeline-marker.jan { border-color: #dc143c; background: #dc143c; }
.timeline-marker.apr { border-color: #8b4513; background: #8b4513; }
.timeline-marker.may { border-color: #228b22; background: #228b22; }
.timeline-marker.jul { border-color: #1e3a8a; background: #1e3a8a; }
.timeline-marker.oct { border-color: #ff8c00; background: #ff8c00; }
.timeline-marker.dec { border-color: #b22222; background: #b22222; }

.timeline-content strong {
    display: block;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Calendar Buttons */
.cal-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0.25rem 0.5rem;
}

.cal-btn:hover {
    transform: scale(1.2);
}

.table-note {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
}

/* Blog Card Images */
.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3f4 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

/* Inline Links */
.inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed var(--primary-color);
    transition: all 0.3s ease;
}

.inline-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    border-bottom-style: solid;
}

/* Footer enhancements */
footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

/* Print Styles */
@media print {
    .no-print, .action-btn, .quick-actions, nav, footer {
        display: none !important;
    }
    
    header {
        position: static;
        background: white;
        color: black;
        box-shadow: none;
        border-bottom: 2px solid #333;
    }
    
    .site-title {
        color: black;
        text-shadow: none;
    }
    
    .hero {
        background: white;
        box-shadow: none;
        padding: 1rem;
    }
    
    .hero h1 {
        color: black;
        font-size: 1.8rem;
    }
    
    .timeline-section {
        display: none;
    }
    
    .holiday-table {
        box-shadow: none;
        border: 1px solid #333;
    }
    
    .holiday-table th {
        background: #f0f0f0;
        color: black;
    }
    
    .blog-grid, .seo-description {
        display: none;
    }
    
    main {
        padding: 0;
        margin: 0;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
}

/* Responsive Timeline */
@media (max-width: 992px) {
    .timeline {
        flex-direction: column;
        gap: 2rem;
    }
    
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 30px;
        width: 4px;
        height: auto;
        background: linear-gradient(180deg, #dc143c 0%, #1e3a8a 100%);
    }
    
    .timeline-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1.5rem;
    }
    
    .timeline-marker {
        margin: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .quick-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-img {
        max-height: 250px;
    }
    
    .blog-card-image {
        height: 150px;
    }
    
    .cal-btn {
        font-size: 1.2rem;
        padding: 0.15rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .timeline-content strong {
        font-size: 1rem;
    }
    
    .timeline-content p {
        font-size: 0.85rem;
    }
    
    .timeline-marker {
        width: 50px;
        height: 50px;
    }
}
