/* ===========================
   Code Adventure - Modern Tech Design
   =========================== */

/* === CSS Variables === */
:root {
  --primary-color: #0066ff;
  --secondary-color: #00d4ff;
  --dark-bg: #0a0e27;
  --darker-bg: #060812;
  --light-text: #ffffff;
  --gray-text: #a0aec0;
  --accent-gradient: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 102, 255, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--gray-text);
}

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

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

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

/* === Layout === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* === Header & Navigation === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background: rgba(6, 8, 18, 0.98);
  box-shadow: var(--shadow-lg);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-text);
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--gray-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--light-text);
  background: var(--card-bg);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--light-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--light-text);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--light-text);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(0, 102, 255, 0.15), transparent 50%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  background: var(--accent-gradient);
  opacity: 0.2;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: var(--transition);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  color: var(--light-text);
  margin-bottom: 1rem;
}

.card p {
  color: var(--gray-text);
  line-height: 1.8;
}

/* === Service Cards === */
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.service-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.service-card-content {
  padding: 2rem;
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-card p {
  margin-bottom: 1.5rem;
}

/* === Team Section === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-member {
  text-align: center;
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-8px);
}

.team-member-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.team-member img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.team-member-role {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* === Blog Section === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.blog-card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 2rem;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.blog-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.blog-card-excerpt {
  color: var(--gray-text);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.read-more {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.read-more:hover {
  gap: 1rem;
}

/* === Article Page === */
.article-header {
  padding-top: 120px;
  padding-bottom: 40px;
  text-align: center;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  color: var(--gray-text);
}

.article-featured-image {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 3rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-featured-image img {
  width: 100%;
  height: auto;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.9;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--light-text);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--light-text);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: var(--gray-text);
}

.article-content li {
  margin-bottom: 0.75rem;
}

/* === Contact Form === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-details h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-details p {
  color: var(--gray-text);
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--light-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--card-border);
  background: var(--darker-bg);
  color: var(--light-text);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
  font-family: inherit;
}

.form-error {
  color: #ff4444;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: none;
}

.form-error.show {
  display: block;
}

/* === Map === */
.map-container {
  margin-top: 4rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* === Footer === */
footer {
  background: var(--darker-bg);
  border-top: 1px solid var(--card-border);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

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

.footer-section h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: var(--gray-text);
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--gray-text);
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 8, 18, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  padding: 1.5rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cookie-text {
  flex: 1;
  color: var(--gray-text);
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* === Utility Classes === */
.text-center {
  text-align: center;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-4 {
  margin-bottom: 4rem;
}

/* === Responsive Design === */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image::before {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(6, 8, 18, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--card-border);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .card-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-buttons .btn {
    width: 100%;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container,
  .container-wide {
    padding: 0 15px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .card {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .article-content {
    font-size: 1rem;
  }
}
