/* ==========================================================================
   DESIGN SYSTEM - SMAN 1 TANJUNGPINANG (EMERALD ACADEMIC PRESTIGE)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Tokens - Modern SMAN 1 Tanjungpinang Blue & Gold Palette */
    --primary-color: #0b63c5;
    --primary-light: #1a7ef2;
    --primary-dark: #073f80;
    --accent-color: #ffd214;
    --accent-hover: #e6bb0d;
    
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #101419;
    --bg-dark-panel: #1b222a;
    
    --text-dark: #101419;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    
    /* Font Tokens */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    width: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gold {
    color: var(--accent-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 74, 39, 0.2);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--accent-color);
    cursor: pointer;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

/* ==========================================================================
   HEADER / TOP BAR & NAVIGATION
   ========================================================================== */

/* Top Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 1.5rem;
}

.top-bar-info a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.85;
}

.top-bar-info a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.top-bar-portal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.portal-link {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap; /* Prevent words from wrapping on separate lines */
}

.portal-link:hover {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

.top-bar-socials {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
}

.top-bar-socials a {
    opacity: 0.8;
}

.top-bar-socials a:hover {
    opacity: 1;
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
}

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

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

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

.logo-text h1 {
    font-size: 1.35rem;
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-weight: 700;
}

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

.nav-item {
    position: relative;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-dark);
    padding: 0.5rem 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-item.active .nav-link::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(11, 99, 197, 0.15);
    min-width: 220px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-bounce);
    border: 1.5px solid rgba(11, 99, 197, 0.1);
    border-top: 3px solid var(--accent-color);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.dropdown-link:hover {
    background-color: rgba(11, 99, 197, 0.05);
    color: var(--primary-color) !important;
    padding-left: 1.75rem;
    border-left: 3px solid var(--accent-color);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   HERO / CAROUSEL SLIDER
   ========================================================================== */

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.hero-slider.has-transition .slide {
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    z-index: 10;
}

.slide-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.slide-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.slide-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 1.2s ease;
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: var(--text-light);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 20;
    transition: var(--transition-smooth);
}

.slider-arrow:hover {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

.slider-arrow-prev {
    left: 2rem;
}

.slider-arrow-next {
    right: 2rem;
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slider-dot.active {
    background-color: var(--accent-color);
    transform: scale(1.3);
}

/* ==========================================================================
   PORTAL QUICK LINKS
   ========================================================================== */

.portal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: -3.5rem;
    position: relative;
    z-index: 30;
    padding-bottom: 4rem;
}

.portal-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(4, 74, 39, 0.15);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.portal-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(4, 74, 39, 0.05);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: var(--transition-smooth);
}

.portal-card:hover .icon-box {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-color);
    transform: rotate(360deg);
}

.portal-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.portal-card:hover h3 {
    color: var(--text-light);
}

