/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

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

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-logo {
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
}

.logo a:hover {
    color: #1d4ed8;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #f1f5f9;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #64748b;
}

/* Slideshow Styles */
.slideshow {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin-top: 80px;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 600px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.slide-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dot.active {
    background: white;
    border-color: white;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Main Content */
.main {
    margin-top: 0;
}

/* Hero Section */
.hero {
    background: #60B84D;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-announcement {
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.announcement-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: announcementSlideIn 0.5s ease-out;
}

@keyframes announcementSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcement-content i {
    color: #2563eb;
    font-size: 1.25rem;
}

#announcement-text {
    flex: 1;
    color: #fbbf24;
    font-weight: 500;
    line-height: 1.4;
}

.announcement-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.announcement-close:hover {
    color: #dc2626;
    background-color: #fef2f2;
}

/* Search Section */
.search-section {
    padding: 2rem 0;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.clear-search {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: #2563eb;
}

/* Sections */
.featured-posts,
.categories-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.post-category {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.post-date {
    color: #64748b;
    font-size: 0.875rem;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #2563eb;
}

.post-excerpt {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-author {
    color: #64748b;
    font-size: 0.875rem;
}

.read-more {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1d4ed8;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.category-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.category-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #1d4ed8;
}

/* Post Single Page - A4 Format */
.post-single {
    padding: 2rem 0;
    background: #f8fafc;
    min-height: 100vh;
}

.post-single .container {
    max-width: 794px; /* A4 width in pixels at 96 DPI */
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 1123px; /* A4 height in pixels at 96 DPI */
    padding: 2.5cm 2cm; /* Standard document margins */
}

.post-single .post-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

.post-single .post-category {
    margin-bottom: 1rem;
}

.post-single .category-badge {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.post-single .category-badge a {
    color: inherit;
    text-decoration: none;
}

.post-single .category-badge a:hover {
    color: #1d4ed8;
}

.post-single .post-title {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 1rem;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: #1f2937;
    text-align: center;
}

.post-single .post-meta {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
}

.post-single .post-meta-date {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.post-single .meta-separator {
    color: #64748b;
    font-weight: bold;
    margin-right: 0.25rem;
}

.post-single .author-name {
    font-weight: 500;
    color: #374151;
}

.post-single .meta-separator {
    color: #9ca3af;
    font-weight: bold;
}

.post-single .post-date {
    color: #64748b;
}

.post-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    text-align: justify;
    margin-bottom: 2rem;
}

.post-content h2,
.post-content h3 {
    margin: 1.5rem 0 0.75rem 0;
    color: #1f2937;
    font-weight: 600;
    page-break-after: avoid;
}

.post-content p {
    margin-bottom: 1rem;
    text-indent: 1.5em;
    orphans: 3;
    widows: 3;
}

.post-content p:first-child {
    text-indent: 0;
}

.post-single .post-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #64748b;
}

.post-tags .tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-link {
    color: #64748b;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.share-link:hover {
    color: #2563eb;
}

.post-navigation {
    margin-top: 3rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* Print Styles for A4 */
@media print {
    .post-single {
        background: white;
        box-shadow: none;
        padding: 0;
    }

    .post-single .container {
        box-shadow: none;
        margin: 0;
        padding: 1cm;
        max-width: none;
        min-height: auto;
    }

    .post-navigation,
    .post-share {
        display: none;
    }
}

/* Category Pages */
.category-header {
    background: #f8fafc;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.category-stats {
    color: #64748b;
    font-weight: 500;
}

.category-posts {
    padding: 4rem 0;
}

/* Login Page */
.login-section {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
}

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

.login-help {
    text-align: center;
    margin-top: 1rem;
}

.login-help p {
    color: #64748b;
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: #475569;
}

.btn-outline {
    background-color: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.btn-outline:hover {
    background-color: #2563eb;
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Empty States */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-posts i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-message {
    text-align: center;
    padding: 4rem 2rem;
}

.error-message h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.error-message p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #60B84D;
    color: black;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: black;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

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

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

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

.footer-links a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #9ca3af;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #2563eb;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: black;
}

/* Slideshow Responsive */
@media (max-width: 768px) {
    .slideshow {
        height: 50vh;
        min-height: 350px;
        max-height: 600px;
    }

    .slide-content {
        padding: 1.5rem;
        max-width: 90%;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .prev-btn, .next-btn {
        padding: 0.8rem;
        font-size: 1.2rem;
    }

    .dots {
        bottom: 20px;
    }

    .dot {
        width: 12px;
        height: 12px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

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

    .post-single .post-title {
        font-size: 1.5rem;
    }

    .post-single .container {
        max-width: 100%;
        min-height: auto;
        padding: 1.5rem;
        margin: 1rem;
    }

    .post-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .post-content p {
        text-indent: 1em;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-single .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-posts,
    .categories-section {
        padding: 2rem 0;
    }
    
    .post-card,
    .category-card {
        padding: 2rem;
    }

    .post-single .container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .post-single .post-title {
        font-size: 1.25rem;
    }

    .post-content {
        font-size: 0.9rem;
    }

    .post-content p {
        text-indent: 0.5em;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #dc2626;
    background-color: #fef2f2;
}

.modal-body {
    padding: 1.5rem;
    color: #374151;
    line-height: 1.6;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}