:root {
  --primary: #C0192D;
  --primary-glow: rgba(192, 25, 45, 0.4);
  --dark: #0a0a0a;
  --dark-lighter: #151515;
  --accent: #FFD700;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Noto Sans Sinhala', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7; /* Increased for Sinhala vowel signs */
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* General Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 80px 0;
  position: relative;
}

.gradient-text {
  background: linear-gradient(90deg, #fff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.15;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0);
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(15px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 45px;
  transition: transform 0.3s;
}

.logo:hover { transform: scale(1.05); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.3s !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: center;
  position: relative;
  background: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.85)), url('../img/hero_digital.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.8rem; /* Reduced slightly */
  line-height: 1.4; /* Increased for Sinhala symbols */
  margin-bottom: 2rem;
  font-weight: 800;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0 auto 3rem;
  max-width: 600px;
}

.hero-img {
  display: none; /* Removed for centered layout to keep it clean */
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

.cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-outline {
  border: 1px solid var(--border);
  color: white;
  background: var(--glass);
}

.btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
}

.btn-whatsapp:hover {
  background: #1eb956 !important;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5) !important;
  transform: translateY(-3px);
}

.btn-call {
  background: #C0192D !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(192, 25, 45, 0.4) !important;
}

.btn-call:hover {
  background: #a01525 !important;
  box-shadow: 0 8px 25px rgba(192, 25, 45, 0.5) !important;
  transform: translateY(-3px);
}

/* Portfolio Grid */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 700;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--dark-lighter);
  transition: all 0.4s;
}

.portfolio-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.6s;
}

.portfolio-item:hover img { transform: scale(1.1); }

.portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  opacity: 0;
  transition: opacity 0.4s;
}

.portfolio-item:hover .portfolio-info { opacity: 1; }

/* Stats Bar */
.stats {
  background: var(--dark-lighter);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* SEO & Active Section */
.active-section {
  background: rgba(192, 25, 45, 0.03);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  background: var(--dark-lighter);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s;
  text-decoration: none !important;
  display: block;
}

.blog-card h3 {
  color: #ffffff !important;
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.blog-card p {
  color: var(--text-secondary) !important;
  line-height: 1.6;
}

.blog-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.02);
}

.blog-card:hover h3 {
  color: var(--primary) !important;
}

/* Contact CTA */
.cta-banner {
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4rem;
  text-align: center;
}

/* Footer */
footer {
  padding: 60px 0 30px;
  background: #050505;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h4 { margin-bottom: 1.5rem; color: #fff; }
.footer-col p, .footer-col a { color: var(--text-secondary); text-decoration: none; display: block; margin-bottom: 0.8rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col div a:hover { color: var(--primary) !important; transform: translateY(-3px); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 3rem; line-height: 1.4; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero { background-attachment: scroll; } /* Better performance on mobile */
  .hero-content h1 { font-size: 2.5rem; line-height: 1.4; }
  .hero-content p { font-size: 1rem; line-height: 1.6; }
  .cta-group { flex-direction: column; width: 100%; max-width: 320px; margin: 0 auto; }
  .btn { width: 100%; justify-content: center; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col { margin-bottom: 2rem; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.8rem; }
}

/* Particles Container */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.review-card {
  background: var(--dark-lighter);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 24px;
  position: relative;
  transition: all 0.3s;
  text-align: left;
}

.review-card:hover { border-color: var(--primary); transform: translateY(-5px); }

.review-card i.quote {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.client-img {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8B0000);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
}

.client-detail h4 { font-size: 1rem; color: #fff; }
.client-detail p { font-size: 0.8rem; color: var(--text-secondary); }

/* Contact Form */
.contact-form-container {
  max-width: 600px;
  margin: 4rem auto 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: 30px;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.6rem; color: #fff; font-size: 0.9rem; font-weight: 500; }
.form-control {
  width: 100%;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: white;
  font-family: inherit;
  transition: all 0.3s;
}

.form-control:focus { outline: none; border-color: var(--primary); background: rgba(255, 255, 255, 0.08); }
textarea.form-control { resize: vertical; min-height: 140px; }

@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: 1fr; }
  .contact-form-container { padding: 2rem; }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: #0f0f0f;
  margin: 5% auto;
  padding: 2.5rem;
  border: 1px solid var(--border);
  width: 90%;
  max-width: 500px;
  border-radius: 30px;
  position: relative;
  box-shadow: 0 0 50px rgba(192, 25, 45, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 25px; top: 15px;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover { color: #fff; }

.add-review-card {
  border: 2px dashed var(--border) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  background: transparent !important;
}

.add-review-card:hover {
  border-style: solid !important;
  background: rgba(192, 25, 45, 0.05) !important;
  border-color: var(--primary) !important;
}

.add-review-content { text-align: center; }

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%; height: 4px;
  background: var(--primary);
  z-index: 2001;
  box-shadow: 0 0 15px var(--primary);
  transition: width 0.1s;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 25px; right: 25px;
  width: 50px; height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
  box-shadow: 0 5px 15px rgba(192, 25, 45, 0.4);
}

.back-to-top.active { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); background: #8B0000; }

/* Mobile Menu Logic */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; height: 100vh;
    background: #0a0a0a;
    display: flex !important;
    flex-direction: column;
    padding: 100px 30px;
    transition: 0.5s;
    z-index: 1001;
    border-left: 1px solid var(--border);
    backdrop-filter: blur(10px);
  }

  .nav-links.active { right: 0; }
  .nav-links a { font-size: 1.2rem; margin: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
  .mobile-toggle { display: block !important; cursor: pointer; font-size: 1.5rem; z-index: 1002; }
  .logo { height: 40px !important; }
}

@media (max-width: 480px) {
  .modal-content { 
    margin: 20% auto; 
    padding: 2rem;
  }
}
