/* ============================================================
   CHENNAI TIME TECHNOLOGIES — Main Stylesheet
   Color Theme: #ff0000 | #ffffff | #050505 | #ff2a2a
   ============================================================ */

:root {
  --primary:     #ff0000;
  --accent:      #ff2a2a;
  --white:       #ffffff;
  --bg:          #050505;
  --bg-card:     #0d0d0d;
  --bg-dark:     #080808;
  --border:      rgba(255,0,0,0.15);
  --text-muted:  #888;
  --text-light:  #ccc;
  --transition:  0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* block horizontal scroll at root — covers all breakpoints */
}

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  max-width: 100%;     /* prevent any child from stretching beyond viewport */
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; }

.text-accent { color: var(--accent) !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== BUTTONS ===== */
.ctt-btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}
.ctt-btn-primary:hover {
  background: transparent;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,0,0,0.35);
}

.ctt-btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}
.ctt-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ===== NAVBAR ===== */
.ctt-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1050;
  /* Stable padding — never changes on scroll (was 12px→8px which caused 38px height jump) */
  padding: 10px 0;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  background: transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  isolation: isolate;
}
.ctt-navbar.scrolled {
  background: rgba(5,5,5,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* No padding change — eliminates height jump on scroll */
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(255,0,0,0.08);
}
.ctt-navbar .navbar-brand {
  padding: 0;
  margin-right: 32px;
  display: flex;
  align-items: center;
}
.ctt-logo {
  /* 68px keeps the brand prominent without pushing navbar height to 139px */
  height: 68px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(255,0,0,0.55));
  /* Use transform for scroll animation — no layout impact, no height jump */
  transition: transform 0.4s ease, filter 0.4s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  display: block;
  flex-shrink: 0;
}
.ctt-navbar.scrolled .ctt-logo {
  transform: scale(0.88);
  transform-origin: left center;
}
.navbar-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 1rem;
  padding: 8px 18px !important;
  border-radius: 6px;
  transition: all var(--transition);
  position: relative;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 60%; }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--white) !important; }

.ctt-dropdown {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.ctt-dropdown .dropdown-item {
  color: rgba(255,255,255,0.8);
  padding: 10px 20px;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.ctt-dropdown .dropdown-item:hover {
  background: rgba(255,0,0,0.1);
  color: var(--primary);
  padding-left: 26px;
}

/* Mobile toggler */
.navbar-toggler {
  border: 1px solid var(--primary);
  padding: 6px 10px;
  flex-shrink: 0;        /* never squeeze off-screen */
  line-height: 1;
  cursor: pointer;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(255,0,0,0.3); outline: none; }
.navbar-toggler-icon { filter: invert(1); }

/* ===== HERO ===== */
.ctt-hero {
  position: relative;
  min-height: max(100vh, 760px);
  background: url("../images/hero-bg.a47faf4325e3.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.28) 0%,
    rgba(0,0,0,0.10) 55%,
    transparent 100%
  );
}
.hero-container {
  position: relative;
  z-index: 2;
  padding-top: 90px;
  padding-bottom: 56px;
  padding-left: 12px;
  padding-right: 12px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,0,0,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,0,0,0); }
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.90), 0 1px 6px rgba(0,0,0,0.80);
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.90);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
  text-shadow: 0 1px 12px rgba(0,0,0,0.85), 0 1px 4px rgba(0,0,0,0.70);
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

/* Stats row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-icon {
  color: var(--primary);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  background: rgba(255,0,0,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero Logo */
.hero-logo-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
}
.hero-logo-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 500px;
  height: 500px;
  max-width: 88vw;
  max-height: 88vw;
}
.hero-logo-img {
  width: 80%;
  max-width: 560px;
  object-fit: contain;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 0 48px rgba(255,0,0,0.50));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.hero-logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,0,0,0.2);
  animation: spin-slow linear infinite;
}
.ring-1 { width: 100%; height: 100%; animation-duration: 18s; border-color: rgba(255,0,0,0.15); }
.ring-2 { width: 80%; height: 80%; animation-duration: 12s; animation-direction: reverse; border-color: rgba(255,0,0,0.25); }
.ring-3 { width: 60%; height: 60%; animation-duration: 8s; border-color: rgba(255,0,0,0.35); }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,0,0,0.28) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ===== SECTIONS ===== */
.ctt-section {
  padding: 120px 0;
  background: var(--bg);
}
.ctt-section-dark {
  background: var(--bg-dark);
}

