/* ==========================================================================
   RAHMATICS SOLUTIONS - CORE DESIGN SYSTEM & STYLESHEET
   Tagline: "Building Digital Solutions That Scale"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* --- CSS Variables & Color Tokens --- */
:root {
  /* Primary Brand Palette */
  --color-deep-black: #050505;
  --color-dark-navy: #07111A;
  --color-brand-teal: #0F6E94;
  --color-primary-blue: #087BB5;
  --color-bright-cyan: #00AEEF;
  --color-soft-light-blue: #5DD7FF;
  --color-white: #FFFFFF;
  --color-secondary-gray: #94A3B8;
  --color-dark-gray: #111827;
  
  /* Additional Functional Tints & Surfaces */
  --bg-primary: #050505;
  --bg-surface: #07111A;
  --bg-surface-elevated: #0d1a27;
  --bg-card: rgba(11, 23, 37, 0.7);
  --bg-card-hover: rgba(15, 30, 48, 0.85);
  --border-glass: rgba(93, 215, 255, 0.15);
  --border-glass-active: rgba(0, 174, 239, 0.4);
  --border-card: rgba(255, 255, 255, 0.08);

  /* Gradients */
  --gradient-brand-primary: linear-gradient(135deg, #00AEEF 0%, #087BB5 50%, #0F6E94 100%);
  --gradient-cyan-glow: linear-gradient(135deg, #5DD7FF 0%, #00AEEF 50%, #087BB5 100%);
  --gradient-dark-card: linear-gradient(180deg, rgba(15, 35, 54, 0.6) 0%, rgba(7, 17, 26, 0.9) 100%);
  --gradient-surface: linear-gradient(180deg, #07111A 0%, #050505 100%);
  --gradient-glow-orb: radial-gradient(circle, rgba(0, 174, 239, 0.22) 0%, rgba(15, 110, 148, 0.08) 50%, transparent 70%);

  /* Shadows & Neon Glows */
  --glow-cyan-sm: 0 0 15px rgba(0, 174, 239, 0.35);
  --glow-cyan-md: 0 0 30px rgba(0, 174, 239, 0.45);
  --glow-cyan-lg: 0 0 60px rgba(93, 215, 255, 0.25);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Typography */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout Spacing & Sizing */
  --container-max-width: 1280px;
  --header-height: 84px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background-color: var(--color-deep-black);
  color: var(--color-white);
  font-family: var(--font-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(15, 110, 148, 0.15), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(0, 174, 239, 0.12), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

/* Selection */
::selection {
  background-color: var(--color-bright-cyan);
  color: var(--color-deep-black);
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--color-secondary-gray);
  font-size: 1.05rem;
  font-weight: 400;
}

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

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* --- Container & Grid System --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-sm {
  max-width: 900px;
}

.container-lg {
  max-width: 1400px;
}

.section {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
  position: relative;
  z-index: 1;
}

.section-dark {
  background-color: rgba(7, 17, 26, 0.6);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

/* --- Global Section Headers --- */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-subtitle {
  font-size: 1.15rem;
  margin-top: 1.2rem;
  color: var(--color-secondary-gray);
}

/* --- Badge Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: rgba(15, 110, 148, 0.2);
  border: 1px solid var(--border-glass-active);
  color: var(--color-bright-cyan);
  box-shadow: 0 0 15px rgba(0, 174, 239, 0.2);
  margin-bottom: 1.25rem;
}

.badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-bright-cyan);
  box-shadow: 0 0 8px var(--color-bright-cyan);
  animation: pulseDot 2s infinite ease-in-out;
}

/* --- Gradient & Highlight Texts --- */
.text-gradient {
  background: var(--gradient-cyan-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.text-gradient-alt {
  background: linear-gradient(135deg, #FFFFFF 0%, #5DD7FF 70%, #00AEEF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Buttons & CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand-primary);
  color: var(--color-white);
  border: 1px solid rgba(93, 215, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 174, 239, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 174, 239, 0.55), 0 0 15px rgba(93, 215, 255, 0.4);
  border-color: var(--color-soft-light-blue);
  color: #fff;
}

.btn-secondary {
  background: rgba(15, 30, 48, 0.6);
  color: var(--color-white);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(15, 110, 148, 0.35);
  border-color: var(--color-bright-cyan);
  color: var(--color-soft-light-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 174, 239, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-bright-cyan);
  border: 1px solid var(--border-glass-active);
}

.btn-outline:hover {
  background: rgba(0, 174, 239, 0.12);
  color: var(--color-white);
  border-color: var(--color-soft-light-blue);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: #050505;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #2ee672;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  color: #050505;
}

.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1.15rem 2.4rem;
  font-size: 1.05rem;
}

.btn-icon-right svg {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon-right svg {
  transform: translateX(4px);
}

/* --- Sticky Global Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-smooth);
  background: rgba(5, 5, 5, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header.scrolled {
  background: rgba(7, 17, 26, 0.92);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  height: 74px;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 52px;
  z-index: 1001;
}

.brand-logo img,
.brand-logo svg {
  height: 46px;
  width: auto;
  max-width: 270px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: all var(--transition-fast);
}

.brand-logo:hover img,
.brand-logo:hover svg {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 14px rgba(0, 119, 182, 0.4));
}

/* Nav Menu Desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-secondary-gray);
  padding: 0.5rem 0.25rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-cyan-glow);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Dropdown Menu */
.nav-item-has-dropdown {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  width: 320px;
  background: rgba(7, 17, 26, 0.96);
  border: 1px solid var(--border-glass-active);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-card), var(--glow-cyan-sm);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-smooth);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item-has-dropdown:hover .nav-dropdown,
.nav-item-has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--color-secondary-gray);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.dropdown-link:hover {
  background: rgba(15, 110, 148, 0.25);
  color: var(--color-bright-cyan);
  transform: translateX(4px);
}

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 174, 239, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bright-cyan);
  flex-shrink: 0;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 1001;
  border-radius: 6px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 26px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Fullscreen Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5, 5, 5, 0.98);
  backdrop-filter: blur(25px);
  z-index: 999;
  padding: 6.5rem 2rem 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
}

.mobile-nav-link:hover {
  color: var(--color-bright-cyan);
}

.mobile-services-accordion {
  padding-left: 1rem;
  border-left: 2px solid var(--border-glass-active);
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-services-accordion a {
  font-size: 1rem;
  color: var(--color-secondary-gray);
}

.mobile-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-card);
}

/* --- Floating Quick Action Buttons --- */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 900;
}

.floating-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-fast);
  position: relative;
}

