/**
 * Website Sekolah - Main Stylesheet
 * Developer: Metro Software Developer
 * Modern, Clean, Responsive Design
 */

:root {
    --primary: #667eea;
    --primary-light: #7c8ff5;
    --primary-dark: #1e3c72;
    --secondary: #764ba2;
    --accent: #2a5298;
    --dark: #1e3c72;
    --light: #f5f7fc;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 5px 30px rgba(102,126,234,0.15);
    --shadow-sm: 0 2px 10px rgba(102,126,234,0.1);
    --radius: 15px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: var(--white);
    padding: 10px 0;
    font-size: 13px;
}

.top-info {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.top-info li i {
    margin-right: 8px;
    color: var(--secondary);
}

.social-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.social-icons a {
    color: var(--white);
    opacity: 0.8;
}

.social-icons a:hover {
    opacity: 1;
    color: var(--secondary);
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.brand-text small {
    font-size: 0.75rem;
    color: var(--gray);
}

.navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 15px !important;
    font-size: 14px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar-nav .nav-link i {
    font-size: 12px;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--radius-sm);
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Overlay tipis: gambar slider terlihat jelas, teks tetap terbaca (gradien gelap hanya di bawah) */
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
}

.hero-content {
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30,60,114,0.4);
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary);
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--light);
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.section-title .line {
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 15px auto;
    border-radius: 2px;
}

/* ===== CARDS ===== */
.card-custom {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: none;
    height: 100%;
}

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

.card-custom .card-img {
    height: 200px;
    object-fit: cover;
}

.card-custom .card-body {
    padding: 25px;
}

.card-custom .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.card-custom .card-title a {
    color: inherit;
}

.card-custom .card-title a:hover {
    color: var(--primary);
}

.card-custom .card-text {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.card-custom .card-meta {
    font-size: 12px;
    color: var(--gray);
}

.card-custom .card-meta i {
    margin-right: 5px;
    color: var(--secondary);
}

/* ===== APP CARDS ===== */
.app-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

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

.app-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.app-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.app-card p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== STATS ===== */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-item .label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== WELCOME ===== */
.welcome-section .welcome-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-section .welcome-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.welcome-section .welcome-content .signature {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.welcome-section .welcome-content .signature h5 {
    font-weight: 700;
    margin-bottom: 5px;
}

.welcome-section .welcome-content .signature p {
    color: var(--gray);
    font-size: 14px;
    margin: 0;
}

/* Isi sambutan/pidato kepala sekolah (HTML dari editor) - tampil sama seperti di pengaturan */
.welcome-section .sambutan-html {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray);
}
.welcome-section .sambutan-html p {
    margin-bottom: 0.75em;
}
.welcome-section .sambutan-html p:last-child {
    margin-bottom: 0;
}
.welcome-section .sambutan-html h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 1em;
    margin-bottom: 0.5em;
}
.welcome-section .sambutan-html h2:first-child {
    margin-top: 0;
}
.welcome-section .sambutan-html h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-top: 0.85em;
    margin-bottom: 0.4em;
}
.welcome-section .sambutan-html strong {
    font-weight: 700;
}
.welcome-section .sambutan-html em {
    font-style: italic;
}
.welcome-section .sambutan-html u {
    text-decoration: underline;
}
.welcome-section .sambutan-html ul,
.welcome-section .sambutan-html ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}
.welcome-section .sambutan-html li {
    margin-bottom: 0.35em;
}
.welcome-section .sambutan-html a {
    color: var(--primary);
    text-decoration: underline;
}
.welcome-section .sambutan-html a:hover {
    color: var(--secondary);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, #1e3c72 0%, #667eea 100%);
    padding: 60px 0;
    color: var(--white);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb-item.active {
    color: var(--white);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* ===== FOOTER ===== */
.footer {
    background: #1e3c72;
    color: var(--white);
}

.footer-main {
    padding: 60px 0;
}

.footer-widget h4,
.footer-widget h5 {
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-widget p {
    opacity: 0.8;
    font-size: 14px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.footer-contact li {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.footer-contact i {
    width: 25px;
    color: var(--secondary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.footer-social a:hover {
    background: #667eea;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
}

.footer-bottom a {
    transition: all 0.3s;
}

.footer-bottom a:hover {
    color: #fff !important;
    opacity: 1;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: var(--white);
    transform: translateY(-5px);
}

/* ===== UTILITIES ===== */
.bg-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

/* ===== PAGINATION ===== */
.pagination {
    justify-content: center;
    gap: 5px;
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    color: var(--dark);
}

.page-link:hover {
    background: #667eea;
    color: var(--white);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: var(--white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .hero-slide {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .stat-item .number {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-slide {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .footer-main {
        padding: 40px 0;
    }
}

/* ===== GALLERY ===== */
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.9) 0%, rgba(118,75,162,0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* ===== CONTACT ===== */
.contact-info-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.contact-info-box .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.contact-form .form-control {
    border-radius: var(--radius-sm);
    padding: 15px;
    border: 2px solid #e9ecef;
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: none;
}

/* ===== TEACHER CARD ===== */
.teacher-card {
    text-align: center;
    padding: 30px 20px;
}

.teacher-card .photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--light);
    box-shadow: var(--shadow-sm);
}

.teacher-card h5 {
    font-weight: 700;
    margin-bottom: 5px;
}

.teacher-card .position {
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
}

.teacher-card .subject {
    color: var(--gray);
    font-size: 13px;
}

/* ===== NEWS DETAIL ===== */
.news-detail .featured-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.news-detail .meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 14px;
}

.news-detail .content {
    font-size: 16px;
    line-height: 1.8;
}

.news-detail .content p {
    margin-bottom: 20px;
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h5 {
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
}

.sidebar-widget .recent-post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.sidebar-widget .recent-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget .recent-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.sidebar-widget .recent-post h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.sidebar-widget .recent-post small {
    color: var(--gray);
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