#services.ctt-section  { padding-bottom: 40px; }
#portfolio.ctt-section { padding-top: 40px; }

.section-header { margin-bottom: 10px; }
.section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.section-divider {
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin: 18px auto 0;
  border-radius: 2px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  transition: all 0.4s ease;
  height: 100%;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(255,0,0,0.15);
}

.service-icon-wrap {
  width: 64px;
  height: 64px;
  background: rgba(255,0,0,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 1.6rem;
  transition: all var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: var(--primary);
  color: var(--white);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.service-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px; }
.service-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.service-link:hover { gap: 10px; color: var(--accent); }

/* Full detail cards */
.service-card-full .service-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.service-card-full .service-features li {
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.service-card-full .service-features li:last-child { border: none; }

/* CTA card variant */
.service-cta-card {
  background: linear-gradient(135deg, rgba(255,0,0,0.15), rgba(255,0,0,0.05));
  border-color: rgba(255,0,0,0.3);
}
.service-cta-icon { color: var(--primary); }

/* ===== PROJECT CARDS ===== */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s ease;
}
.project-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(255,0,0,0.12);
}
.project-img-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: #111;
}
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img { transform: scale(1.08); }
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f0f, #1c1c1c);
  transition: transform 0.5s ease;
}
.project-card:hover .project-placeholder { transform: scale(1.06); }
.project-placeholder-lg {
  height: 350px;
  background: linear-gradient(135deg, #111, #1a1a1a);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,5,5,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-view-btn {
  background: var(--primary);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
}
.project-view-btn:hover { background: var(--accent); color: var(--white); }

.project-info { padding: 20px; }
.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.project-tag {
  display: inline-block;
  background: rgba(255,0,0,0.1);
  color: var(--primary);
  border: 1px solid rgba(255,0,0,0.2);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
}

/* ===== PROJECTS HORIZONTAL SCROLL ===== */
.projects-scroll-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 14px;
  cursor: grab;
  user-select: none;
}
.projects-scroll-wrap:active { cursor: grabbing; }
.projects-scroll-wrap::-webkit-scrollbar { height: 4px; }
.projects-scroll-wrap::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
}
.projects-scroll-wrap::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}
.projects-scroll-track {
  display: flex;
  gap: 20px;
  padding: 6px 2px 4px;
  width: max-content;
}
.projects-scroll-track .project-card {
  width: 300px;
  flex-shrink: 0;
}

/* ===== TECH CARDS ===== */
#technologies.ctt-section { padding-top: 40px; }

/* ===== TECH MARQUEE ===== */
.tech-marquee-outer {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.tech-marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: tech-scroll 32s linear infinite;
}
@keyframes tech-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tech-card {
  background: #111416;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px 28px 24px;
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
}
.tech-icon-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  display: block;
}
.tech-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.3px;
  text-align: center;
}

