/* ===== Design System - Adv Rubic Advertising & Signage ===== */
:root {
  /* Premium Color Palette */
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --success: #10b981;
  --dark: #0f172a;
  --dark-secondary: #1e293b;
  --light: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #94a3b8; /* Improved contrast - was #64748b */
  --text-light: #cbd5e1;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-gold: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Logo & Brand */
.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--light);
  line-height: 1;
}

.slogan {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.logo-container:hover .brand-name {
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-container:hover .logo-img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Navigation & Dropdown */
.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.dropdown-item-wrapper {
  position: relative;
  padding-bottom: 20px;
  /* Bridge the gap between link and menu */
  margin-bottom: -20px;
  /* Compensate for layout */
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  /* Start slightly lower */
  width: 320px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  /* Faster transition */
  z-index: 1000;
  pointer-events: none;
  display: block;
  /* Ensure it exists */
}

.dropdown-item-wrapper:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  /* Move to final position */
  pointer-events: auto;
}

.dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-link .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.dropdown-link:hover .icon {
  background: var(--gradient-primary);
  color: white;
}

.dropdown-link .content {
  display: flex;
  flex-direction: column;
}

.dropdown-link .content strong {
  color: var(--light);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.dropdown-link .content span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  transition: var(--transition-base);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-cool);
  transition: var(--transition-base);
}

.nav-link:hover {
  color: var(--light);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: var(--light);
  background: rgba(79, 172, 254, 0.1);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-xs);
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light);
  border-radius: 3px;
  transition: var(--transition-base);
}

/* ===== Hero Section - Professional Layout */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #312e81 100%);
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="2" height="2" x="0" y="0" fill="rgba(255,255,255,0.03)"/></svg>');
  background-size: 50px 50px;
  animation: move-bg 20s linear infinite;
}

@keyframes move-bg {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(50px, 50px);
  }
}

.hero-content {
  max-width: 900px;
  text-align: center;
  z-index: 2;
  position: relative;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: white;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-content h1 span {
  background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.hero-content .highlight-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 1.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-buttons .btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.4s both;
}

.btn {
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-cool);
  color: white;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition-slow);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(79, 172, 254, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

/* ===== Section Styles ===== */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-dark {
  background: var(--dark-secondary);
}

.section-light {
  background: var(--dark);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Service Cards ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: var(--space-xl);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--light);
  font-weight: 700;
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: var(--transition-base);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition-base);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ===== Contact Section ===== */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: var(--space-2xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--light);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: var(--light);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: rgba(79, 172, 254, 0.8);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-control::placeholder {
  color: var(--text-secondary);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark-secondary);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: var(--light);
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-xs);
  transition: var(--transition-fast);
}

.footer-section a:hover {
  color: var(--light);
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    padding: var(--space-xl);
    transition: var(--transition-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .services-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }
}

/* ===== Utility Classes ===== */
.glow {
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.5);
  }

  50% {
    box-shadow: 0 0 40px rgba(79, 172, 254, 0.8);
  }
}

.fade-in {
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ===== Open Letter Section - Premium Design ===== */
.section-open-letter {
  padding: 8rem 0;
  background: url('https://www.transparenttextures.com/patterns/cubes.png'), linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.section-open-letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, #1e40af, #f59e0b, #1e40af);
  opacity: 0.8;
}

.letter-container {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  padding: 6rem;
  border-radius: 8px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  /* Subtle border */
  position: relative;
  font-family: 'Playfair Display', serif;
}

/* Watermark Effect */
.letter-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background-image: url('../img/logo ad.png');
  /* Assuming this path matches existing */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.letter-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.letter-header::after {
  content: "★";
  display: block;
  margin: 2rem auto 0;
  color: #f59e0b;
  font-size: 1.5rem;
}

.letter-title {
  font-size: 3rem;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.letter-content {
  font-size: 1.25rem;
  line-height: 2;
  color: #334155;
  text-align: justify;
  position: relative;
  z-index: 1;
}

.letter-content p {
  margin-bottom: 2rem;
}

.letter-content ul {
  margin: 3rem 0;
  padding: 2rem 3rem;
  background: rgba(248, 250, 252, 0.8);
  border-left: 4px solid #f59e0b;
  list-style-type: none;
}

.letter-content li {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.letter-content li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #f59e0b;
}

.letter-slogan {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 4rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-top: 1px solid rgba(30, 64, 175, 0.1);
  border-bottom: 1px solid rgba(30, 64, 175, 0.1);
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

.letter-footer {
  margin-top: 5rem;
  text-align: right;
  position: relative;
  z-index: 1;
}

.letter-sign {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: #1e40af;
  margin-top: 1rem;
  transform: rotate(-5deg);
  display: inline-block;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Great+Vibes&display=swap');

@media (max-width: 768px) {
  .section-open-letter {
    padding: 4rem 0;
  }

  .letter-container {
    padding: 2rem;
    margin: 0 1rem;
  }

  .letter-title {
    font-size: 2rem;
  }

  .letter-content {
    font-size: 1.1rem;
  }
}