:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --dark: #0f172a;
    --slate: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --highlight: #fbbf24;
}

* { margin:0; padding:0; box-sizing:border-box; font-family: 'Inter', sans-serif; }
body { color: var(--dark); background: var(--light); scroll-behavior: smooth; line-height: 1.6; }

header { 
    display:flex; justify-content:space-between; align-items:center; 
    padding: 0 5%; height: 80px; background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px); position:fixed; width:100%; top:0; z-index:1000; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
header .logo { font-weight:700; font-size:1.4rem; color: var(--primary); }
header nav { display:flex; gap:10px; }
header nav a { 
    color: var(--dark); text-decoration:none; font-weight:500; padding: 8px 16px; 
    border-radius: 8px; transition: 0.3s; font-size: 0.95rem;
}
header nav a:hover { background: #f1f5f9; }
header nav a.active { background: var(--primary); color: var(--white); }
.menu-icon { display:none; font-size:1.5rem; cursor:pointer; color: var(--primary); }

/* Sidebar - 30% width and Transparent */
.sidebar { 
    position: fixed; 
    top: 0; 
    right: -100%; 
    width: 30%; 
    height: 100%; 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(15px); 
    padding: 100px 20px; 
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    z-index: 999; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.sidebar.active { right: 0; }
.sidebar a { 
    color: var(--dark); text-decoration: none; font-size: 1rem; 
    font-weight: 500; padding: 12px; border-radius: 8px; transition: 0.3s;
}

.admin-link-sidebar { 
    margin-top: 15px;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    color: var(--primary) !important;
    border: 1px solid rgba(79, 70, 229, 0.3);
    align-self: flex-start;
    width: auto;
}

.hero { 
    height:70vh; background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
    url('https://images.unsplash.com/photo-1562774053-701939374585?auto=format&fit=crop&w=1200&q=80') center/cover; 
    display:flex; flex-direction: column; align-items:center; justify-content:center; 
    color:#fff; text-align: center; padding: 20px;
}
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 15px; }

.features-bar {
    background: var(--white); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    padding: 30px 10%; gap: 20px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.feature-item i { color: var(--primary); font-size: 1.8rem; margin-bottom: 10px; }

section { padding: 80px 10%; }
.about h2 { font-size: 2.2rem; margin-bottom: 20px; color: var(--primary); }

.teachers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-top: 40px; }
.teacher-card { background: var(--white); padding: 25px; border-radius: 15px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: 0.3s; }
.teacher-card img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--primary); margin-bottom: 15px; }
.teacher-card .qual { color: var(--primary); font-weight: 600; }

/* Updates Section - Column Design (3 per row on desktop) */
.latest-updates-section { background: #f1f5f9; border-top: 1px solid #e2e8f0; }
#updates-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
    margin-top: 25px; 
}

.update-card { 
    background: #ffffff; 
    border-radius: 14px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
}

.update-card img {
    width: 100%;
    height: auto; /* Show complete photo */
    object-fit: contain; 
    background-color: #f8fafc; 
    display: block;
}

.update-card .update-content { padding: 20px; text-align: left; }
.update-card .update-date { font-size: 12px; color: var(--primary); margin-top: 12px; font-weight: 700; }

.contact { background: var(--dark); color: var(--white); text-align:center; }
.contact-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }
.contact-card { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 15px; flex: 1; min-width: 200px; }
.contact-card i { font-size: 2rem; color: var(--highlight); margin-bottom: 15px; }
.contact-card a { color: var(--white); text-decoration: none; }

.social-links-contact { 
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 15px; 
}

.social-links-contact a i { 
    font-size: 1.8rem; 
    color: var(--highlight);
}

footer { background: #070b14; padding: 40px; text-align: center; color: var(--slate); border-top: 1px solid #1e293b; }
.footer-icons a { color: var(--white); font-size: 1.8rem; margin: 0 15px; transition: 0.3s; }

.floating { position: fixed; bottom: 20px; right: 15px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; z-index: 1000; }
.whats-new, .whatsapp-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 50px; color: white; text-decoration: none; font-weight: 600; transition: 0.3s; }
.whats-new { background: var(--primary); }
.whatsapp-btn { background: #25D366; }

@media (max-width: 768px) {
    .sidebar { width: 60%; } 
    header nav { display: none; }
    .menu-icon { display: block; }
    .hero h1 { font-size: 2rem; }
}

/* Force 3 columns on large desktop if needed */
@media (min-width: 992px) {
    #updates-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); align-items:center; justify-content:center; z-index:2000; }
.modal-content { background:white; padding:40px; border-radius:15px; text-align:center; width: 90%; max-width: 400px; }
.modal-content input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ddd; border-radius: 5px; }
.modal-content button { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; width: 100%; }