/* ===== WHY CHOOSE US ===== */
.why-list { display: flex; flex-direction: column; gap: 20px; }
.why-item { display: flex; align-items: flex-start; gap: 16px; }
.why-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.why-title { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.why-desc { font-size: 0.87rem; color: var(--text-muted); margin: 0; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 52px 32px;
  text-align: center;
  transition: all var(--transition);
}
.stats-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(255,0,0,0.12);
}
.stats-num {
  display: block;
  font-size: 3.75rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.stats-label {
  display: block;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ===== CTA SECTION ===== */
.ctt-cta-section {
  padding: 120px 0;
  background: linear-gradient(135deg, rgba(255,0,0,0.12) 0%, rgba(5,5,5,0) 60%),
              radial-gradient(ellipse at center, rgba(255,0,0,0.08) 0%, transparent 70%),
              var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.cta-desc { color: var(--text-muted); font-size: 1.05rem; }

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(180deg, rgba(255,0,0,0.08) 0%, transparent 100%),
              var(--bg-dark);
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
}
.breadcrumb { background: transparent; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ===== ABOUT PAGE ===== */
.about-logo-wrap {
  position: relative;
  display: inline-block;
}
.about-logo-img {
  width: 320px;
  max-width: 100%;
  filter: drop-shadow(0 0 50px rgba(255,0,0,0.4));
  animation: float 4s ease-in-out infinite;
}
.about-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255,0,0,0.08);
  border: 1px solid rgba(255,0,0,0.2);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Mission Vision Values */
.mvv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  height: 100%;
  transition: all var(--transition);
}
.mvv-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-6px);
}
.mvv-card-featured {
  background: linear-gradient(135deg, rgba(255,0,0,0.12), rgba(5,5,5,0.8));
  border-color: rgba(255,0,0,0.3);
}
.mvv-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,0,0,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.mvv-title { font-size: 1.2rem; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.mvv-desc { color: var(--text-muted); font-size: 0.92rem; line-height: 1.8; }
.mvv-list { list-style: none; padding: 0; }
.mvv-list li { color: var(--text-light); font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mvv-list li:last-child { border: none; }

/* Why cards */
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  height: 100%;
  transition: all var(--transition);
}
.why-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(255,0,0,0.1);
}
.why-card-icon {
  width: 58px;
  height: 58px;
  background: rgba(255,0,0,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 18px;
  transition: all var(--transition);
}
.why-card:hover .why-card-icon { background: var(--primary); color: var(--white); }
.why-card-title { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.why-card-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; }

/* ===== PORTFOLIO GRID ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  width: 100%;
}
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ===== PORTFOLIO FILTERS ===== */
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filter-btn {
  padding: 8px 22px;
  border-radius: 30px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ===== CONTACT ===== */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 24px;
  transition: all var(--transition);
}
.contact-info-card:hover {
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-6px);
}
.contact-info-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,0,0,0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.3rem;
  margin: 0 auto 16px;
}
.contact-info-title { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.contact-info-value { color: var(--text-light); font-size: 0.92rem; }
.contact-info-value:hover { color: var(--primary); }

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.ctt-input {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 8px !important;
  color: var(--white) !important;
  padding: 12px 16px !important;
  font-size: 0.93rem !important;
  transition: border-color var(--transition) !important;
}
.ctt-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255,0,0,0.15) !important;
  background: rgba(255,0,0,0.03) !important;
  outline: none !important;
}
.ctt-input::placeholder { color: rgba(255,255,255,0.3) !important; }

.map-container { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.contact-social .social-icons { display: flex; gap: 12px; }

/* ===== SOCIAL ICONS ===== */
.social-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
  transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}
