/*
Theme Name: Apple Tech Centre Theme
Theme URI: https://appletechcentre.co.uk
Author: Apple Tech Centre
Author URI: https://appletechcentre.co.uk
Description: WordPress Theme for Apple Tech Centre — Independent Mac & iPad Repair Specialists in Queensway Market, Unit N10.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-background, custom-logo, custom-menu, featured-images, full-width-template, theme-options, block-patterns, repairbuddy-ready
Text Domain: apple-tech-centre
*/

/* Reset & Root Variables */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1d1d1f;
  --accent-color: #30d158;
  --font-family: Inter, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  color: #1e293b;
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff !important;
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-outline {
  border-color: var(--primary-color);
  color: var(--primary-color) !important;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #ffffff !important;
  text-decoration: none;
}

/* Header Styles */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
}

.site-logo, .site-logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color, #2563eb);
  text-decoration: none;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-navigation a {
  color: #475569;
  font-weight: 500;
}

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

/* Mobile Responsive Header Styles */
.menu-toggle {
  display: none;
}

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

  .main-navigation {
    display: none;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
  }

  .site-header.toggled .main-navigation {
    display: block !important;
  }

  .main-navigation ul {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .main-navigation a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
  }

  .main-navigation a:hover {
    background-color: #f1f5f9;
  }

  .header-actions {
    display: none;
  }

  .site-header.toggled .header-actions {
    display: block !important;
    width: 100%;
    margin-top: 0.75rem;
  }

  .site-header.toggled .header-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Section Common Styling */
.wp-section {
  padding: 3.5rem 0;
}

.wp-section.hero-section {
  padding: 4.5rem 0 3.5rem 0;
}

.max-w-5xl {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

.section-title,
h2.section-title {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.18 !important;
  margin-bottom: 0.875rem !important;
}

.hero-title,
h1.hero-title,
.section-title.hero-title {
  font-size: 3.75rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.1 !important;
  margin-bottom: 1.25rem !important;
}

@media (max-width: 768px) {
  .wp-section {
    padding: 2.5rem 0;
  }
  .wp-section.hero-section {
    padding: 3rem 0 2.5rem 0;
  }
  .section-title,
  h2.section-title {
    font-size: 1.75rem !important;
    line-height: 1.22 !important;
  }
  .hero-title,
  h1.hero-title,
  .section-title.hero-title {
    font-size: 2.85rem !important;
    line-height: 1.1 !important;
  }
}

.section-subtitle {
  font-size: 1.05rem;
  color: #64748b;
  margin-bottom: 2rem;
  max-width: 700px;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Features & Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* General Grid Utilities Fallback */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .md:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (min-width: 1024px) {
  .lg:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Card & Utility Fallbacks */
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-950 { background-color: #020617; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-white { background-color: #ffffff; }
.text-white { color: #ffffff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-900 { color: #0f172a; }
.text-blue-400 { color: #60a5fa; }
.text-blue-600 { color: #2563eb; }
.text-amber-500 { color: #f59e0b; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-slate-200 { border-color: #e2e8f0; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* Hover & 3D Lift Utilities */
.hover:-translate-y-1:hover { transform: translateY(-4px) !important; }
.hover:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important; }
.hover:border-slate-300:hover { border-color: #cbd5e1 !important; }
.hover:border-blue-300:hover { border-color: #93c5fd !important; }
.transition-all { transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important; }

/* Mobile Responsive Layout: 1 card after another on screens under 768px */
@media (max-width: 767px) {
  .grid,
  .google-reviews-embed .grid,
  .card-grid {
    grid-template-columns: 1fr !important;
  }
}

.card {
  background: #ffffff;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  border-color: #93c5fd;
  background-color: #ffffff;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0;
  text-align: center;
}

/* Mobile Hamburger Toggle */
.menu-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  border-radius: 0.5rem;
  z-index: 50;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background-color: #f1f5f9;
}

.menu-toggle .bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background-color: #0f172a;
  border-radius: 2px;
  transition: all 0.25s ease-in-out;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex !important;
  }
  .header-container {
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
  }
  .header-actions {
    display: none;
  }
  .site-header.toggled .header-actions {
    display: block !important;
    width: 100% !important;
    order: 4 !important;
    margin-top: 0.75rem !important;
    padding-top: 0.5rem !important;
  }
  .site-header.toggled .header-actions .btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.75rem 1rem !important;
  }
  .main-navigation {
    display: none;
    width: 100% !important;
    order: 3 !important;
    padding-top: 0.875rem !important;
    padding-bottom: 0.5rem !important;
    border-top: 1px solid #e2e8f0 !important;
    margin-top: 0.5rem !important;
  }
  .site-header.toggled .main-navigation {
    display: block !important;
  }
  .main-navigation .menu-primary-container,
  .main-navigation ul {
    width: 100% !important;
  }
  .main-navigation ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.375rem !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
  .main-navigation li {
    width: 100% !important;
    list-style: none !important;
  }
  .main-navigation a {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    background-color: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    transition: all 0.15s ease !important;
  }
  .main-navigation a:hover,
  .main-navigation a:focus {
    background-color: #eff6ff !important;
    color: #2563eb !important;
    border-color: #bfdbfe !important;
  }
  .site-header.toggled #site-menu-toggle .bar:nth-child(1),
  .site-header.toggled .menu-toggle .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .site-header.toggled #site-menu-toggle .bar:nth-child(2),
  .site-header.toggled .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }
  .site-header.toggled #site-menu-toggle .bar:nth-child(3),
  .site-header.toggled .menu-toggle .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}
