@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root {
    /* Updated Light Theme Palette */
    --bg-light: #ffffff;           /* Pure white background */
    --surface-light: #f4f7f6;      /* Off-white for sections/cards */
    --text-main: #1b2a2f;          /* Deep dark slate for readable text */
    --text-muted: #6c757d;         /* Gray for paragraphs */
    --brand-green: #297635;        /* Create Academy Leaf Green */
    --brand-orange: #FFC107;       /* Warm accent orange/yellow */
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05); /* Modern soft drop shadow */
    --transition: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Jam-Packed, Professional Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.nav-links { list-style: none; display: flex; gap: 35px; }

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

/* Yellow underline animation on hover */
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 3px;
    bottom: -5px; left: 0; background-color: var(--brand-orange);
    transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--brand-green); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-green), #1e5a25);
    color: white; padding: 12px 28px; border: none; border-radius: 50px;
    font-weight: 700; cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 15px rgba(41, 118, 53, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(41, 118, 53, 0.5);
}

/* Footer Grid System */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px; padding: 60px 5%;
    background-color: var(--surface-light);
    border-top: 4px solid var(--brand-green);
}

/* =========================================
   HOMEPAGE SPECIFIC STYLES
   ========================================= */

/* The Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    /* A very subtle, elegant light green/yellow gradient background */
    background: linear-gradient(135deg, #f8fff9 0%, #fffdf4 100%);
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--brand-green);
    position: relative;
}

/* The yellow underline accent under the main word */
.hero-title span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background-color: var(--brand-orange); /* This is your yellow now */
    bottom: 5px;
    left: 0;
    z-index: -1;
    opacity: 0.6;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 12px 28px;
    border: 2px solid var(--text-main);
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--text-main);
    color: white;
}

/* Aesthetic Teacher Profile (The Overlap Card) */
.teacher-profile-wrapper {
    position: relative;
    max-width: 1000px;
    margin: -100px auto 80px auto; /* The negative top margin creates the overlap */
    padding: 0 5%;
    z-index: 10;
}

.teacher-card {
    background-color: var(--bg-light);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    display: flex;
    overflow: hidden;
    border-top: 5px solid var(--brand-green);
}

.teacher-image-container {
    flex: 1;
    min-height: 400px;
    background-color: #e9ecef; /* Placeholder gray if no image */
    background-size: cover;
    background-position: center;
}

.teacher-info {
    flex: 1.5;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    display: inline-block;
    background-color: rgba(255, 193, 7, 0.2); /* Soft yellow */
    color: #b38600; /* Dark yellow text */
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 15px;
    width: fit-content;
}

/* Mobile Responsiveness for the Card */
@media (max-width: 768px) {
    .teacher-card { flex-direction: column; }
    .teacher-image-container { min-height: 300px; }
    .hero-title { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
}

/* Social Media Icons in Footer */
.social-icon {
    background-color: var(--brand-green);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--brand-orange);
    color: var(--text-main);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* =========================================
   PRE-FOOTER (MAP & INQUIRY SECTION)
   ========================================= */
.pre-footer-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Splits the section 50/50 */
    gap: 40px;
    padding: 0 5%;
    margin: 80px 0 60px 0;
    align-items: stretch;
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 4px solid white;
}

/* The Quick Inquiry Form Styling */
.quick-inquiry {
    background-color: var(--surface-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--brand-orange); /* Uses your vibrant yellow */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quick-inquiry h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 4px rgba(41, 118, 53, 0.1); /* Soft green glow on click */
}

/* Make it stack on top of each other on mobile phones */
@media (max-width: 992px) {
    .pre-footer-section {
        grid-template-columns: 1fr;
    }
    .map-container {
        min-height: 350px;
    }
}

/* =========================================
   BLOG PREVIEW STYLES (Upgraded with Animations)
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-12px) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.blog-img-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.blog-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.08);
}

.blog-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-category {
    color: var(--brand-orange);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: var(--brand-green);
}

.blog-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.btn-outline {
    background: transparent;
    color: var(--brand-green);
    border: 2px solid var(--brand-green);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--brand-green);
    color: white;
}
/* =========================================
   CONTACT PAGE STYLES
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    padding: 0 5% 80px 5%;
    max-width: 1200px;
    margin: -40px auto 0 auto; /* Pulls it up slightly over the header */
    position: relative;
    z-index: 10;
}

.contact-info-box {
    background-color: var(--text-main);
    color: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.contact-info-box h3 {
    font-size: 1.8rem;
    color: var(--brand-orange);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--brand-green);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-item p {
    color: #aeb5bc;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-form-box {
    background-color: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-top: 5px solid var(--brand-green);
}

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SINGLE ARTICLE (READING VIEW) STYLES
   ========================================= */
.article-wrapper {
    max-width: 900px;
    margin: 40px auto 100px auto;
    padding: 0 5%;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-category-badge {
    display: inline-block;
    background-color: rgba(255, 193, 7, 0.15); /* Soft yellow */
    color: #d39e00;
    padding: 6px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2.8rem;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.article-featured-image {
    width: 100%;
    height: 450px;
    background-color: #f4f7f6;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 50px;
}

/* Styling the HTML generated by the CKEditor */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2, .article-content h3 {
    color: var(--text-main);
    margin: 40px 0 15px 0;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin: 0 0 25px 40px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 5px solid var(--brand-orange);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-muted);
    margin: 30px 0;
    background: var(--surface-light);
    padding: 20px;
    border-radius: 0 10px 10px 0;
}
/* =========================================
   AESTHETIC MASONRY GALLERY STYLES
   ========================================= */
.masonry-gallery {
    columns: 3 300px; /* Creates up to 3 columns, falling back to 300px width on mobile */
    column-gap: 20px;
    padding: 0 5% 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid; /* Prevents images from splitting across columns */
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    cursor: pointer;
}

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: 15px;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.05); /* Smooth zoom effect */
}