.social-icon.youtube:hover  { background: #ff0000; border-color: #ff0000; }
.social-icon.instagram:hover { background: #e1306c; border-color: #e1306c; }
.social-icon.facebook:hover  { background: #1877f2; border-color: #1877f2; }
.social-icon.twitter:hover   { background: #000; border-color: #555; }

/* ===== FOOTER ===== */
.ctt-footer {
  background: #030303;
  border-top: 1px solid var(--border);
  padding-top: 70px;
}
.footer-main { padding-bottom: 50px; }
.footer-logo { height: 72px; filter: drop-shadow(0 0 8px rgba(255,0,0,0.3)); }
.footer-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.8; margin-bottom: 24px; }
.footer-contact-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.87rem;
}
.footer-contact-list li i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }
.footer-contact-list li a { color: var(--text-muted); }
.footer-contact-list li a:hover { color: var(--primary); }
.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 2px;
  background: var(--primary);
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.87rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before {
  content: '›';
  color: var(--primary);
  font-size: 1.1rem;
  transition: transform var(--transition);
}
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-divider { border-color: var(--border); }
.footer-bottom { padding: 24px 0; font-size: 0.83rem; color: var(--text-muted); }
.footer-bottom-links a { color: var(--text-muted); font-size: 0.83rem; }
.footer-bottom-links a:hover { color: var(--primary); }

/* ===== PROJECT DETAIL ===== */
.project-meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  position: sticky;
  top: 100px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.meta-item:last-of-type { border: none; }
.meta-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.meta-value { font-size: 0.92rem; color: var(--text-light); }

/* ===== ALERT ===== */
.alert-success { background: rgba(25, 135, 84, 0.15); border-color: rgba(25, 135, 84, 0.3); color: #75b798; }
.alert-danger  { background: rgba(220, 53, 69, 0.15); border-color: rgba(220, 53, 69, 0.3); color: #ea868f; }

/* ===== CONTAINER STANDARDIZATION =====
   Full-width layout — no centering cap, minimal side padding. */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100%;
  max-width: 100%;
  margin-left:  auto;
  margin-right: auto;
  padding-left:  0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

/* Sections and footer: breathing room so grid cards don't touch the viewport edge */
.ctt-section > .container,
.ctt-section-dark > .container,
.ctt-cta-section > .container,
.ctt-footer > .container {
  padding-left:  24px !important;
  padding-right: 24px !important;
}

/* Navbar: small side padding for the brand/toggle */
.ctt-navbar .container {
  padding-left:  24px !important;
  padding-right: 24px !important;
}


/* ===== EXTRA TIGHTENING ON SMALL MOBILE =====
   Already compact from the global rule above, but also tighten card padding. */
@media (max-width: 575.98px) {
  .service-card      { padding: 18px 12px; min-height: unset; }
  .service-icon-wrap { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 12px; border-radius: 10px; }
  .service-title     { font-size: 0.88rem; margin-bottom: 8px; }
  .service-desc      { font-size: 0.75rem; line-height: 1.5; margin-bottom: 12px; }
  .service-link      { font-size: 0.75rem; }
  .mvv-card          { padding: 28px 16px; }
  .why-card          { padding: 24px 16px; }
  .project-info      { padding: 14px 12px; }
  .contact-info-card { padding: 24px 14px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199.98px) {
  .hero-logo-wrapper { width: 400px; height: 400px; }
  /* Logo at tablet/hamburger breakpoint — no height change on scroll, transform handles it */
  .ctt-logo { height: 56px; }
  .ctt-navbar.scrolled .ctt-logo { transform: scale(0.90); transform-origin: left center; }

  .ctt-navbar {
    /* Force opaque background since mobile can't rely on transparent state */
    background: rgba(5,5,5,0.97) !important;
    /* overflow-x: clip removed — it blocks the absolute-positioned collapse panel */
  }
  .ctt-navbar .container,
  .ctt-navbar .container-fluid {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .ctt-navbar .navbar-brand { margin-right: 0; }

  /* Mobile collapse menu */
  .navbar-collapse {
    position: absolute;
    top: 100%;          /* anchor to bottom of fixed navbar */
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(5,5,5,0.99);
    border-top: 1px solid rgba(255,0,0,0.15);
    padding: 8px 8px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    /* Use 100svh (small viewport) for mobile browser chrome awareness */
    max-height: calc(100svh - 88px);
    max-height: calc(100vh - 88px);  /* fallback */
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    overscroll-behavior: contain;   /* stop scroll leaking to page behind */
  }
  .navbar-nav { width: 100%; }
  .navbar-nav .nav-link {
    padding: 12px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-radius: 0;
  }
  .navbar-nav .nav-link::after { display: none; }

  /* Mobile dropdowns — inline, not floating */
  .ctt-dropdown {
    position: static !important;
    float: none !important;
    background: transparent;
    border: none;
    border-left: 2px solid rgba(255,0,0,0.25);
    margin-left: 20px;
    padding: 4px 0;
    box-shadow: none;
  }
  .ctt-dropdown .dropdown-item { padding: 9px 16px; font-size: 0.88rem; }
  .ctt-dropdown .dropdown-item:hover { padding-left: 22px; }

  /* Get In Touch button full width */
  .navbar-nav .nav-item.ms-lg-2 { margin: 10px 0 0 !important; }
  .navbar-nav .ctt-btn-primary { width: 100%; justify-content: center; }
}

/* Lock body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
  touch-action: none;
}
@media (max-width: 991.98px) {
  .ctt-logo { height: 50px; }
  /* No scroll height change on tablet — transform only, but subtle enough to skip */
  .ctt-navbar.scrolled .ctt-logo { transform: none; }
  .hero-logo-col { padding-top: 32px; padding-bottom: 32px; }
  .hero-logo-wrapper { width: 290px; height: 290px; }
  .hero-stats { gap: 16px 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .ctt-section { padding: 90px 0; }
  .ctt-cta-section { padding: 90px 0; }
}
@media (max-width: 767.98px) {
  .ctt-logo { height: 44px; }
  /* No scroll size change at mobile — already compact */
  .ctt-navbar.scrolled .ctt-logo { transform: none; }
  .ctt-section { padding: 70px 0; }
  .ctt-cta-section { padding: 70px 0; }
  .page-hero { padding: 140px 0 60px; }

  /* Hero full-screen on mobile */
  .ctt-hero {
    min-height: 100vh;
    min-height: 100svh;
    align-items: flex-start;
    background-position: center center;
    background-size: cover;
  }
  .hero-bg-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.25) 0%,
      rgba(0,0,0,0.10) 60%,
      transparent 100%
    );
  }
  .hero-container {
    padding-top: 100px;
    padding-bottom: 40px;
    padding-left: 12px;
    padding-right: 12px;
    width: 100%;
    max-width: 100%;
  }
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding-left: 26px;
    padding-right: 26px;
  }
  @media (min-width: 768px) {
    .hero-content {
      padding-left: 36px;
      padding-right: 36px;
    }
  }
  .hero-title { font-size: 2.1rem; }
  .hero-badge { text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
  .hero-desc {
    font-size: 1rem;
    max-width: 100%;
    margin-bottom: 28px;
  }
  .stat-num { text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
  .stat-label { text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
  .hero-buttons { margin-bottom: 28px; }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .stat-item { gap: 10px; }
  .stat-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .stat-num { font-size: 1.1rem; }
  .stat-label { font-size: 0.72rem; }

  .contact-form-card { padding: 24px 12px; }
  .stats-grid { gap: 12px; }
  .stats-card { padding: 28px 12px; }
  .stats-num { font-size: 2.4rem; }
  .stats-label { font-size: 0.9rem; }
}
@media (max-width: 575.98px) {
  .ctt-logo { height: 40px; }
  .ctt-navbar.scrolled .ctt-logo { transform: none; }
  .hero-title { font-size: 1.85rem; }
  .hero-container { padding-left: 16px; padding-right: 16px; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .cta-buttons .btn { width: 100%; margin-right: 0 !important; margin-bottom: 12px; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.9rem; }
  .ctt-btn-primary, .ctt-btn-outline { font-size: 0.95rem; padding: 12px 24px; }
}

/* ============================================================
   ADVANCED FEATURES — preloader, progress bar, whatsapp,
   testimonials, blog, careers, team, newsletter, FAQ, errors
   ============================================================ */

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.loaded { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
  width: 70px; height: 70px; object-fit: contain;
  animation: preloader-pulse 1.2s ease-in-out infinite;
}
.preloader-bar {
  width: 140px; height: 3px; margin: 18px auto 0;
  background: rgba(255,0,0,0.15); border-radius: 3px; overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 40%;
  background: var(--primary); border-radius: 3px;
  animation: preloader-slide 1.1s ease-in-out infinite;
}
@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}
@keyframes preloader-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 10000; transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255,0,0,0.6);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed; bottom: 28px; left: 28px; z-index: 998;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1); color: #fff;
  box-shadow: 0 6px 28px rgba(37,211,102,0.65);
}

/* ===== SEARCH MODAL ===== */
.ctt-search-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.ctt-search-input { font-size: 1.05rem; }
.nav-search-toggle { font-size: 0.95rem; }

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 3rem;
}
.testimonial-quote-icon {
  font-size: 1.8rem; color: var(--primary); opacity: 0.8; margin-bottom: 1rem;
}
.testimonial-quote {
  color: var(--text-light); font-size: 1.05rem; font-style: italic; line-height: 1.8;
}
.testimonial-stars { color: #ffc107; font-size: 0.9rem; }
.testimonial-stars .star-off { color: rgba(255,255,255,0.15); }
.testimonial-avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--primary);
}
.testimonial-avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,0,0,0.12); color: var(--primary);
  font-weight: 700; font-size: 1.2rem;
}
.testimonial-name { color: var(--white); margin-bottom: 0; }
.testimonial-role { color: var(--text-muted); font-size: 0.85rem; }
.testimonial-indicators { position: static; margin-top: -1.5rem; }
.testimonial-indicators button {
  width: 9px !important; height: 9px !important; border-radius: 50%;
  background-color: rgba(255,0,0,0.3) !important; border: none !important;
}
.testimonial-indicators button.active { background-color: var(--primary) !important; }

