/* --- style.css (FULL UPDATED VERSION) --- */

/* 1. GLOBAL VARIABLES & RESET */
:root {
    --primary-color: #0f172a;  /* Deep Navy */
    --accent-color: #10b981;   /* Emerald Green */
    --text-light: #f8fafc;
    --text-dark: #334155;
    --bg-light: #f8fafc;
}

html { scroll-behavior: smooth; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; text-decoration: none; }

body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }

/* 2. NAVIGATION BAR */
nav {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}
.nav-scrolled { padding: 10px 40px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

.logo { color: var(--text-light); font-size: 1.5rem; font-weight: 700; }
.logo span { color: var(--accent-color); }

.nav-links { list-style: none; display: flex; gap: 25px; align-items: center; }
.nav-links a { color: #cbd5e1; font-weight: 500; transition: 0.3s; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent-color); }

/* Hamburger Menu */
.hamburger { display: none; cursor: pointer; color: white; font-size: 1.5rem; }

/* 3. HERO SECTION (Parallax) */
.page-header {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072'); 
    background-size: cover; background-position: center; background-attachment: fixed;
    color: var(--text-light); padding: 140px 20px; text-align: center;
}
.page-header h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; animation: fadeInUp 0.8s ease-out; }
.page-header p { font-size: 1.25rem; color: #cbd5e1; max-width: 700px; margin: 0 auto 40px auto; animation: fadeInUp 1s ease-out; }

/* Buttons */
.cta-btn { 
    background-color: var(--accent-color); color: white; padding: 15px 35px; 
    border-radius: 50px; font-weight: 600; transition: 0.3s; display: inline-block; cursor: pointer; border: none; 
}
.cta-btn:hover { background-color: #059669; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }

.btn-outline { background: transparent; border: 2px solid var(--accent-color); margin-left: 10px; }
.btn-outline:hover { background: var(--accent-color); border-color: var(--accent-color); }

/* 4. MODERN ABOUT SECTION (NEW UPDATE) */
.container { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }

.about-content { 
    display: flex; align-items: center; gap: 80px; flex-wrap: wrap; 
}

/* Image Design */
.about-img { 
    flex: 1; min-width: 300px; position: relative; 
}
.about-img img { 
    width: 100%; border-radius: 20px; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.15); 
    transition: transform 0.5s ease; position: relative; z-index: 2; display: block;
}
/* Decorative Box */
.about-img::before {
    content: ''; position: absolute; top: 20px; left: 20px; width: 100%; height: 100%;
    border: 3px solid var(--accent-color); border-radius: 20px; z-index: 1; transition: all 0.5s ease;
}
.about-img:hover img { transform: translateY(-10px) translateX(-10px); }
.about-img:hover::before { transform: translate(15px, 15px); border-color: var(--primary-color); }

/* Text Design */
.about-text { flex: 1.2; min-width: 300px; }
.about-text h4 {
    color: var(--accent-color); font-weight: 700; letter-spacing: 2px; font-size: 0.9rem;
    margin-bottom: 15px; text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.about-text h4::before { content: ''; width: 30px; height: 2px; background-color: var(--accent-color); }
.about-text h2 {
    font-size: 2.8rem; font-weight: 800; color: var(--primary-color);
    margin-bottom: 25px; line-height: 1.2;
}
.about-text p {
    color: #475569; margin-bottom: 20px; font-size: 1.05rem; line-height: 1.8; text-align: justify;
}

/* Skills */
.skills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 35px; }
.skill-tag { 
    background: white; border: 1px solid #cbd5e1; padding: 10px 22px; 
    border-radius: 50px; font-size: 0.9rem; color: var(--text-dark); font-weight: 600; 
    transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.05); cursor: default;
}
.skill-tag:hover { 
    background: var(--accent-color); color: white; border-color: var(--accent-color);
    transform: translateY(-5px); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}

/* --- Modern Service Card Design --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.service-card-modern {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Mouse එක ගෙනිච්චම වෙන දේවල් */
.service-card-modern:hover {
    transform: translateY(-10px); /* උඩට එනවා */
    border-color: #10b981; /* Border එක කොළ පාට වෙනවා */
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.2); /* Glow Effect */
}

