/* වර්ණ Palette */
:root {
    --primary-color: #007bff; /* ප්‍රධාන නිල් වර්ණය */
    --secondary-color: #28a745; /* කොළ පැහැති වර්ණය */
    --accent-color: #ffc107; /* දීප්තිමත් කහ/රන් වර්ණය */
    --resource-color: #dc3545; /* රතු පැහැති වර්ණය (අවධානය යොමු කිරීමට) */
    --background-light: #f4f7f6;
    --text-dark: #333;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    margin-bottom: 15px;
    font-weight: 600;
}

/* Header and Navigation (Updated for Logo) */
header {
    background: linear-gradient(90deg, var(--primary-color), #0056b3); /* වර්ණවත් gradient */
    color: white;
    padding: 15px 0; /* padding අඩු කර ඇත */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* header-content උසස් කිරීමට padding එකතු කළ හැකිය */
}

/* Logo Styles */
.logo-container {
    flex-grow: 1; /* මැදට එන්න ඉඩ දීම */
    text-align: center;
}

.logo {
    height: 80px; /* ලාංඡනයට උසක් ලබා දීම */
    max-width: 100%;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

/* Login Box (Adjusted for 3-part layout) */
.login-box {
    width: 200px; /* Box වලට නිශ්චිත පළලක් දීම */
    display: flex;
    justify-content: center;
}

.left-box {
    justify-content: flex-start;
}

.right-box {
    justify-content: flex-end;
}

.login-box a {
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    margin: 0 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.login-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-bottom: 3px solid var(--accent-color);
}

.hero-section h2 {
    font-size: 2.5em;
    color: var(--primary-color);
}

/* Main Content Grid (Responsive Layout) */
.main-content-grid {
    display: grid;
    grid-template-columns: 3fr 1fr; 
    gap: 30px;
    padding: 40px 0;
}

.main-details article {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    border-left: 5px solid var(--secondary-color);
}

/* Sidebar Cards */
.sidebar {
    padding-top: 15px;
}

.leadership-card, .contact-info, .resource-registration-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.leadership-card {
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.dcs-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--accent-color);
}

.leadership-card h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* New Resource Registration Card Styling */
.resource-registration-card {
    text-align: center;
    border-top: 5px solid var(--resource-color); /* අවධානය යොමු කරන රතු පැහැය */
}

.btn-resource {
    display: block;
    width: 100%;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 15px;
    background-color: var(--resource-color);
    color: white;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-resource:hover {
    background-color: #c82333; /* තද රතු පැහැය */
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9em;
}

/* Responsive Design (Mobile Support) */
@media (max-width: 900px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1; 
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        order: -1; /* ලාංඡනය මුලින්ම පෙන්වීම */
        margin-bottom: 15px;
    }
    
    .login-box {
        width: 100%;
        margin-bottom: 10px;
    }

    .left-box {
        justify-content: center;
    }

    .right-box {
        justify-content: center;
    }
    
    .login-box a {
        margin: 5px 10px;
    }
    
    .logo {
        height: 60px; /* කුඩා තිරවලදී ලාංඡනය කුඩා කිරීම */
    }
    
    .hero-section h2 {
        font-size: 1.8em;
    }
}