/* ===== BLOG CARDS ===== */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden; height: 100%;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,0,0,0.45);
  box-shadow: 0 12px 35px rgba(255,0,0,0.12);
}
.blog-card-img-wrap { display: block; overflow: hidden; aspect-ratio: 16/9; }
.blog-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img { transform: scale(1.07); }
.blog-card-body { padding: 1.4rem; }
.blog-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center;
  color: var(--text-muted); font-size: 0.78rem; margin-bottom: 0.7rem;
}
.blog-card-cat {
  background: rgba(255,0,0,0.12); color: var(--primary);
  padding: 0.15rem 0.6rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
}
.blog-card-title a {
  color: var(--white); font-weight: 600; line-height: 1.4;
  transition: color var(--transition);
}
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { color: var(--text-muted); font-size: 0.88rem; margin: 0.6rem 0 0.8rem; }

/* Blog detail */
.blog-detail-img {
  width: 100%; max-height: 450px; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--border);
}
.blog-detail-content { color: var(--text-light); font-size: 1.02rem; line-height: 1.9; }
.blog-detail-content h2, .blog-detail-content h3, .blog-detail-content h4 {
  color: var(--white); margin: 1.5rem 0 0.8rem;
}
.blog-detail-content a { color: var(--primary); }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.blog-tag {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-light); padding: 0.3rem 0.9rem;
  border-radius: 20px; font-size: 0.8rem;
}

