/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --color-primary: #1a56db;
  --color-secondary: #1e293b;
  --color-accent: #3b82f6;
  --color-bg: #f8fafc;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-white: #ffffff;
  --font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

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

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   Container
   ========================================================================== */

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

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

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

/* ==========================================================================
   Menu Toggle (Hamburger)
   ========================================================================== */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

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

/* ==========================================================================
   Main Navigation
   ========================================================================== */

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

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

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  min-height: 500px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: 3rem;
  max-width: 800px;
  margin: 0 auto 1rem;
  color: var(--color-white);
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  color: var(--color-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #1544b0;
  border-color: #1544b0;
  color: var(--color-white);
  transform: translateY(-1px);
}

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

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

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  padding: 80px 0;
}

.section-subtitle {
  color: var(--color-text-light);
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background-color: var(--color-white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.service-icon {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.service-card h3 {
  margin-bottom: 10px;
}

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

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats-section {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  opacity: 0.8;
  font-size: 1rem;
}

/* ==========================================================================
   Blog Preview / Blog Grid
   ========================================================================== */

.blog-preview {
  padding: 80px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  background-color: var(--color-white);
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.blog-card time {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.blog-card h3 {
  margin: 10px 0;
}

.blog-card h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card h3 a:hover {
  color: var(--color-primary);
}

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

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.blog-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  background-color: var(--color-secondary);
  color: var(--color-white);
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--color-white);
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 60px 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--color-white);
  opacity: 0.9;
  font-size: 1.1rem;
}

/* ==========================================================================
   Page Content
   ========================================================================== */

.page-content {
  padding: 60px 0;
}

.page-content article,
.page-content .prose {
  max-width: 100%;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Section CTA
   ========================================================================== */

.section-cta {
  text-align: center;
  margin-top: 40px;
}

/* ==========================================================================
   Team Section
   ========================================================================== */

.team-section {
  padding: 60px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.team-card {
  text-align: center;
  padding: 20px;
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
}

.team-card h3 {
  margin-top: 15px;
  margin-bottom: 5px;
}

.team-card .role {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.team-card .bio {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ==========================================================================
   Featured Image on Blog Post
   ========================================================================== */

.post-featured-image {
  margin-bottom: 40px;
}

.post-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
  padding: 60px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.contact-info h3 {
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 10px;
  color: var(--color-text-light);
}

.contact-info a {
  color: var(--color-primary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-family: var(--font-family);
}

.contact-form button:hover {
  background-color: #1544b0;
  border-color: #1544b0;
  transform: translateY(-1px);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.form-status-success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-status-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 60px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.site-footer h3 {
  color: var(--color-white);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-about p,
.footer-contact p {
  opacity: 0.8;
  font-size: 0.95rem;
  color: var(--color-white);
}

.footer-contact a {
  color: var(--color-white);
  opacity: 0.8;
}

.footer-contact a:hover {
  opacity: 1;
  color: var(--color-white);
}

.footer-links a,
.footer-social a {
  display: block;
  color: var(--color-white);
  opacity: 0.8;
  text-decoration: none;
  margin-bottom: 8px;
  transition: opacity 0.2s ease;
}

.footer-links a:hover,
.footer-social a:hover {
  opacity: 1;
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  opacity: 0.6;
  font-size: 0.9rem;
  color: var(--color-white);
}

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .hero {
    min-height: 400px;
    padding: 60px 20px;
  }

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

  .hero p {
    font-size: 1.1rem;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header h1 {
    font-size: 2rem;
  }
}

/* ==========================================================================
   Responsive — 480px
   ========================================================================== */

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

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

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

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

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

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

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}
