/* 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;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.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;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid white;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #64748b;
    background: none;
    border: none;
    padding: 0.5rem;
    margin: 0;
    transition: all 0.3s ease;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    color: #2563eb;
    transform: scale(1.1);
}

.mobile-menu-toggle.active {
    color: #2563eb;
}

.nav-fullwidth {
    padding-left: 15px;
    padding-right: 15px;
}

.footer-fullwidth {
    padding-left: 15px;
    padding-right: 15px;
}

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 20;
    padding: 1.5rem;
    display: none; /* Hidden by default, controlled by JavaScript */
    border: 5px solid blue !important; /* Make it obvious for testing */
}

.mobile-menu-overlay.show {
    display: block !important; /* Show when JavaScript adds 'show' class */
    background: yellow !important; /* Make it obvious it's showing */
}

/* 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(350px, 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-thumbnail {
    margin-bottom: 1rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.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: #73D216;
    color: black;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    width: 100%;
}

.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;
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.lg\:col-span-1 { grid-column: span 1 / span 1; }
.lg\:col-span-2 { grid-column: span 2 / span 2; }
.lg\:col-span-3 { grid-column: span 3 / span 3; }

/* Flexbox Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* Spacing */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.ml-4 { margin-left: 1rem; }
.mr-2 { margin-right: 0.5rem; }

/* Width & Height */
.w-5 { width: 1.25rem; }
.w-20 { width: 5rem; }
.w-full { width: 100%; }
.h-5 { height: 1.25rem; }
.h-20 { height: 5rem; }

/* Colors */
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.text-green-700 { color: #047857; }
.text-red-700 { color: #b91c1c; }
.text-yellow-700 { color: #a16207; }

.bg-indigo-50 { background-color: #eef2ff; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }
.bg-yellow-50 { background-color: #fffbeb; }
.bg-indigo-700 { background-color: #4338ca; }
.bg-white { background-color: #ffffff; }

.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }

/* Borders */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Text */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.leading-relaxed { line-height: 1.625; }

/* Lists */
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }

/* Hover Effects */
.hover\:text-indigo-800:hover { color: #3730a3; }

/* Transitions */
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-150 { transition-duration: 150ms; }

/* Course Sidebar */
.course-sidebar {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: sticky;
    top: 2rem;
    border: 1px solid #e5e7eb;
}

/* Counter Animation */
.counter {
    counter-reset: num var(--num);
}
.counter::before {
    content: counter(num);
    animation: count 2s ease-out forwards;
}
@keyframes count {
    from { content: '0'; }
    to { content: counter(num); }
}

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

    .nav.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
        padding: 1rem 0;
        border-bottom: 1px solid #e5e7eb;
        z-index: 1001;
        animation: slideDown 0.3s ease-out;
        gap: 0 !important;
    }

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

    .nav.active .nav-link {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f3f4f6;
        justify-content: flex-start;
        color: #374151;
        transition: all 0.2s ease;
        display: flex !important;
        width: 100%;
    }

    .nav.active .nav-link:hover {
        background-color: #f9fafb;
        color: #2563eb;
        padding-left: 2rem;
    }

    .nav.active .nav-link:last-child {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1002;
        position: relative;
    }

.mobile-menu-toggle.active i::before {
    content: '\f00d'; /* close icon */
}

    .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;
}
