:root {
    /* Light Theme (Default) */
    --primary-color: #06173a;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6; /* Brighter Blue */
    --accent-hover: #2563eb;
    --text-color: #1e293b;
    --light-text: #64748b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --radius: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --footer-bg: #0f172a;
    --footer-text: #f8fafc;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --primary-color: #f8fafc;
    --secondary-color: #e2e8f0;
    --accent-color: #60a5fa;
    --text-color: #f1f5f9;
    --light-text: #94a3b8;
    --background: #0f172a;
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.85);
    --border-color: #334155;
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --footer-bg: #071028;
    --footer-text: #f8fafc;
}

/* Reset & Global */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background);
    line-height: 1.6;
    padding-top: 80px;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Typography & Utilities */
h1, h2, h3, h4 { color: var(--text-color); font-weight: 700; line-height: 1.2; }
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* --- Navigation (Glassmorphism) --- */
nav {
    position: fixed; top: 0; width: 100%; height: 80px; z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    transition: var(--transition);
}
nav.scrolled { height: 70px; box-shadow: var(--shadow); }

.nav-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 700; }
.logo-img { height: 45px; margin-right: 0.8rem; border-radius: 50%; }

.mobile-nav-toggle { display: none; }
/* Hide mobile nav by default on desktop */
.mobile-nav { display: none; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; opacity: 0.9; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); opacity: 1; }

/* Theme Toggle Button */
.theme-toggle {
    background: none; border: none; cursor: pointer; color: var(--text-color);
    font-size: 1.2rem; margin-left: 1rem; padding: 0.5rem; border-radius: 50%;
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--border-color); }

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    margin-top: -80px;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 40%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 40%);
    overflow: hidden;
}

/* Floating Shapes Background */
.hero::before {
    content: ''; position: absolute; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; letter-spacing: -1px; }
.hero p { font-size: 1.25rem; color: var(--light-text); margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto; }

.btn {
    display: inline-flex; align-items: center; padding: 0.8rem 2rem;
    border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition);
    border: none; gap: 0.5rem;
}
.btn-primary { background: var(--accent-color); color: white; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }
.btn-primary:hover { transform: translateY(-3px); background: var(--accent-hover); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5); }
.btn-outline { background: transparent; border: 2px solid var(--accent-color); color: var(--accent-color); margin-left: 1rem; }
.btn-outline:hover { background: var(--accent-color); color: white; }

/* --- Stats Section --- */
.stats-section { padding: 4rem 0; background: var(--card-bg); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 0.5rem; }
.stat-item p { color: var(--light-text); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }

/* --- Services & Cards --- */
.section-padding { padding: 6rem 0; }
.section-title { text-align: center; margin-bottom: 4rem; }
.section-title span { color: var(--accent-color); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 1rem; }
.section-title h2 { font-size: 2.5rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow); border-color: var(--accent-color); }
.card-icon { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 1.5rem; }
.card h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.card p { color: var(--light-text); font-size: 0.95rem; }

/* --- Pricing Tables --- */
.pricing-card { text-align: center; border: 1px solid var(--border-color); background: var(--card-bg); padding: 3rem 2rem; border-radius: var(--radius); transition: var(--transition); }
.pricing-card.featured { border-color: var(--accent-color); transform: scale(1.05); box-shadow: var(--shadow); position: relative; }
.pricing-card.featured::after { content: 'Popular'; position: absolute; top: 1rem; right: 1rem; background: var(--accent-color); color: white; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }
.price { font-size: 3rem; font-weight: 700; color: var(--text-color); margin: 1.5rem 0; }
.price span { font-size: 1rem; color: var(--light-text); font-weight: 400; }
.pricing-features { list-style: none; margin: 2rem 0; text-align: left; }
.pricing-features li { margin-bottom: 1rem; color: var(--light-text); }
.pricing-features li i { color: var(--accent-color); margin-right: 0.5rem; }

