/* ==========================
   Modern Web Design Stylesheet
   canadaprogramming.net
   ========================== */

/* === CSS Variables === */
:root {
  --primary-color: #468CFF;
  --primary-dark: #2563EB;
  --primary-light: #93C5FD;
  --secondary-color: #32C896;
  --accent-color: #FF8C46;
  --text-dark: #1E293B;
  --text-medium: #475569;
  --text-light: #64748B;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --border-radius: 12px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

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

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-medium);
  line-height: 1.7;
}

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* === Header === */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  color: var(--text-medium);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  pointer-events: none;
}

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

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: var(--transition);
  pointer-events: none;
}

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

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

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

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #E0E7FF 100%);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(70, 140, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

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

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.1;
}

.hero-text p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-medium);
}

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

.btn {
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.hero-image {
  position: relative;
}

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

/* === Features/Services Grid === */
.features-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card,
.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
  pointer-events: none;
}

.feature-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before,
.service-card:hover::before {
  transform: scaleX(1);
}

.feature-icon,
.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  margin-bottom: 1.5rem;
}

.feature-card h3,
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card p,
.service-card p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

.service-card .btn {
  width: 100%;
  justify-content: center;
}

/* === About Section === */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-features {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.about-feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
}

.about-feature-item::before {
  content: '✓';
  background: var(--secondary-color);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  pointer-events: none;
}

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

.team-member {
  text-align: center;
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.team-member-image {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg-light);
  box-shadow: var(--shadow-md);
}

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

.team-member h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.team-member p {
  color: var(--text-light);
  font-size: 0.95rem;
}

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

.blog-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.blog-card-image {
  width: 100%;
  height: 240px;
  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: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.blog-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.blog-card p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card .btn {
  align-self: flex-start;
}

/* === Article Page === */
.article-header {
  background: var(--bg-light);
  padding: 4rem 0 2rem;
  text-align: center;
}

.article-header h1 {
  max-width: 800px;
  margin: 0 auto 1rem;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.article-featured-image {
  margin: 3rem 0;
}

.article-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

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

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0 1.5rem 2rem;
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.75rem;
  color: var(--text-medium);
  line-height: 1.7;
}

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

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

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

.contact-info-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info-text h4 {
  margin-bottom: 0.5rem;
}

.contact-info-text p {
  color: var(--text-medium);
}

.contact-form {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: var(--border-radius);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: white;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

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

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #EF4444;
}

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

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

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

/* === Footer === */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

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

.footer-section h4 {
  color: white;
  margin-bottom: 1.5rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--primary-light);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-dark);
  color: white;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

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

.cookie-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

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

/* === Responsive Design === */
@media (max-width: 968px) {
  .header-content {
    padding: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    gap: 1rem;
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .hero-content,
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

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

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

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }

  .hero {
    padding: 3rem 0;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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

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

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

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

/* === Utility Classes === */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.bg-light { background: var(--bg-light); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }
