/* --- Modern Theme Variables --- */
:root {
    --primary-red: #E31E24;
    --red-hover: #C1181E;
    --dark-slate: #0F172A; /* Modern Deep Navy/Slate instead of pure black */
    --light-slate: #1E293B;
    --bg-gray: #F8FAFC;
    --white: #FFFFFF;
    --text-main: #334155;
    --text-muted: #64748B;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

/* --- Global & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Sinhala', 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Default State (English) --- */
/* --- Language Display Logic (Default: English) --- */
.en { display: inline; }
.si { display: none; }
body { font-family: 'Poppins', sans-serif; } /* Default font */

/* --- Sinhala Mode (When toggle is switched OFF) --- */
body.sinhala-mode .en { display: none; }
body.sinhala-mode .si { display: inline; }
body.sinhala-mode { font-family: 'Noto Sans Sinhala', sans-serif; } /* Sinhala font */

h1, h2, h3, h4 {
    color: var(--dark-slate);
    line-height: 1.2;
}

.text-red { color: var(--primary-red); }
.text-white { color: var(--white); }
.subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--primary-red);
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section { padding: 100px 0; }
.bg-slate { background-color: var(--dark-slate); }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(227, 30, 36, 0.3);
}

.btn-primary:hover {
    background: var(--red-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 20px -3px rgba(227, 30, 36, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-slate);
    transform: translateY(-3px);
}

/* --- Floating WhatsApp --- */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1) rotate(10deg);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    padding: 10px 5%;
}

.logo-img { height: 55px; }

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-slate);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--primary-red); }

/* Language Toggle Switch */
.lang-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-gray);
    padding: 5px 15px;
    border-radius: 50px;
}

.lang-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-slate);
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--dark-slate);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: var(--primary-red); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('./Img/chat.jpg') center/cover fixed;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 5%;
    margin-top: 50px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(227, 30, 36, 0.2);
    color: #FF6B6B;
    border: 1px solid var(--primary-red);
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 25px;
}

.highlight { color: var(--primary-red); }

.hero p {
    font-size: 1.2rem;
    color: #CBD5E1;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* --- About Section --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--primary-red);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--white);
}

.experience-badge h3 { color: var(--white); font-size: 2.5rem; margin: 0; }

.about-text h2 { margin-bottom: 25px; font-size: 2.5rem; }
.about-text p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.1rem; }

.founder-info {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #E2E8F0;
}

.founder {
    display: flex;
    align-items: center;
    gap: 15px;
}

.founder i { font-size: 2rem; }
.founder h5 { font-size: 1.1rem; margin-bottom: 2px; }
.founder span { font-size: 0.9rem; color: var(--text-muted); }

/* --- Facilities (Cards) --- */
.section-header { margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; }

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--light-slate);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
    background: #233147;
}

.icon-box {
    width: 70px; height: 70px;
    background: rgba(227, 30, 36, 0.1);
    color: var(--primary-red);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.feature-card:hover .icon-box {
    background: var(--primary-red);
    color: var(--white);
}

.feature-card h3 { color: var(--white); margin-bottom: 15px; }
.feature-card p { color: #94A3B8; }

/* --- Masonry/Grid Gallery --- */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--bg-gray);
    border: 1px solid #E2E8F0;
    color: var(--text-main);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 20px;
}

/* Make some images taller for a masonry look */
.gallery-grid .gallery-item:nth-child(3),
.gallery-grid .gallery-item:nth-child(5) {
    grid-row: span 2;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay h4 { color: var(--white); transform: translateY(20px); transition: var(--transition); margin: 0;}

.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay h4 { transform: translateY(0); }

/* --- Footer --- */
.footer {
    background: #0B1120;
    color: #94A3B8;
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 60px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Makes logo white if it has a transparent bg */
}

.social-links {
    display: flex; gap: 15px; margin-top: 20px;
}

.social-links a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    display: flex; justify-content: center; align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-5px);
}

.footer-contact h3, .footer-form h3 {
    color: var(--white);
    margin-bottom: 25px;
}

.footer-contact ul { list-style: none; }
.footer-contact li {
    display: flex; gap: 15px; margin-bottom: 15px;
}
.footer-contact i { color: var(--primary-red); margin-top: 5px; }

.footer-form form { display: flex; flex-direction: column; gap: 15px; }
.footer-form input {
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: var(--white);
}
.footer-form input:focus { outline: 1px solid var(--primary-red); }

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .split-layout, .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
    .nav-links { display: none; } /* Add a mobile menu logic here if needed */
    .experience-badge { bottom: 10px; right: 10px; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { 
        flex-direction: row; 
        flex-wrap: wrap; 
        gap: 15px;
    }
    .gallery-grid .gallery-item { grid-row: span 1 !important; }
    .experience-badge {
        bottom: -15px; /* Pulls it closer to the image */
        right: 0;      /* Aligns it to the edge */
        padding: 15px 20px; /* Reduces the bulkiness */
        border-width: 3px; /* Thinner border for a cleaner look */
    }

    .experience-badge h3 {
        font-size: 1.5rem; /* Smaller year text */
    }

    .experience-badge p {
        font-size: 0.8rem; /* Smaller "Founded" text */
    }
}
/* Keep text white for the contact button in the navbar */
.nav-links a.btn-primary {
    color: var(--white);
}

.nav-links a.btn-primary:hover {
    color: var(--white);
}
/* Center the submit button and prevent it from over-stretching */
.footer-form form {
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers the button and shrinks it to fit the text */
    gap: 15px;
}

.footer-form button[type="submit"] {
    width: auto;           /* Only as wide as the text */
    min-width: 140px;      /* Ensures it doesn't look too tiny */
    justify-content: center; /* Centers the text inside the button */
    padding: 12px 40px;    /* Gives it a nice modern shape */
}

/* Specific Mobile Adjustment */
@media (max-width: 768px) {
    .footer-form button[type="submit"] {
        padding: 10px 30px; /* Slightly smaller padding for mobile screens */
        font-size: 0.95rem;  /* Keeps the text neat */
    }
}
/* --- Hide hamburger menu on desktop --- */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--dark-slate);
    cursor: pointer;
}

/* --- Mobile Nav Adjustments --- */
@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
    
    .navbar {
        flex-wrap: wrap; /* Allows the menu to drop down below the header */
    }

    .nav-links {
        display: none; /* Hidden by default on mobile */
        width: 100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px 0;
        box-shadow: var(--shadow-lg);
        position: absolute;
        top: 100%;
        left: 0;
        text-align: center;
    }

    /* This class is added by Javascript to show the menu */
    .nav-links.active {
        display: flex; 
    }
}