/* --- Testimonials --- */
.testimonials-slider { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 2rem; padding: 2rem 0; 
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.testimonials-slider::-webkit-scrollbar { display: none; }
.testimonial-card {
    min-width: 300px; flex: 1; scroll-snap-align: center;
    background: var(--card-bg); padding: 2rem; border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.testimonial-header { display: flex; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.avatar { width: 50px; height: 50px; background: var(--accent-color); border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.stars { color: #fbbf24; font-size: 0.9rem; margin-top: 0.2rem; }

/* --- Timeline (About Page) --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 2rem 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border-color); transform: translateX(-50%); }
.timeline-item { margin-bottom: 3rem; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; padding-right: 2rem; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 2rem; text-align: left; }
.timeline-dot { position: absolute; top: 0; width: 20px; height: 20px; background: var(--accent-color); border-radius: 50%; border: 4px solid var(--background); z-index: 2; }
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }

/* --- Floating Actions --- */
.floating-actions { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 1rem; z-index: 999; }
.fab-btn {
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: var(--transition);
    cursor: pointer; border: none;
}
.scroll-top { background: var(--accent-color); opacity: 0; visibility: hidden; transform: translateY(20px); }
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.whatsapp-btn { background: #25D366; }
.whatsapp-btn:hover { transform: scale(1.1); }

/* --- Footer --- */
footer { background: var(--footer-bg); color: var(--footer-text); padding: 4rem 0 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer h3 { color: white; margin-bottom: 1.5rem; font-size: 1.2rem; }
.footer-links a { display: block; color: #94a3b8; margin-bottom: 0.8rem; }
.footer-links a:hover { color: var(--accent-color); padding-left: 5px; }
.social-icons a { display: inline-flex; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; align-items: center; justify-content: center; margin-right: 0.5rem; transition: var(--transition); }
.social-icons a:hover { background: var(--accent-color); transform: translateY(-3px); }

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Add toggle logic in JS */
    .mobile-nav-toggle { display: block; }
    .mobile-nav { display: none; position: absolute; left: 0; right: 0; top: 80px; background: var(--nav-bg); padding: 1rem 2rem; border-bottom: var(--glass-border); }
    .mobile-nav.show { display: block; }
    .mobile-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid rgba(0,0,0,0.03); }
    .timeline::before { left: 20px; }
    .timeline-item { width: 100%; left: 0 !important; padding-left: 50px !important; text-align: left !important; }
    .timeline-dot { left: 10px !important; }
}

/* Form grid for contact page */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .floating-actions { right: 12px; bottom: 12px; }
}

/* --- FAQ Accordion --- */
.faq { max-width: 900px; margin: 0 auto; display: grid; gap: 1rem; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 0.75rem; overflow: hidden; }
.faq-question {
    width: 100%; text-align: left; padding: 1rem 1.25rem; background: transparent; border: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--text-color);
}
.faq-question .faq-toggle { margin-left: 1rem; color: var(--accent-color); font-weight: 700; }
.faq-answer { max-height: 0; padding: 0 1.25rem; color: var(--light-text); overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-item.open .faq-answer { max-height: 500px; padding: 1rem 1.25rem 1.25rem; }

/* --- Blog Page --- */
.blog-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.blog-article { background: var(--card-bg); padding: 1.5rem; border-radius: 0.75rem; border: 1px solid var(--border-color); }
.news-list { display: grid; gap: 1rem; }
.news-item { background: var(--card-bg); padding: 1rem; border-radius: 0.5rem; border: 1px solid var(--border-color); }

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr; }
}

/* Modal (global) */
.modal { display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { border-radius: 0.75rem; box-shadow: var(--shadow); background: var(--card-bg); color: var(--text-color); }
.modal-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; }
/* Make modal content vertically scrollable when long */
.modal-content { max-height: calc(100vh - 120px); overflow: auto; }

/* CTA Section (contact) */
.cta-section { background: var(--primary-color); color: white; }
.cta-section h2, .cta-section p { color: white; }
.cta-section .card { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); }
.cta-section .btn-primary { box-shadow: none; }

/* Dark theme override for CTA */
[data-theme="dark"] .cta-section { background: linear-gradient(90deg, rgba(6,10,23,1), rgba(10,14,30,1)); color: white; }
[data-theme="dark"] .cta-section h2, [data-theme="dark"] .cta-section p { color: white; }
[data-theme="dark"] .cta-section .card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
[data-theme="dark"] .cta-section .cta-newsletter input { background: transparent; color: var(--text-color); border: 1px solid rgba(255,255,255,0.06); padding: 0.6rem 0.8rem; }

/* Schedule Call button: readable in both themes */
.cta-section .schedule-btn { background: white; color: var(--primary-color); border-radius: 40px; padding: 0.8rem 1.2rem; font-weight: 700; }
.cta-section .schedule-btn:hover { transform: translateY(-3px); }

/* Dark theme: use accent-color background for contrast */
[data-theme="dark"] .cta-section .schedule-btn { background: var(--accent-color); color: #0f172a; }
[data-theme="dark"] .cta-section .schedule-btn:hover { background: var(--accent-hover); color: #0f172a; }

/* ----- Additional responsive polish ----- */
@media (max-width: 1024px) {
    .container { padding: 0 1.25rem; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.05rem; }
    .card { padding: 1.5rem; }
    .section-padding { padding: 3.5rem 0; }
    .btn { padding: 0.6rem 1.2rem; }
}

@media (max-width: 768px) {
    body { padding-top: 70px; }
    .hero { padding: 80px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; max-width: 90%; }
    .logo-img { height: 36px; }
    .nav-links { gap: 1rem; }
    .card { padding: 1.25rem; }
    .section-title { margin-bottom: 2rem; }
    .stats-section { padding: 2.5rem 0; }
    .testimonial-card { padding: 1rem; min-width: 280px; }
    .footer-grid { gap: 1.5rem; }
    .footer-grid, .grid { grid-template-columns: 1fr; }
    .cta-section .card { margin-top: 1rem; }
    .cta-section .schedule-btn { width: 100%; }
}

/* Better touch targets for floating actions */
@media (max-width: 480px) {
    .fab-btn { width: 44px; height: 44px; font-size: 1.2rem; }
    .floating-actions { right: 14px; bottom: 14px; }
}

/* Ensure grids collapse nicely when content is narrow */
.grid, .footer-grid, .stats-grid { grid-auto-rows: minmax(0, auto); }

/* Pricing grid tweaks for Services page */
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.pricing-card { min-height: 100%; display: flex; flex-direction: column; }
.pricing-card .price { margin-top: auto; }
.pricing-card button { width: 100%; }

/* Prevent featured card scaling from causing overflow on small screens */
@media (max-width: 600px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.featured { transform: none; margin: 0; }
    .pricing-card.featured::after { right: 1rem; }
    .pricing-card .price { font-size: 2rem; }
}

@media (max-width: 400px) {
    .pricing-card { padding: 1rem; }
    .pricing-card .price { font-size: 1.6rem; }
}

