/* Premium Modern CSS Template 
   Color Palette: Teal & Cyan Glass
*/

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Premium Color Tokens (UPDATED) ===== */
:root {
    --bg: #F8FAFC;            /* Slate 50 - පිරිසිදු පසුබිමක් */
    --surface: rgba(255, 255, 255, 0.9); 
    --text: #1E293B;
    --text-2: white;          /* Slate 800 */
    --muted: #64748B;         
    --accent: #7C3AED;        /* Violet 600 - ප්‍රධාන වර්ණය */
    --accent-hover: #6D28D9;  /* Violet 700 */
    --border: #EDE9FE;        /* Violet 100 */
    --shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1), 
              0 4px 6px -4px rgba(124, 58, 237, 0.1);
    --nav-bg: #6D28D9;
    --stat-text: #000000; 
    --stat-muted: #4b5563; /* මදක් අඳුරු අළු පැහැය */
    --stat-border: rgba(0, 0, 0, 0.1);
    --stat-text-main: #000000;
    --stat-text-sub: rgba(0, 0, 0, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);
    --footer-bg: #2a006d; 
    --text-2: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
}

body.dark {
    --bg: #0F172A;            /* Slate 900 - තද නිල්/කළු පසුබිම */
    --surface: #1E293B;       /* Slate 800 */ 
    --text: #F1F5F9;          
    --muted: #94A3B8;         
    --accent: #A78BFA;        /* Violet 400 */
    --accent-hover: #C4B5FD;  
    --border: #334155;        
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(15, 23, 42, 0.8);
    --fb: #6D28D9;
    --stat-text-main: #FFFFFF;
    --stat-text-sub: rgba(255, 255, 255, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --footer-bg: rgba(15, 23, 42, 0.8); 
    --text-2: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    
}

body {
    background: var(--bg);
    color: var(--text);
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s ease;
    line-height: 1.6;
    font-family: 'Inter', sans-serif; /* වඩාත් ගැලපෙන font එකක් */
}


/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Brand ===== */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    filter: drop-shadow(0 4px 6px rgba(13,148,136,0.25));
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    
    /* වර්ණය සෑමවිටම සුදු පැහැයෙන් තබා ගැනීමට */
    background: #FFFFFF; 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Gradient එකක් අවශ්‍ය නම් පමණක් පහත පේළිය භාවිතා කරන්න */
    /* background: linear-gradient(135deg, #FFFFFF 60%, var(--accent)); */
    
    color: #FFFFFF; /* Fallback color */
}

/* ===== Links ===== */
.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-2);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--text-2);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== Actions ===== */
.actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ===== Premium Toggle ===== */
.theme-toggle {
    cursor: pointer;
    user-select: none;
}

.toggle-track {
    width: 58px;
    height: 30px;
    background: var(--border);
    border-radius: 50px;
    padding: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.toggle-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark .toggle-track {
    background: var(--accent);
}

body.dark .toggle-thumb {
    transform: translateX(28px);
    background: #FFFFFF;
}

/* ===== Hamburger ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 28px;
    height: 2.5px;
    background: var(--text-2);
    border-radius: 4px;
    transition: 0.3s ease;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        flex-direction: column;
        width: 280px;
        height: calc(100vh - 80px);
        padding: 40px;
        background: var(--surface);
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links a {
    color: var(--text);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }
}

/* ===== Hero Section ===== */
.hero {
    padding: 100px 0 80px 0;
    overflow: hidden;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* සියලුම අකුරු මැදට */
    gap: 40px;
}
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--accent);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(13, 148, 136, 0.25);
}

.hero-title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-title span {
    color: var(--accent);
}

.hero-desc {
    font-size: 18px;
    color: var(--muted);
    max-width: 700px; /* මැදට එනවිට ටිකක් පළල වැඩි කිරීම ලස්සනයි */
    margin: 0 auto 40px auto; /* වම් සහ දකුණු margin 'auto' කිරීමෙන් මැදට එයි */
    line-height: 1.7;
}

/* ===== Buttons ===== */
.hero-btns {
    display: flex;
    justify-content: center; /* Flexbox එක මැදට ගැනීම */
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 20px rgba(13,148,136,0.25);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(13,148,136,0.35);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--accent);
}

/* ===== Stats ===== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    border-top: 1px solid var(--border-color); /* Variable එක භාවිතා කර ඇත */
    padding-top: 32px;
    align-items: center;
    text-align: center;
}

.stat-item {
    font-size: 14px;
    color: var(--stat-text-sub); /* Variable එක භාවිතා කර ඇත */
}

.stat-item b {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--stat-text-main); /* Variable එක භාවිතා කර ඇත */
    margin-bottom: 4px;
}
/* ===== Responsive Hero ===== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title { font-size: 40px; }
    .hero-desc { margin: 0 auto 40px auto; }
    .hero-btns { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
}

/* ===== Tool Cards Section ===== */
.tools-section {
    padding: 80px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 35px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow);
}

.tool-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.3s ease;
}

.tool-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5px;
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 25px 50px rgba(13,148,136,0.18);
}

.tool-card:hover .tool-icon {
    color: var(--accent);
    transform: rotate(-5deg) scale(1.1);
}

.tool-card h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}

.tool-card p {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.6;
}

body.dark .tool-icon {
    color: #94A3B8;
}

/* ===== Footer Section ===== */
.footer {
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    padding-top: 80px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand .footer-desc {
    margin-top: 20px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.7;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    color: var(--text-2);
    transition: 0.3s;
}

.social-links svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
}

.social-links a:hover {
    color: var(--text-2);
}

.footer-links h4, 
.footer-newsletter h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-2);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-2);
    font-size: 14.5px;
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: var(--text-2);
    padding-left: 5px;
}

.footer-newsletter p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    outline: none;
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-form button:hover {
    background: var(--accent-hover);
}


/* Contact info එක සුදු පැහැයෙන් තබා ගැනීමට */
.footer-links .contact-info li {
    color: #FFFFFF !important; /* වර්ණය වෙනස් නොවන ලෙස බලකිරීම */
    font-size: 14.5px;
    margin-bottom: 12px;
    opacity: 0.9; /* අවශ්‍ය නම් ස්වභාවික පෙනුමට පොඩි opacity එකක් දිය හැක */
}

/* Contact හෙඩින් එකත් (H4) සුදු කිරීමට අවශ්‍ය නම් */
.footer-links h4 {
    color: #FFFFFF !important;
}



.footer-bottom {
    background-color: var(--footer-bg); /* පසුබිම් වර්ණය මෙතැනින් මාරු වේ */
    padding: 25px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    transition: background-color 0.3s ease; /* වර්ණය මාරු වන විට මෘදුව සිදුවීමට */
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-2);
}
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand .brand { justify-content: center; }
    .footer-brand .footer-desc { margin: 20px auto; }
    .social-links { justify-content: center; }
    .newsletter-form { flex-direction: column; }
}