/* Image Area */
.svc-img-wrapper {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.svc-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Image Zoom Effect */
.service-card-modern:hover .svc-img-wrapper img {
    transform: scale(1.1);
}

/* Image එක උඩ තියෙන කළු Gradient එක (අකුරු පේන්න) */
.svc-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(30, 41, 59, 0.8) 90%, #1e293b 100%);
}

/* Icon Badge Design */
.svc-icon-box {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 4px solid #1e293b; /* කාඩ් එකේ පාටින්ම Border එකක් */
    transition: transform 0.3s ease;
    z-index: 2;
}

.service-card-modern:hover .svc-icon-box {
    transform: rotateY(180deg);
}

/* Text Content */
.svc-content {
    padding: 30px 25px 25px;
    position: relative;
    z-index: 1;
}

.svc-content h3 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.svc-content p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.learn-more {
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.8;
    transition: 0.3s;
}

.service-card-modern:hover .learn-more {
    opacity: 1;
    gap: 10px;
}
}

/* 6. SUB PAGE CONTENT BOX (for service pages) */
.content-container { 
    max-width: 900px; margin: -60px auto 50px auto; background: white; 
    padding: 50px; border-radius: 15px; position: relative; z-index: 10; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}
.back-link { color: #64748b; font-size: 0.9rem; margin-bottom: 20px; display: inline-block; transition: 0.3s; }
.back-link:hover { color: var(--accent-color); }

/* 7. PREMIUM CONTACT FORM */
.contact-section { background-color: #f8fafc; position: relative; }
.contact-wrapper { display: flex; gap: 50px; flex-wrap: wrap; margin-top: 20px; align-items: flex-start; }
.contact-info { flex: 1; min-width: 300px; }
.contact-info h3 { font-size: 2rem; margin-bottom: 20px; color: var(--primary-color); }

.contact-detail { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; background: white; padding: 15px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.contact-detail span { font-size: 1.5rem; background: #e0f2fe; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--primary-color); }

/* Glassy Form Box */
.contact-form-box { 
    flex: 1.5; min-width: 300px; background: white; padding: 50px; 
    border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; 
}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 600; color: var(--primary-color); }
.form-group input, .form-group textarea, .form-group select { 
    width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 12px; 
    font-size: 1rem; background: #f8fafc; outline: none; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--accent-color); background: white; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); 
}
.submit-btn { 
    background: linear-gradient(135deg, var(--primary-color), #1e293b); color: white; 
    padding: 18px 30px; border: none; border-radius: 12px; font-weight: 700; 
    cursor: pointer; width: 100%; transition: 0.3s; font-size: 1.1rem; box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}
.submit-btn:hover { 
    background: linear-gradient(135deg, var(--accent-color), #059669); transform: translateY(-3px); 
}

/* 8. FOOTER */
footer { background-color: var(--primary-color); color: var(--text-light); text-align: center; padding: 50px 20px; margin-top: 50px; }
.social-icons a { color: white; font-size: 1.8rem; margin: 0 15px; transition: 0.3s; display: inline-block; }
.social-icons a:hover { color: var(--accent-color); transform: scale(1.2); }

/* 9. CHATBOT */
.chat-btn { position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; background-color: var(--accent-color); color: white; border-radius: 50%; border: none; box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4); cursor: pointer; z-index: 5000; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.chat-btn:hover { transform: scale(1.1); background-color: #059669; }

.chat-box { display: none; position: fixed; bottom: 95px; right: 25px; width: 350px; height: 450px; background-color: white; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 5000; overflow: hidden; border: 1px solid #e2e8f0; flex-direction: column; animation: fadeInChat 0.3s ease-out; }
@keyframes fadeInChat { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.chat-header { background-color: var(--primary-color); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; background-color: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 80%; padding: 10px 15px; border-radius: 10px; font-size: 0.9rem; }
.bot-msg { background-color: #e2e8f0; color: var(--text-dark); align-self: flex-start; }
.user-msg { background-color: var(--accent-color); color: white; align-self: flex-end; }
.chat-input-area { padding: 10px; border-top: 1px solid #e2e8f0; background: white; display: flex; gap: 10px; }
.chat-input { flex: 1; padding: 10px; border: 1px solid #cbd5e1; border-radius: 5px; outline: none; }
.chat-send { background: var(--primary-color); color: white; border: none; padding: 0 15px; border-radius: 5px; cursor: pointer; }

/* 10. ANIMATIONS (Reveal on Scroll) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* 11. MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .nav-links { display: none; } 
    .hamburger { display: block; }
    
    .nav-menu.active {
        display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; 
        width: 100%; background: var(--primary-color); padding: 20px; text-align: center;
    }
    
    .page-header h1 { font-size: 2.5rem; }
    .about-content { flex-direction: column; gap: 40px; }
    .about-img::before { display: none; } /* Hide decoration on mobile to save space */
    .about-text h2 { font-size: 2.2rem; }
    
    .contact-wrapper { flex-direction: column; }
    .chat-box { width: 90%; right: 5%; bottom: 90px; }
}

/* --- NDVI DASHBOARD STYLES --- */
#ndvi-dashboard {
    padding-top: 20px;
    margin-bottom: 60px;
}

.dashboard-wrapper {
    display: flex;
    background: #1e293b; /* Dark Professional Background */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    color: white;
    height: 550px;
}

/* Sidebar Styles */
.dash-sidebar {
    flex: 1;
    padding: 30px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255,255,255,0.1);
    min-width: 300px;
}

.dash-stat h4 {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.dash-stat h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.stat-desc { font-size: 0.85rem; color: #cbd5e1; }

.status-live {
    color: #ef4444; /* Red for LIVE */
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1rem;
}

.blink { animation: blinker 1.5s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* Map Area Styles */
.dash-map-container {
    flex: 2;
    position: relative;
    background: black;
}

#ndvi-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Scanning Animation Overlay */
.map-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Allows clicking on map */
    z-index: 2;
    overflow: hidden;
}

.loading-bar {
    width: 100%;
    height: 2px;
    background: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 15px rgba(16, 185, 129, 1);
    position: absolute;
    top: -10px;
    animation: scanMap 4s linear infinite;
}

@keyframes scanMap {
    0% { top: -10px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 105%; opacity: 0; }
}

.scan-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.scan-btn:hover { background: #059669; }

/* Chart Container */
.dash-chart-container {
    height: 150px;
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .dashboard-wrapper { flex-direction: column; height: auto; }
    .dash-map-container { height: 400px; }
}

/* --- SERVICE DETAIL PAGE STYLES --- */
.service-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), #0f172a);
}

.service-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.service-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.breadcrumb {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.breadcrumb a {
    color: #10b981;
    text-decoration: none;
}

.service-detail-container {
    max-width: 1000px;
    margin: -50px auto 50px;
    position: relative;
    z-index: 5;
    background: #1e293b;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.service-main-content p {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.sectors-box {
    background: #0f172a;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.sectors-box h3 {
    color: #10b981;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sectors-list li {
    list-style: none;
    color: #94a3b8;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sectors-list li:last-child { border-bottom: none; }
.sectors-list li i { color: #3b82f6; font-size: 0.8rem; }

.cta-box {
    margin-top: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .service-detail-container {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
    }
    .service-hero h1 { font-size: 2.5rem; }
}

/* =========================================
   NEW ADDITIONS (Add this to the bottom)
   ========================================= */

/* --- 1. TECH STACK SLIDER SECTION --- */
.tech-section {
    padding: 4rem 0;
    background: var(--primary-color); /* Matches your Navy Blue theme */
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-slider {
    height: 100px;
    margin: auto;
    position: relative;
    width: 90%;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.slide-track {
    display: flex;
    width: calc(250px * 12); /* 250px x 12 slides */
    animation: scroll 30s linear infinite;
}

.slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #94a3b8; /* Slate color */
    gap: 15px;
    transition: 0.3s;
}

.slide:hover {
    color: var(--accent-color); /* Uses your Emerald Green */
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.slide i { font-size: 2rem; }

/* Animation Keyframes */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 6)); }
}

/* --- 2. TESTIMONIALS SECTION --- */
.testimonial-bg {
    background: linear-gradient(180deg, var(--primary-color) 0%, #1e293b 100%);
    padding: 5rem 0;
    color: white;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: rgba(30, 41, 59, 0.5); /* Semi-transparent dark blue */
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #334155;
    color: white;
    transition: 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.2);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.6;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.client-details h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2px;
}

.client-details p {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Mobile Responsiveness for new sections */
@media (max-width: 768px) {
    .tech-section { padding: 2rem 0; }
    .slide { width: 200px; font-size: 1.1rem; }
    .testimonial-bg { padding: 3rem 0; }
}