/* website.css - Sri Dhammasiddhi Dhamma School (Final Fixed Version) */

:root { 
    --primary: #800000; 
    --gold: #d4ac0d; 
    --light: #f4f4f4; 
    --dark: #333;
    --text-color: #444;
}

body { 
    font-family: 'Poppins', 'Noto Sans Sinhala', sans-serif;
    margin: 0; padding: 0; background: var(--light); color: var(--text-color); line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- NAVBAR --- */
.navbar { 
    background: var(--primary); padding: 15px 20px; color: white; 
    display: flex; justify-content: space-between; align-items: center; 
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-area { display: flex; align-items: center; gap: 15px; }

/* --- LOGO DEBUG FIX --- */
.logo-area img { 
    height: 70px;
    width: auto;
    max-width: 100%;
    
    /* Debugging Styles */
    background: transparent; /* සුදු පසුබිම ඉවත් කළා */
    border: 2px solid red;   /* රතු රාමුවක් දැම්මා (පෙනෙනවාද බැලීමට) */
    position: relative;      /* පිහිටීම */
    z-index: 9999;           /* සියල්ලටම වඩා උඩින් පෙන්වීමට */
    
    object-fit: contain;
    padding: 3px;
    border-radius: 8px;
}

.logo-text h1 { font-size: 1.1rem; font-weight: 600; margin: 0; line-height: 1.2; text-transform: uppercase; }
.logo-text p { font-size: 0.75rem; margin: 0; opacity: 0.9; }

.nav-links a { 
    color: white; margin-left: 15px; font-weight: 500; font-size: 0.9rem; 
    padding: 8px 12px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-links a:hover { color: var(--gold); background: rgba(255,255,255,0.1); }
.btn-login { background: var(--gold) !important; color: black !important; font-weight: bold !important; }

/* --- SLIDER --- */
.slider-container { width: 100%; height: 550px; position: relative; overflow: hidden; background: #000; }
.slide { 
    width: 100%; height: 100%; position: absolute; top: 0; left: 0; opacity: 0; 
    transition: opacity 1s ease-in-out; z-index: 1; display: flex; justify-content: center; align-items: center; 
}
.slide.active { opacity: 1; z-index: 2; }
.slide img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); z-index: -1; }
.caption { 
    position: relative; z-index: 10; text-align: center; color: white; padding: 20px; 
    max-width: 900px; animation: zoomInCaption 1s ease-out; 
}
.caption h2 { font-size: 3.5rem; color: var(--gold); margin: 0 0 15px 0; text-shadow: 3px 3px 6px rgba(0,0,0,0.9); line-height: 1.2; text-transform: uppercase; }
.caption p { font-size: 1.5rem; margin: 0; font-weight: 500; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); color: #f0f0f0; }
@keyframes zoomInCaption { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- MAIN LAYOUT --- */
.main-container { display: grid; grid-template-columns: 3fr 1fr; gap: 40px; max-width: 1200px; margin: 50px auto; padding: 0 20px; }

/* --- HOME PAGE SECTIONS --- */
.home-section-header { 
    display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 25px; 
}
.section-heading { margin: 0; color: var(--primary); font-size: 1.4rem; text-transform: uppercase; }
.view-all-link { font-size: 0.85rem; color: #555; font-weight: 600; }
.view-all-link:hover { color: var(--primary); }

.section-divider { border: 0; border-top: 1px solid #ddd; margin: 40px 0; }
.no-data-msg { color: #888; font-style: italic; background: white; padding: 15px; border-radius: 5px; text-align: center; }

/* --- GRIDS --- */
.home-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }

/* --- MINI CARDS (News & Events) --- */
.mini-card { 
    background: white; border-radius: 8px; overflow: hidden; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.05); transition: transform 0.3s; border: 1px solid #eee;
    display: flex; flex-direction: column;
}
.mini-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

.mini-card-img-box { position: relative; height: 160px; overflow: hidden; }
.mini-card-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.mini-card:hover .mini-card-img-box img { transform: scale(1.05); }

.date-badge { 
    position: absolute; top: 10px; left: 10px; background: var(--gold); 
    color: black; padding: 3px 10px; font-size: 0.75rem; font-weight: bold; border-radius: 4px; 
}

.mini-card-content { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.mini-card-content h4 { margin: 0 0 8px 0; font-size: 1.05rem; color: #333; line-height: 1.4; }
.mini-card-content p { font-size: 0.85rem; color: #666; margin: 0 0 10px 0; flex: 1; }

.read-more-text { 
    background: none; border: none; color: var(--primary); font-weight: bold; 
    font-size: 0.8rem; cursor: pointer; padding: 0; text-align: left; 
}
.read-more-text:hover { text-decoration: underline; }

/* --- ALBUM CARDS (Gallery) --- */
.album-card-home { 
    position: relative; height: 150px; border-radius: 8px; overflow: hidden; display: block; 
}
.album-card-home img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.album-card-home:hover img { transform: scale(1.1); }
.album-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.7); 
    color: white; padding: 8px; text-align: center; font-size: 0.85rem; font-weight: 500;
}

/* --- SIDEBAR WIDGETS --- */
.widget { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-bottom: 30px; }
.champion-widget { text-align: center; border-top: 4px solid var(--gold); background: #fffdf0; }
.champion-logo { width: 70px; height: 70px; border-radius: 50%; margin: 10px auto; border: 3px solid var(--gold); object-fit: cover; }
.champion-points { font-size: 1.5rem; font-weight: bold; color: #333; }
.team-row, .student-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.rank { background: var(--primary); color: white; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-size: 0.8rem; font-weight: bold; }

/* --- MODAL --- */
.news-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); align-items: center; justify-content: center; padding: 20px; }
.news-modal-content { background-color: #fff; margin: auto; padding: 0; width: 100%; max-width: 800px; border-radius: 12px; position: relative; box-shadow: 0 15px 50px rgba(0,0,0,0.5); animation: zoomIn 0.3s ease-out; max-height: 90vh; overflow-y: auto; }
@keyframes zoomIn { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }
.close-modal { color: #555; position: absolute; right: 15px; top: 15px; font-size: 30px; font-weight: bold; cursor: pointer; background: #fff; width: 40px; height: 40px; text-align: center; line-height: 40px; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 100; transition: 0.3s; }
.close-modal:hover { background: #800000; color: white; }
.modal-news-img { width: 100%; height: 350px; object-fit: cover; border-radius: 12px 12px 0 0; }
.modal-news-header { padding: 25px 30px 5px 30px; text-align: center; }
.modal-news-header h2 { margin: 0; color: var(--primary); font-size: 1.8rem; line-height: 1.3; }
.modal-date { color: #888; font-size: 0.9rem; margin-top: 5px; }
.modal-news-body { padding: 10px 30px 30px 30px; font-size: 1.05rem; line-height: 1.8; color: #333; text-align: justify; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) { 
    .navbar { flex-direction: column; text-align: center; gap: 10px; }
    .nav-links { display: flex; flex-direction: column; width: 100%; }
    .main-container { grid-template-columns: 1fr; }
    .home-grid-2, .home-grid-3 { grid-template-columns: 1fr; }
    .slider-container { height: 300px; }
    .caption h2 { font-size: 1.8rem; }
    .modal-news-img { height: 200px; }
}
/* --- PAGE HEADER STYLES --- */
.page-header {
    height: 300px; /* හෙඩරයේ උස */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-color: #333; /* පින්තූරය නැති වුනොත් පෙන්වන්න පාටක් */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax Effect (පිටුව ස්ක්‍රෝල් කරද්දි පින්තූරය නොසෙල්වී තියෙන්න) - කැමති නම් මෙය ඉවත් කරන්න පුළුවන් */
    position: relative;
}

.page-header h1 {
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8); /* අකුරු කැපී පෙනීමට සෙවනැල්ලක් */
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 10px;
    font-weight: 300;
}