* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --teal-color: #1a631a;
    --teal-dark: #145214;
    --teal-light: #2a8a2a;
    --primary-color: #1a631a;
    --secondary-color: #145214;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background: var(--teal-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-time {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-time i {
    margin-right: 5px;
}

.top-bar-right {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon.facebook {
    background: #1877f2;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-icon.youtube {
    background: #ff0000;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Hero Section / Header */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 99, 26, 0.9) 0%, rgba(20, 82, 20, 0.9) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: 25px;
    animation: fadeInDown 1s ease;
    text-align: center;
    width: 100%;
}

.school-logo {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Fallback jika logo tidak ada */
.logo-container::before {
    content: '\f19c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: var(--white);
    display: none;
}

.logo-container:has(img[src=""])::before,
.logo-container:not(:has(img[src]))::before {
    display: block;
}

.logo-container img[src=""],
.logo-container img:not([src]) {
    display: none;
}

.school-name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.school-slogan {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.2s ease;
    max-width: 700px;
    margin: 0 auto;
}

/* Navigation */
.main-nav {
    background: var(--teal-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.nav-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.nav-menu-row1 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu-row2 {
    /* Baris kedua */
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 18px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--teal-dark);
}

.nav-menu a i {
    font-size: 0.85rem;
}

.nav-menu a.has-dropdown::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-icon-btn,
.search-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-btn:hover,
.search-btn:hover {
    background: var(--teal-dark);
}

/* Top Tags Section */
.top-tags-section {
    background: var(--white);
    padding: 25px 0;
    border-bottom: 1px solid #e0e0e0;
}

.tags-header {
    margin-bottom: 15px;
}

.tags-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--teal-light);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* News Ticker Section */
.news-ticker-section {
    background: var(--teal-color);
    padding: 12px 0;
    color: var(--white);
}

.news-ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.news-label {
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.news-item {
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

.news-item:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Main Content */
.main-content {
    padding: 40px 0 60px;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: var(--accent-color);
}

.section-header-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--teal-color);
    border-bottom-color: var(--teal-color);
}

.tab-btn:hover {
    color: var(--teal-color);
}

/* Articles Section */
.articles-section {
    margin-bottom: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.article-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--teal-color), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.article-content {
    padding: 20px;
}

.article-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Calendar Section */
.calendar-section {
    background: var(--white);
    padding: 50px 0;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.calendar-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.calendar-widget {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    background: var(--teal-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.calendar-nav:hover {
    background: var(--teal-dark);
}

.calendar-month {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--teal-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    color: var(--teal-color);
    background: var(--white);
    border-radius: 5px;
    font-size: 0.85rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.calendar-day:hover {
    background: var(--teal-light);
    color: var(--white);
}

.calendar-day.today {
    background: var(--teal-color);
    color: var(--white);
    font-weight: 700;
}

.calendar-day.has-event {
    background: var(--accent-color);
    color: var(--white);
}

.calendar-day.other-month {
    color: var(--text-light);
    opacity: 0.5;
}

.calendar-events {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
}

.events-list {
    list-style: none;
}

.event-item {
    padding: 18px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--teal-color);
    transition: transform 0.3s ease;
}

.event-item:hover {
    transform: translateX(5px);
}

.event-date {
    color: var(--teal-color);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.event-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.event-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--teal-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h3 {
    margin-bottom: 15px;
    color: var(--teal-light);
}

/* Footer logo */
.footer-logo {
    width: 80px;
    height: auto;
    display: block;
    margin-bottom: 12px;
}

.footer-info p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links h4 {
    margin-bottom: 15px;
    color: var(--teal-light);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--teal-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .school-name {
        font-size: 2rem;
    }
    
    .school-slogan {
        font-size: 1rem;
    }
    
    .nav-content {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav .container {
        flex-direction: column;
    }
    
    .nav-right {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .news-ticker-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .calendar-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .school-name {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .tags-container {
        justify-content: center;
    }
}
