/* ===== VARIABLES ===== */
:root {
  --primary: #0a3d62;
  --secondary: #ffb400;
  --accent: #1e3799;
  --success: #27ae60;
  --warning: #e67e22;
  --danger: #e74c3c;
  --light: #f8f9fa;
  --dark: #2c3e50;
  --text: #555555;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-hover: 0 15px 35px rgba(0,0,0,0.2);
  
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', 'Vazir', 'Roboto', Tahoma, sans-serif;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  color: var(--dark);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.7;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ===== LAYOUT & CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-fluid {
  width: 100%;
  padding: 0 2rem;
}

/* ===== HEADER STYLES ===== */
header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

header.scrolled {
  background: rgba(10, 61, 98, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo a {
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== NAVIGATION ===== */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav ul li a {
  color: var(--white);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--secondary);
}

/* Mobile Menu Toggle */
.menu-toggle,
.menu-close {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
  background: none;
  border: none;
}

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1;
  box-shadow: var(--shadow);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.7s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

/* Button Sizes */
.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 60px;
}

.btn-small {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #ffa000);
  color: var(--dark);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #ffa000, var(--secondary));
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #2ecc71);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #e67e22);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c0392b);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Special Button Styles */
.btn-magnetic {
  position: relative;
  overflow: hidden;
}

.btn-liquid {
  background: linear-gradient(45deg, #667eea, #764ba2);
  border: none;
  color: white;
}

.btn-neon {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  box-shadow: 
    0 0 10px var(--secondary),
    inset 0 0 10px var(--secondary);
  text-shadow: 0 0 5px var(--secondary);
}

.btn-neon:hover {
  background: var(--secondary);
  color: var(--dark);
  box-shadow: 
    0 0 20px var(--secondary),
    0 0 40px var(--secondary),
    inset 0 0 20px var(--secondary);
}

.btn-gradient-rainbow {
  background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #FF6B6B);
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
  color: var(--white);
  font-weight: 700;
}

.btn-cyber {
  background: transparent;
  border: 2px solid #00f3ff;
  color: #00f3ff;
  text-shadow: 0 0 10px #00f3ff;
  box-shadow: 
    0 0 10px #00f3ff,
    inset 0 0 10px #00f3ff;
}

.btn-cyber:hover {
  background: #00f3ff;
  color: #000;
  box-shadow: 
    0 0 20px #00f3ff,
    0 0 40px #00f3ff;
}

.btn-pulse {
  animation: pulse 2s infinite;
}

/* ===== MODERN CARD STYLES ===== */
.modern-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.03),
    0 10px 15px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===== SECTIONS ===== */
section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 3rem;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== BACKGROUND STYLES ===== */
.bg-light {
  background-color: var(--light);
}

.bg-white {
  background-color: var(--white);
}

.bg-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
}

.bg-secondary {
  background: linear-gradient(135deg, var(--secondary), #ffa000);
  color: var(--dark);
}

.bg-pattern-grid {
  background-image: 
    linear-gradient(rgba(10, 61, 98, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 61, 98, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-animated-gradient {
  background: linear-gradient(-45deg, var(--primary), var(--accent), var(--secondary), #1a5276);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: var(--white);
}

.bg-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== SLIDER STYLES ===== */
.slider {
  margin-top: 80px;
  position: relative;
  overflow: hidden;
  height: 600px;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.1);
  transition: var(--transition-slow);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide-text {
  position: absolute;
  bottom: 5rem;
  right: 5rem;
  color: var(--white);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  max-width: 600px;
  border-left: 5px solid var(--secondary);
}

.slide-text h1,
.slide-text h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.slide-text p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 0;
}

.slider-dots {
  position: absolute;
  bottom: 2rem;
  right: 50%;
  transform: translateX(50%);
  display: flex;
  gap: 1rem;
}

.slider-dots span {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.slider-dots span.active {
  background: var(--secondary);
  transform: scale(1.2);
}

/* ===== GRID LAYOUTS ===== */
.services-grid,
.projects-grid,
.features-grid,
.testimonial-grid,
.articles-grid,
.stats-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.testimonial-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.articles-grid {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== SERVICE STYLES ===== */
.service {
  text-align: center;
  position: relative;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
  transition: var(--transition);
}

.service:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.service p {
  color: var(--text);
  line-height: 1.6;
}

/* ===== PROJECT STYLES ===== */
.project {
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.project img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.project:hover img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project h3,
.project h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project p {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.project-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--dark);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.project-stats span {
  background: var(--gray-100);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--text);
}

/* ===== FEATURE STYLES ===== */
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text);
  line-height: 1.6;
}

/* ===== TESTIMONIAL STYLES ===== */
.testimonial-card {
  padding: 2rem;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  color: var(--secondary);
  position: absolute;
  top: 1rem;
  right: 2rem;
  opacity: 0.3;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: bold;
  flex-shrink: 0;
}

.author-info h4 {
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.author-info p {
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0;
  opacity: 0.8;
}

/* ===== STATS STYLES ===== */
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

/* ===== ARTICLE STYLES ===== */
.article {
  padding: 2rem;
}

.article-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--dark);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.article h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  line-height: 1.4;
}

.article p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-300);
}

.reading-time {
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0.7;
}

.read-more {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  width: 100%;
  text-decoration: none;
}

.read-more:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== FLOATING ACTION BUTTONS ===== */
.btn-fab {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), #ffa000);
  color: var(--dark);
  box-shadow: 0 8px 25px rgba(255, 180, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.btn-fab:hover {
  transform: scale(1.1);
}

.btn-fab-whatsapp {
  left: 8rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}

.btn-fab-email {
  left: 14rem;
  background: linear-gradient(135deg, #EA4335, #D14836);
  color: white;
}

.btn-fab-location {
  left: 20rem;
  background: linear-gradient(135deg, #4285F4, #346AC3);
  color: white;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  position: fixed;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.quick-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.quick-btn:hover {
  transform: scale(1.1) translateX(-5px);
}

.quick-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.quick-btn:hover::after {
  opacity: 1;
}

.quick-btn.estimate { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.quick-btn.design { background: linear-gradient(135deg, #2196F3, #1976D2); }
.quick-btn.consult { background: linear-gradient(135deg, #4CAF50, #388E3C); }

/* ===== FORM STYLES ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.form-message {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-top: 1rem;
  text-align: center;
}

.form-message.success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.form-message.error {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* ===== LIGHTBOX STYLES ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  text-align: center;
  backdrop-filter: blur(10px);
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  margin: 5% auto;
  border-radius: var(--border-radius);
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  transition: opacity 0.3s ease;
}

.lightbox .close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  font-weight: bold;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  background: rgba(0,0,0,0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightbox .close:hover {
  color: var(--secondary);
  background: rgba(0,0,0,0.7);
  transform: scale(1.1);
}

.lightbox .prev,
.lightbox .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 1rem;
  color: var(--white);
  font-weight: bold;
  font-size: 2rem;
  transition: var(--transition);
  user-select: none;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox .prev { right: 5%; }
.lightbox .next { left: 5%; }

.lightbox .prev:hover,
.lightbox .next:hover {
  color: var(--secondary);
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%) scale(1.1);
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
  position: relative;
}

.floating-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.floating-element:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

/* ===== SPECIAL SECTIONS ===== */
.cta-buttons {
  padding: 4rem 0;
}

.cta-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.cta-buttons-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
}

.cta-gradient h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-gradient p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
}

.footer-cta {
  text-align: center;
  padding: 3rem 0;
}

/* ===== FOOTER STYLES ===== */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 3rem 0 1rem;
  text-align: center;
}

footer a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

footer p {
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.8);
}

/* ===== ANIMATIONS ===== */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 992px) {
  html {
    font-size: 15px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .services-grid,
  .projects-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  /* Mobile Navigation */
  .menu-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  nav ul li {
    margin: 0;
    width: 100%;
  }
  
  nav ul li a {
    display: block;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.1);
  }
  
  .menu-close {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }
  
  /* Grid Layouts */
  .services-grid,
  .projects-grid,
  .features-grid,
  .testimonial-grid,
  .articles-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Slider */
  .slider {
    height: 400px;
    margin-top: 70px;
  }
  
  .slide-text {
    right: 1rem;
    left: 1rem;
    bottom: 2rem;
    padding: 1.5rem;
  }
  
  .slide-text h1,
  .slide-text h2 {
    font-size: 1.5rem;
  }
  
  /* Buttons */
  .cta-buttons-group {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons-group .btn {
    width: 100%;
    max-width: 300px;
  }
  
  /* Floating Buttons */
  .btn-fab,
  .btn-fab-whatsapp,
  .btn-fab-email,
  .btn-fab-location {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .btn-fab { left: 1rem; bottom: 1rem; }
  .btn-fab-whatsapp { left: 1rem; bottom: 6rem; }
  .btn-fab-email { left: 1rem; bottom: 11rem; }
  .btn-fab-location { left: 1rem; bottom: 16rem; }
  
  .quick-actions {
    display: none;
  }
  
  .floating-elements {
    display: none;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .modern-card {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-large {
    padding: 0.875rem 2rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .project-stats {
    gap: 0.5rem;
  }
  
  .project-stats span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
  
  .lightbox .prev { right: 2%; }
  .lightbox .next { left: 2%; }
  
  .lightbox .close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ===== LOADING OPTIMIZATION ===== */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

.image-loading {
  background: var(--gray-200);
  position: relative;
  overflow: hidden;
}

.image-loading::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ===== PRINT STYLES ===== */
@media print {
  .btn-fab,
  .btn-fab-whatsapp,
  .btn-fab-email,
  .btn-fab-location,
  .quick-actions,
  .menu-toggle,
  .menu-close {
    display: none !important;
  }
  
  .modern-card {
    box-shadow: none !important;
    border: 1px solid var(--gray-300) !important;
  }
  
  a {
    color: var(--primary) !important;
    text-decoration: underline !important;
  }
}