/* Optional Caption overlay on hover */
.masonry-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
}

.masonry-item:hover .masonry-caption {
    transform: translateY(0);
}
/* Inline Article Image Grid */
.article-inline-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-top: 30px;
    border-top: 2px solid #e0e6ed;
}

.article-inline-gallery img {
    width: 100%;
    height: 200px; /* Forces a uniform, aesthetic height */
    object-fit: cover; /* Ensures images aren't stretched */
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.article-inline-gallery img:hover {
    transform: scale(1.03);
}
/* Individual Skill Bars */
.skills-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e6ed;
    display: grid;
    grid-template-columns: 1fr 1fr; /* This creates the 2 columns! */
    gap: 12px 20px; /* Space between rows and columns */
    text-align: left;
}
.skill-row {
    margin-bottom: 0;
}
.skill-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem; /* Smaller, aesthetic text */
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    text-transform: uppercase;
}
.skill-bar-track {
    width: 100%;
    height: 5px; /* Thinner, more premium looking bar */
    background-color: #f4f7f6;
    border-radius: 10px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    background-color: var(--brand-orange);
    border-radius: 10px;
}

/* =========================================
   FULLSCREEN LIGHTBOX STYLES
   ========================================= */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999; /* Sits on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    max-width: 80%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover { color: var(--brand-orange); }

.lightbox-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    padding: 15px 20px;
    background-color: rgba(0,0,0,0.5);
    border: none;
    transition: var(--transition);
    user-select: none;
}

.lightbox-btn:hover { background-color: var(--brand-orange); }
.lightbox-prev { left: 0; border-radius: 0 10px 10px 0; }
.lightbox-next { right: 0; border-radius: 10px 0 0 10px; }

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* =========================================
   ALBUM FOLDER STYLES
   ========================================= */
.album-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: white;
    text-decoration: none; /* For the anchor tag */
    display: block;
}

.album-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.album-cover {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.album-card:hover .album-cover {
    transform: scale(1.08); /* Slow zoom on the image inside */
}

.album-info {
    padding: 20px;
    background: white;
    position: relative; /* Sits above the image */
    z-index: 2;
    border-top: 4px solid var(--brand-orange);
    text-align: center;
}

.album-title {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.album-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   HERO SECTION STYLES
   ========================================= */
.hero-bg {
    background-image: url('/public/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Creates a cool parallax effect */
}

/* Update the outline button hover effect for the dark background */
.hero .btn-outline:hover {
    background-color: white;
    color: var(--brand-green) !important;
}

/* =========================================
   ADMIN PANEL STYLES (CENTRALIZED)
   ========================================= */
/* 1. The Fixed Sidebar */
.sidebar { 
    width: 260px; 
    background-color: var(--text-main); 
    color: white; 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 100vh; 
    overflow-y: auto; 
    z-index: 1000;
    box-sizing: border-box;
}

.sidebar h2 { 
    color: white; 
    font-size: 1.5rem; 
    margin-bottom: 40px; 
    text-align: center; 
    font-weight: 800; 
}

.sidebar h2 span { 
    color: var(--brand-orange); 
}

/* 2. Sidebar Navigation Links & Hovers */
.nav-item { 
    color: var(--text-muted); 
    text-decoration: none; 
    padding: 14px 15px; 
    margin-bottom: 10px; 
    display: block; 
    border-radius: 10px; 
    transition: var(--transition); 
    font-weight: 600;
}

.nav-item:hover, .nav-item.active { 
    background-color: rgba(255,255,255,0.05); 
    color: white; 
    border-left: 4px solid var(--brand-green);
}

.nav-item i { 
    margin-right: 12px; 
    width: 20px; 
    text-align: center; 
    color: var(--brand-green); 
    transition: color 0.3s ease;
}

.nav-item.active i, .nav-item:hover i { 
    color: var(--brand-orange); 
}

/* 3. The Logout Button */
.logout-btn { 
    margin-top: auto; 
    background-color: rgba(220, 53, 69, 0.1); 
    color: #ff4d4d; 
    text-align: center; 
    padding: 12px; 
    border-radius: 10px; 
    text-decoration: none; 
    font-weight: 700; 
    transition: var(--transition);
}

.logout-btn:hover { 
    background-color: #ff4d4d; 
    color: white; 
}

/* 4. The Main Content Area (Pushed right to avoid sidebar) */
.main-content { 
    flex: 1; 
    padding: 40px 50px; 
    margin-left: 260px; /* Exact width of the sidebar */
    min-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}

/* 5. Standard Admin Form Box */
.form-container { 
    background: white; 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: var(--shadow-soft); 
    max-width: 900px; 
    border-top: 5px solid var(--brand-orange);
}

/* Form Inputs */
.form-group { margin-bottom: 25px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.form-control { width: 100%; padding: 12px 15px; border: 2px solid #e0e6ed; border-radius: 8px; font-family: inherit; transition: var(--transition); box-sizing: border-box; }
.form-control:focus { outline: none; border-color: var(--brand-orange); }