.portal-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.portal-card:hover p {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   PRINCIPAL WELCOME (SAMBUTAN KEPALA SEKOLAH)
   ========================================================================== */

.welcome-section {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.welcome-image-container {
    position: relative;
}

.welcome-img-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.welcome-img-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.welcome-name-card {
    position: absolute;
    bottom: -1.5rem;
    left: 2rem;
    right: 2rem;
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 5px solid var(--accent-color);
}

.welcome-name-card h3 {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.welcome-name-card p {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 1px;
}

.welcome-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.welcome-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
}

.welcome-speech {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    font-style: italic;
    border-left: 3px solid rgba(4, 74, 39, 0.2);
    padding-left: 1.5rem;
}

.welcome-speech p {
    margin-bottom: 1rem;
}

.welcome-signature {
    margin-top: 2rem;
}

.welcome-sig-text {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
}

/* ==========================================================================
   STATISTICS SECTION
   ========================================================================== */

.stats-section {
    background-color: var(--primary-dark);
    background-image: linear-gradient(135deg, var(--primary-dark) 0%, #032b17 100%);
    color: var(--text-light);
    padding: 5rem 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.stat-item:hover {
    background-color: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

/* ==========================================================================
   BLOG / BERITA FILTERABLE GRID
   ========================================================================== */

.blog-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.filter-tab {
    background-color: var(--bg-white);
    border: 1px solid rgba(4, 74, 39, 0.1);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.filter-tab:hover, .filter-tab.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(4, 74, 39, 0.04);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.blog-img-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.blog-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.blog-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.blog-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

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

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.blog-readmore {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-readmore:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   ACADEMIC & ACTIVITIES GALLERY
   ========================================================================== */

.gallery-section {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(4, 74, 39, 0.85) 0%, rgba(4, 74, 39, 0.1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

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

.gallery-overlay h4 {
    color: var(--text-light);
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    transform: translateY(10px);
    transition: var(--transition-bounce);
}

.gallery-overlay span {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: translateY(10px);
    transition: var(--transition-bounce);
}

.gallery-item:hover .gallery-overlay h4,
.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Custom Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
    margin: auto;
}

/* Article Reader Modal Styling */
#article-modal .lightbox-content {
    width: 90%;
    max-width: 800px;
    background-color: var(--bg-white);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    margin: auto;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-article-scroll {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for article reader */
.modal-article-scroll::-webkit-scrollbar {
    width: 6px;
}
.modal-article-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.modal-article-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.1);
    border-radius: 3px;
}
.modal-article-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(15, 23, 42, 0.25);
}

#article-modal .lightbox-close {
    color: var(--text-dark);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
}

#article-modal .lightbox-close:hover {
    color: var(--primary-color);
}

#article-modal .modal-article-header {
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding-right: 3rem; /* Prevents title/badge from overlapping absolute close button */
}

#article-modal .modal-article-category {
    margin-bottom: 0.75rem;
    display: inline-block;
}

#article-modal .modal-article-title {
    font-size: 1.8rem;
    line-height: 1.3;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

#article-modal .blog-meta {
    margin-bottom: 0;
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

#article-modal .modal-article-image-box {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    max-height: 350px;
}

#article-modal .modal-article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#article-modal .modal-article-body {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-line;
    word-break: break-word;
    overflow-wrap: break-word;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption {
    color: var(--text-light);
    text-align: center;
    margin-top: 1rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   CONTACT FORM & CONTACT INFO
   ========================================================================== */

.contact-section {
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.contact-card-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(4, 74, 39, 0.03);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(4, 74, 39, 0.05);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Form Styles */
.contact-form-card {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(4, 74, 39, 0.04);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.2);
    background-color: var(--bg-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 74, 39, 0.1);
    background-color: var(--bg-white);
}

textarea.form-control {
    resize: vertical;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background-color: rgba(4, 74, 39, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(4, 74, 39, 0.15);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 5rem 0 2rem 0;
    font-size: 0.9rem;
    border-top: 5px solid var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-column h3 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 1.75rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-about p {
    color: rgba(248, 250, 252, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

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

.footer-links a {
    color: rgba(248, 250, 252, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 0.25rem;
}

.footer-map-container {
    border-radius: 12px;
    overflow: hidden;
    height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(248, 250, 252, 0.5);
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   PROFILE VIEW
   ========================================================================== */

.profile-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 6rem 0;
    text-align: center;
}

.profile-hero h1 {
    color: var(--text-light);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.profile-breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.profile-breadcrumbs span {
    color: var(--accent-color);
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3.5rem;
    padding: 5rem 0;
}

.profile-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.profile-tabs {
    background-color: var(--bg-white);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(4, 74, 39, 0.03);
}

.profile-tab-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-tab-btn:hover, .profile-tab-btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.profile-content-card {
    background-color: var(--bg-white);
    padding: 4rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(4, 74, 39, 0.03);
    min-height: 500px;
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.profile-tab-content.active {
    display: block;
}

.profile-tab-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 0.75rem;
}

.profile-tab-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent-color);
}

.profile-tab-content p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 1.5rem;
}

.profile-tab-content h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem 0;
    color: var(--primary-color);
}

.profile-tab-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.profile-tab-content li {
    margin-bottom: 0.75rem;
    position: relative;
    font-size: 1.05rem;
    line-height: 1.6;
}

.profile-tab-content li::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* ==========================================================================
   ADMIN LOGIN & DASHBOARD
   ========================================================================== */

.admin-login-body {
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.admin-login-card {
    background-color: var(--bg-dark-panel);
    padding: 3.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

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

.admin-login-header h1 {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.admin-login-header p {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-login-card label {
    color: rgba(255, 255, 255, 0.8);
}

.admin-login-card .form-control {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.admin-login-card .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Admin Dashboard Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1010;
    overflow-y: auto;
    transition: var(--transition-smooth);
}

.admin-logo {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-logo h2 {
    color: var(--text-light);
    font-size: 1.4rem;
}

.admin-logo span {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 700;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-smooth);
}

.admin-nav-link:hover, .admin-nav-link.active {
    color: var(--text-light);
    background-color: var(--primary-color);
}

.admin-nav-link.logout {
    color: #ef4444;
}

.admin-nav-link.logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.admin-main {
    flex-grow: 1;
    margin-left: 260px;
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: var(--transition-smooth);
}

.admin-header-bar {
    background-color: var(--bg-white);
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.admin-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.admin-sidebar-toggle:hover {
    background-color: rgba(11, 99, 197, 0.05);
}

.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-content {
    padding: 3rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Admin Dashboard Grid stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.admin-stat-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-stat-info h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.admin-stat-info p {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary-dark);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(4, 74, 39, 0.05);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Custom Admin Table */
.admin-card {
    background-color: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 3rem;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.02);
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    font-size: 0.95rem;
}

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

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(4, 74, 39, 0.1);
    color: var(--primary-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: var(--transition-smooth);
}

.btn-edit {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.btn-edit:hover {
    background-color: #3b82f6;
    color: var(--text-light);
}

.btn-delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background-color: #ef4444;
    color: var(--text-light);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   CUSTOM PAGINATION STYLES (EMERALD & GOLD)
   ========================================================================== */

.pagination-wrapper {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination-wrapper nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li {
    display: inline-block;
}

.pagination li a, .pagination li span, .pagination li .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.85rem;
    border-radius: 8px;
    background-color: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-decoration: none;
}

.pagination li a:hover, .pagination li .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 99, 197, 0.25);
}

.pagination li.active span, .pagination li.active .page-link, .pagination li .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    cursor: default;
    box-shadow: 0 4px 12px rgba(11, 99, 197, 0.2);
}

.pagination li.disabled span, .pagination li.disabled .page-link {
    background-color: var(--bg-light) !important;
    color: var(--text-muted) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* Pagination description text (e.g. "Showing 1 to 6 of 12 entries") */
.pagination-wrapper .text-muted, .pagination-wrapper .text-sm, .pagination-wrapper p {
    font-size: 0.85rem;
    color: var(--text-muted) !important;
    margin-top: 0.5rem;
}

/* ==========================================================================
   RESPONSIVE GRIDS, OVERLAYS & TABLES FOR ADMIN PANEL
   ========================================================================== */
.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.admin-gallery-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    align-items: start;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Sidebar responsive overlay behind active mobile sidebar */
.admin-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 20, 25, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1005; /* Just below sidebar z-index (1010) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.admin-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Make admin tables scroll beautifully instead of squeezing */
.admin-table {
    min-width: 800px;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 1024px) {
    /* Navigation Drawer Triggered at Tablet/Mobile Widths (< 1024px) */
    .menu-toggle {
        display: flex;
        z-index: 100000 !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 400px;
        height: 100vh !important;
        overflow-y: auto !important;
        background-color: var(--bg-white);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 3rem;
        z-index: 99999 !important;
        gap: 2rem;
        display: none !important; /* Completely hide when closed to prevent horizontal overflow */
    }
    
    .nav-menu.active {
        display: flex !important;
        animation: slideInMobileMenu 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
        width: 100% !important;
        background-color: rgba(11, 99, 197, 0.04) !important;
        padding-left: 1.5rem !important;
        margin-top: 0.5rem !important;
        border: none !important;
        border-left: 3px solid var(--accent-color) !important;
        border-radius: 8px !important;
        transition: none !important;
    }
    
    .dropdown-link:hover {
        background-color: rgba(11, 99, 197, 0.08) !important;
        color: var(--primary-color) !important;
        padding-left: 1.5rem !important;
        border-left: none !important;
    }
    
    .nav-item.open .dropdown-menu {
        display: block;
    }

    .portal-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-top: -2rem;
    }
    
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .welcome-image-container {
        max-width: 420px;
        margin: 0 auto;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-column:last-child {
        grid-column: span 2;
    }
    
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .profile-sidebar {
        position: relative;
        top: 0;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Responsive Admin Panel for Tablets & Portables (< 1024px) */
    .admin-sidebar-toggle {
        display: inline-flex;
        margin-right: 1rem;
    }
    .admin-sidebar {
        left: -260px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.15);
    }
    .admin-sidebar.active {
        left: 0;
    }
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    .admin-header-bar {
        padding: 1.25rem 2rem;
        justify-content: flex-start;
        gap: 1rem;
    }
    .admin-user-profile {
        margin-left: auto;
    }
    .admin-gallery-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem !important;
    }
    
    .blog-content {
        padding: 1.25rem !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .top-bar-info {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .top-bar-portal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    .portal-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .top-bar-socials {
        justify-content: center;
    }

    .hero-slider {
        height: 500px;
    }
    
    .slide-content {
        top: 56% !important; /* Push content down slightly to clear sticky navbar overlap */
    }
    
    .slide-content h2 {
        font-size: 2.0rem;
        margin-bottom: 0.75rem !important;
    }
    
    .slide-content p {
        display: none !important; /* Hide long paragraphs to prevent vertical overflow on tablet */
    }
    
    .slide-buttons .btn-primary {
        display: none !important; /* Hide white secondary button to save space */
    }
    
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .admin-layout {
        display: block;
    }
    
    .admin-sidebar {
        display: flex; /* Override display: none to allow off-canvas toggle */
    }
    
    .admin-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .admin-content {
        padding: 1.25rem;
    }
    
    .admin-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-header-bar {
        padding: 1rem 1.25rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .admin-header-bar h1 {
        font-size: 1.2rem !important;
        margin: 0;
    }
    
    .admin-header-bar p {
        display: none; /* Hide description on very small screens to save space */
    }

    .admin-header-bar > div:first-of-type {
        flex: 1;
        min-width: 150px;
    }
    
    /* Stacking header action buttons below title on mobile */
    .admin-header-bar > div:last-of-type:not(.admin-user-profile) {
        width: 100%;
        flex: 0 0 100%;
        margin-top: 0.25rem;
        display: flex;
    }
    
    .admin-header-bar > div:last-of-type:not(.admin-user-profile) .btn-accent,
    .admin-header-bar > div:last-of-type:not(.admin-user-profile) .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.55rem 1.15rem;
        font-size: 0.85rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    .admin-user-profile h4, .admin-user-profile p {
        display: none; /* Hide profile text on small screens to fit in header bar */
    }
    
    .admin-user-profile {
        gap: 0;
        margin-left: auto;
    }
    
    /* Stats Form Grid and other layout stack updates on mobile */
    .stats-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Mobile-Friendly Stacking for Admin Tables */
    .admin-table-container {
        border: none;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .admin-table {
        min-width: 100% !important;
        display: block;
        width: 100%;
        background: transparent;
    }

    .admin-table thead {
        display: none !important; /* Hide column headers on mobile */
    }

    .admin-table tbody {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        display: block;
        width: 100%;
        background-color: var(--bg-white);
        border: 1px solid rgba(11, 99, 197, 0.08);
        border-radius: 14px;
        padding: 0.75rem 0.5rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
        transition: var(--transition-smooth);
    }

    .admin-table tr:hover {
        background-color: var(--bg-white);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(11, 99, 197, 0.04);
        border-color: rgba(11, 99, 197, 0.15);
    }

    .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(11, 99, 197, 0.03);
        text-align: right;
        font-size: 0.9rem;
    }

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

    /* Print the left data label dynamically from the td's data-label attribute */
    .admin-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--primary-color);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        display: inline-block;
        margin-right: 1.5rem;
    }

    /* Sampul column adjustments to vertical banner cover */
    .admin-table td[data-label="Sampul"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem !important;
    }
    
    .admin-table td[data-label="Sampul"]::before {
        margin-bottom: 0.25rem;
        margin-right: 0;
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .admin-table td[data-label="Sampul"] img {
        width: 100% !important;
        height: 160px !important;
        border-radius: 8px !important;
        object-fit: cover;
        border: 1px solid rgba(0, 0, 0, 0.06);
        display: block;
    }

    /* Action buttons grouping at the bottom of the card */
    .admin-table td.action-btns {
        justify-content: flex-end;
        gap: 0.5rem;
        padding-top: 1rem !important;
        border-top: 1px dashed rgba(11, 99, 197, 0.1);
        margin-top: 0.25rem;
    }
    
    .admin-table td.action-btns::before {
        content: "Aksi";
        margin-right: auto;
    }

    .admin-table .btn-sm {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Vertical stacking for long text columns to prevent layout squeezing */
    .admin-table td[data-label="Judul Berita"],
    .admin-table td[data-label="Nama Pengguna"],
    .admin-table td[data-label="Alamat Email"],
    .admin-table td[data-label="Isi Pesan"],
    .admin-table td[data-label="Isi Pesan Detail"] {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.5rem;
    }
    
    .admin-table td[data-label="Judul Berita"]::before,
    .admin-table td[data-label="Nama Pengguna"]::before,
    .admin-table td[data-label="Alamat Email"]::before,
    .admin-table td[data-label="Isi Pesan"]::before,
    .admin-table td[data-label="Isi Pesan Detail"]::before {
        margin-bottom: 0.25rem;
        margin-right: 0;
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .admin-table td[data-label="Judul Berita"] strong,
    .admin-table td[data-label="Judul Berita"] div,
    .admin-table td[data-label="Nama Pengguna"] strong,
    .admin-table td[data-label="Alamat Email"] strong,
    .admin-table td[data-label="Isi Pesan Detail"] {
        width: 100%;
        text-align: left;
        display: block;
    }

    /* Lightbox Modal close button alignment for mobile/tablet */
    .lightbox-close {
        position: absolute;
        top: 1rem !important;
        right: 1rem !important;
        background: var(--primary-dark) !important;
        color: var(--text-light) !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.5rem !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
        line-height: 1 !important;
        z-index: 99999 !important;
    }

    /* Lightbox article reader modal overrides for tablet */
    #article-modal .lightbox-content {
        padding: 1.75rem !important;
        border-radius: 16px !important;
        margin: auto !important;
        width: 90% !important;
        max-height: 85vh !important;
    }
    
    #article-modal .modal-article-title {
        font-size: 1.5rem !important;
    }
    
    #article-modal .modal-article-image-box {
        max-height: 220px !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem !important;
    }
    
    .blog-content {
        padding: 1rem !important;
    }
    
    .logo-text h1 {
        font-size: 1.15rem !important;
    }
    
    .logo-text span {
        font-size: 0.72rem !important;
    }

    .top-bar-info {
        flex-direction: column !important;
        align-items: center;
        gap: 0.35rem !important;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 0.75rem 1rem !important;
    }
    
    .top-bar-portal {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }
    
    .portal-link {
        font-size: 0.72rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .top-bar-socials {
        justify-content: center !important;
        gap: 1.25rem !important;
        margin-top: 0.25rem !important;
    }
    
    .hero-slider {
        height: 380px; /* Slightly lower height to fit beautifully on compact phones */
    }
    
    .slide-content {
        top: 58% !important; /* Push down to avoid sticky navbar overlap */
        padding: 0 1.25rem !important;
    }
    
    .slide-content h2 {
        font-size: 1.45rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .slider-arrow {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }
    
    .slider-arrow-prev {
        left: 0.5rem !important;
    }
    
    .slider-arrow-next {
        right: 0.5rem !important;
    }
    
    .slider-dots {
        bottom: 1rem !important;
    }
    
    .portal-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-column:last-child {
        grid-column: span 1;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-content-card {
        padding: 2rem;
    }
    
    .admin-login-card {
        padding: 2rem;
    }
    
    /* Lightbox article reader modal overrides for mobile */
    #article-modal .lightbox-content {
        padding: 1.0rem !important;
        border-radius: 12px !important;
        max-height: 90vh !important;
        margin: auto !important;
        width: calc(100% - 2rem) !important;
    }
    
    #article-modal .modal-article-title {
        font-size: 1.25rem !important;
    }
    
    #article-modal .modal-article-image-box {
        max-height: 160px !important;
        margin-bottom: 0.75rem !important;
    }
    
    #article-modal .modal-article-body {
        font-size: 0.875rem !important;
        line-height: 1.6 !important;
    }
    
    #article-modal .blog-meta {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
}

/* ==========================================================================
   RESPONSIVE DATA TABLES (EMERALD & GOLD)
   ========================================================================== */

.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(11, 99, 197, 0.12);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    margin-bottom: 2rem;
    background-color: var(--bg-white);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
    min-width: 500px;
}

.responsive-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.responsive-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(11, 99, 197, 0.08);
    color: var(--text-dark);
    line-height: 1.6;
}

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

.responsive-table tr:nth-child(even) {
    background-color: rgba(11, 99, 197, 0.01);
}

.responsive-table tr:hover {
    background-color: rgba(11, 99, 197, 0.02);
}

.responsive-table .text-center {
    text-align: center;
}

.responsive-table .col-no {
    width: 60px;
    font-weight: 600;
    color: var(--primary-color);
}

.responsive-table .col-category {
    font-weight: 700;
    color: var(--primary-dark);
}

.responsive-table .badge-category {
    background-color: rgba(11, 99, 197, 0.06);
    color: var(--primary-color);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(11, 99, 197, 0.12);
    white-space: normal;
    word-break: break-word;
    text-align: center;
    width: 100%;
}

@media (max-width: 768px) {
    .responsive-table-container {
        border: none;
        box-shadow: none;
        background-color: transparent;
    }

    .responsive-table.stack-on-mobile {
        min-width: 100% !important;
    }
    
    .responsive-table.stack-on-mobile thead {
        display: none; /* Hide headers */
    }
    
    .responsive-table.stack-on-mobile tbody {
        display: block;
        width: 100%;
    }
    
    .responsive-table.stack-on-mobile tr {
        display: block;
        width: 100%;
        border: 1px solid rgba(11, 99, 197, 0.1);
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
        padding: 1.25rem 0;
        background-color: var(--bg-white);
        margin-bottom: 1rem;
    }
    
    .responsive-table.stack-on-mobile tr:last-child {
        margin-bottom: 0;
    }
    
    .responsive-table.stack-on-mobile td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        padding: 0.4rem 1.25rem !important;
        border-bottom: none;
    }
    
    .responsive-table.stack-on-mobile td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--primary-color);
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.25rem;
    }
    
    .responsive-table.stack-on-mobile .col-no {
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(11, 99, 197, 0.06) !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .responsive-table.stack-on-mobile .col-no::before {
        margin-bottom: 0;
    }
    
    .responsive-table.stack-on-mobile .badge-category {
        text-align: left;
        width: auto;
        display: inline-block;
        padding: 0.25rem 0.75rem;
    }
    
    .admin-photo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==========================================================================
   CUSTOM SASARAN PROGRAM RESPONSIVE GRID-TABLE CARD COMPONENT
   ========================================================================== */

.sasaran-table-card {
    width: 100%;
    border: 1px solid rgba(11, 99, 197, 0.12);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    margin-bottom: 2.5rem;
    margin-top: 1.5rem;
    overflow: hidden;
    background-color: var(--bg-white);
}

.sasaran-table-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 1.25rem;
    text-align: center;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 1.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.sasaran-table-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.sasaran-table-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(11, 99, 197, 0.08);
}

.sasaran-table-col:last-child {
    border-right: none;
}

.sasaran-col-header {
    background-color: rgba(11, 99, 197, 0.03);
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(11, 99, 197, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sasaran-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 0.95rem;
    line-height: 1.2;
}

.sasaran-years {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
}

.sasaran-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    font-style: italic;
}

.sasaran-col-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    flex-grow: 1;
    background-color: var(--bg-white);
}

.sasaran-list-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sasaran-list-num {
    background-color: rgba(11, 99, 197, 0.06);
    color: var(--primary-color);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(11, 99, 197, 0.12);
}

.sasaran-list-text {
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0 !important;
    text-align: justify;
}

/* Hover effects for premium feel */
.sasaran-table-col:hover {
    background-color: rgba(11, 99, 197, 0.005);
}

.sasaran-list-item:hover .sasaran-list-num {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: scale(1.05);
    transition: var(--transition-smooth);
}

/* Responsive collapse to 1 column in tablet/mobile */
@media (max-width: 991px) {
    .sasaran-table-grid {
        grid-template-columns: 1fr;
    }
    
    .sasaran-table-col {
        border-right: none;
        border-bottom: 1px solid rgba(11, 99, 197, 0.08);
    }
    
    .sasaran-table-col:last-child {
        border-bottom: none;
    }
    
    .sasaran-col-header {
        padding: 1.25rem 1rem;
    }
}

/* Animation Keyframes for mobile navigation slide-in */
@keyframes slideInMobileMenu {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}