/* ===== PAGINATION ===== */
.ctt-pagination .page-link {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-light); margin: 0 4px; border-radius: 8px !important;
  min-width: 40px; text-align: center;
}
.ctt-pagination .page-item.active .page-link,
.ctt-pagination .page-link:hover {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ===== FAQ ACCORDION ===== */
.ctt-accordion-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  margin-bottom: 0.9rem; overflow: hidden;
}
.ctt-accordion-btn {
  background: var(--bg-card) !important;
  color: var(--white) !important;
  font-weight: 600; box-shadow: none !important;
  padding: 1.1rem 1.3rem;
}
.ctt-accordion-btn:not(.collapsed) { color: var(--primary) !important; }
.ctt-accordion-btn::after {
  filter: invert(1) grayscale(1);
}
.ctt-accordion-btn:not(.collapsed)::after {
  filter: invert(22%) sepia(96%) saturate(7000%) hue-rotate(355deg);
}
.ctt-accordion-body {
  color: var(--text-muted); background: var(--bg-card);
  padding: 0 1.3rem 1.2rem; line-height: 1.8;
}

/* ===== CAREERS ===== */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem; height: 100%;
  transition: transform var(--transition), border-color var(--transition);
}
.job-card:hover { transform: translateY(-5px); border-color: rgba(255,0,0,0.45); }
.job-title { color: var(--white); font-size: 1.2rem; margin-bottom: 0.3rem; }
.job-dept { color: var(--text-muted); font-size: 0.85rem; }
.job-type-badge {
  background: rgba(255,0,0,0.12); color: var(--primary);
  padding: 0.3rem 0.9rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  white-space: nowrap;
}
.job-desc { color: var(--text-muted); font-size: 0.92rem; }
.job-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  color: var(--text-light); font-size: 0.83rem;
}

/* ===== TEAM ===== */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem 1.2rem; height: 100%;
  transition: transform var(--transition), border-color var(--transition);
}
.team-card:hover { transform: translateY(-5px); border-color: rgba(255,0,0,0.45); }
.team-avatar {
  width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--primary);
}
.team-avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,0,0,0.12); color: var(--primary);
  font-weight: 700; font-size: 1.6rem;
}
.team-name { color: var(--white); margin-bottom: 0; }
.team-role { color: var(--primary); font-size: 0.85rem; font-weight: 500; }
.team-bio { color: var(--text-muted); font-size: 0.85rem; }

/* ===== NEWSLETTER (footer) ===== */
.newsletter-input-group {
  display: flex; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; background: var(--bg-card);
}
.newsletter-input {
  flex: 1; min-width: 0; border: none; background: transparent;
  color: var(--white); padding: 0.55rem 0.8rem; font-size: 0.85rem;
  outline: none;
}
.newsletter-input::placeholder { color: var(--text-muted); }
.newsletter-btn {
  background: var(--primary); color: #fff; border: none;
  padding: 0 0.9rem; cursor: pointer;
  transition: background var(--transition);
}
.newsletter-btn:hover { background: var(--accent); }
.newsletter-btn:disabled { opacity: 0.6; cursor: wait; }
.newsletter-feedback { display: block; margin-top: 0.4rem; font-size: 0.78rem; }

/* ===== HONEYPOT (anti-spam) ===== */
.ctt-hp-field {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* ===== ERROR PAGES ===== */
.error-page { min-height: 65vh; display: flex; align-items: center; }
.error-code {
  font-size: clamp(6rem, 18vw, 11rem); font-weight: 900;
  color: var(--white); line-height: 1;
  text-shadow: 0 0 60px rgba(255,0,0,0.35);
}