.floating-btn.whatsapp {
  background: #25D366;
  color: #050505;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.floating-btn.whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
}

.floating-btn.quick-estimate {
  background: var(--gradient-brand-primary);
  color: var(--color-white);
  border: 1px solid var(--border-glass-active);
  box-shadow: var(--glow-cyan-sm);
}

.floating-btn.quick-estimate:hover {
  transform: scale(1.1);
  box-shadow: var(--glow-cyan-md);
}

.floating-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: rgba(7, 17, 26, 0.95);
  color: var(--color-white);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.floating-btn:hover .floating-tooltip {
  opacity: 1;
}

/* --- Sticky Bottom Conversion Bar --- */
.sticky-conversion-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(7, 17, 26, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-glass-active);
  padding: 0.85rem 1.5rem;
  z-index: 890;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform var(--transition-smooth);
}

.sticky-conversion-bar.visible {
  transform: translateY(0);
}

.conversion-bar-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.conversion-bar-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-white);
}

.conversion-bar-close {
  cursor: pointer;
  color: var(--color-secondary-gray);
  padding: 0.25rem;
  border-radius: 4px;
}

.conversion-bar-close:hover {
  color: var(--color-white);
}

/* --- Global Footer --- */
.site-footer {
  background: #03080e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5rem 0 2rem 0;
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-tagline {
  color: var(--color-secondary-gray);
  font-size: 0.95rem;
  max-width: 340px;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-gray);
  transition: all var(--transition-fast);
}

.social-icon-btn:hover {
  background: rgba(0, 174, 239, 0.15);
  border-color: var(--color-bright-cyan);
  color: var(--color-bright-cyan);
  transform: translateY(-2px);
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 24px;
  height: 2px;
  background: var(--color-bright-cyan);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--color-secondary-gray);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-bright-cyan);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-secondary-gray);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.footer-contact-item svg {
  color: var(--color-bright-cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-secondary-gray);
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: var(--color-bright-cyan);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .nav-menu,
  .header-actions .btn-primary {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 72px;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .floating-actions {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .conversion-bar-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 2.15rem;
    line-height: 1.18;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.85rem;
  }
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }
  .brand-logo img,
  .brand-logo svg {
    height: 38px;
    max-width: 210px;
  }
  .container {
    padding: 0 1.25rem;
  }
}
