/* 
   Style for Provincial Land Commissioner's Department - NWP
   Author: AI Backend
*/

:root {
    --primary-color: #0c542c;
    /* Deep Green */
    --primary-light: #18864a;
    --primary-dark: #063118;
    --secondary-color: #d4af37;
    /* Royal Gold */
    --secondary-light: #f3d46a;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f7fbfa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
    --font-sinhala: 'Noto Sans Sinhala', sans-serif;
    --font-en: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sinhala);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sinhala);
    font-weight: 700;
    color: var(--primary-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 6px 0;
    font-size: 0.85rem;
    font-family: var(--font-en);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* Language Buttons */
.translate-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 3px;
}

.lang-btn,
.lang-btn *,
.lang-btn font,
.lang-btn span {
    background-color: transparent !important;
    border: none;
    color: var(--white) !important;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.lang-btn {
    border: 1px solid var(--secondary-light) !important;
    padding: 3px 10px;
    border-radius: 4px;
}

.lang-btn:hover {
    background-color: var(--secondary-color) !important;
}

.lang-btn:hover,
.lang-btn:hover *,
.lang-btn:hover font,
.lang-btn:hover span {
    color: var(--primary-dark) !important;
}

/* Hide default Google Translate widget elements visually */
.goog-te-gadget {
    color: transparent !important;
    position: absolute !important;
    left: -9999px !important;
}

.goog-logo-link {
    display: none !important;
}

/* Hide the Google Translate top banner */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
    position: static !important;
}

/* Prevent Google Translate from hiding the top bar */
.top-bar {
    display: block !important;
    visibility: visible !important;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text h1 {
    font-size: 1.3rem;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 2px;
}

.logo-text h1 span {
    font-size: 1rem;
    color: var(--text-color);
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    color: var(--primary-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- Main Content Layout --- */
.main-content {
    min-height: calc(100vh - 350px);
}

/* --- Hero Section (Home) --- */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    color: var(--white);
    display: flex;
    align-items: center;
    text-align: center;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slider-wrapper {
    display: flex;
    width: 600%; /* 6 images, each 100% */
    height: 100%;
}

.slider-slide {
    width: 16.6666%; /* 100 / 6 */
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Optional overlay to make text readable */
.slider-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 49, 24, 0.4) 0%, rgba(12, 84, 44, 0.3) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to top, var(--bg-color), transparent);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: 1.25rem;
    color: var(--secondary-light);
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* --- Content Sections --- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* --- Mission Vision Cards --- */
.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.mv-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--secondary-color);
}

.mv-card:hover {
    transform: translateY(-10px);
}

.mv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(12, 84, 44, 0.02) 100%);
    z-index: 0;
}

.mv-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.mv-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.mv-card p {
    color: var(--text-light);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* --- Functions Grid (Home Page) --- */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.function-item {
    display: flex;
    align-items: flex-start;
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.function-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.function-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    position: relative;
}

.function-num {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.function-text p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* --- Modal Popup for Divisions --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal.open {
    transform: translateY(0);
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-body {
    padding: 25px;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    font-size: 1.1rem;
    color: var(--text-color);
}

.modal-list li:last-child {
    border-bottom: none;
}

.modal-list li i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 5px;
}

/* --- Pages General Styling --- */
.page-header {
    background: linear-gradient(rgba(6, 49, 24, 0.85), rgba(12, 84, 44, 0.85)), url('https://images.unsplash.com/photo-1596395819057-e37f55a8516d?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    background-color: var(--primary-color);
    /* fallback */
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.page-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

.page-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-dark);
    color: #e0e0e0;
    padding: 60px 0 20px;
    margin-top: 50px;
    font-family: var(--font-sinhala);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.footer-col h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-col.about-col p {
    font-size: 0.95rem;
    color: #b0bfb7;
}

.footer-col.links-col ul li {
    margin-bottom: 10px;
}

.footer-col.links-col a {
    color: #e0e0e0;
    font-size: 0.95rem;
}

.footer-col.links-col a i {
    font-size: 0.7rem;
    margin-right: 8px;
    color: var(--secondary-color);
}

.footer-col.links-col a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-col.contact-col p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    font-size: 0.95rem;
}

.footer-col.contact-col i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #8c9c94;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    margin-left: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 0 0 20px 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        font-size: 1.1rem;
    }

    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}
/* --- Splash Screen --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.splash-content {
    max-width: 900px;
}

.splash-logo img {
    max-height: 120px;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

.splash-welcome {
    margin-bottom: 50px;
}

.si-text, .ta-text, .en-text {
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease backwards;
}

.si-text { font-size: 1.8rem; line-height: 1.4; animation-delay: 0.1s; display: block; }
.ta-text { font-size: 1.5rem; line-height: 1.5; animation-delay: 0.2s; display: block; }
.en-text { font-size: 1.3rem; line-height: 1.4; animation-delay: 0.3s; display: block; opacity: 0.85; }

.splash-langs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeIn 1s ease 0.6s backwards;
}

.splash-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    background: transparent;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    z-index: 10001; /* Above splash content */
}

.splash-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.splash-footer-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 1.2s ease 1s backwards;
}

body.loading-active {
    overflow: hidden !important;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@media (max-width: 768px) {
    .splash-langs {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .si-text { font-size: 1.4rem; }
    .ta-text { font-size: 1.2rem; }
    .en-text { font-size: 1rem; }
    .splash-btn { width: 100%; max-width: 250px; padding: 12px 20px; font-size: 1.1rem; }
}


/* --- Officers Section --- */
.officers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.officer-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.officer-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.officer-img {
    height: 300px;
    overflow: hidden;
}

.officer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.officer-card:hover .officer-img img {
    transform: scale(1.1);
}

.officer-info {
    padding: 20px;
    background: linear-gradient(to bottom, var(--white), var(--bg-color));
}

.officer-info h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.officer-info p {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}


/* --- Navigation Dropdown --- */
.nav-links li.nav-dropdown {
    position: relative;
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 10px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    z-index: 1000;
    display: block; /* Overrides default li styling */
    list-style: none;
    margin: 0;
}

.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .dropdown-menu li {
    width: 100%;
    margin-bottom: 0;
}

.nav-links .dropdown-menu li a {
    color: var(--primary-dark);
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0;
}

.nav-links .dropdown-menu li a:hover {
    background: rgba(12, 84, 44, 0.05);
    color: var(--primary-color);
    padding-left: 25px;
}

.nav-links .dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Fix pointer events for dropdown gap */
.nav-links li.nav-dropdown::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 15px;
    bottom: -15px;
    left: 0;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .nav-links li.nav-dropdown {
        width: 100%;
        text-align: center;
    }
    .nav-links .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.1);
        display: none; /* Toggle with JS if needed, but for now simple display */
        border-radius: 0;
    }
    .nav-links li:hover .dropdown-menu {
        display: block;
    }
    .nav-links .dropdown-menu li a {
        color: var(--white);
        padding: 10px;
    }
}

