/* ==========================================================================
   Ascot Goldsmiths - RNIB Sight Loss, WCAG AAA & Mobile-Optimised Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* Default Theme Variables (Dark Mode - WCAG AAA Compliant) */
:root,
[data-theme="dark"] {
  --color-bg: #0b1329;
  --color-card-bg: #132036;
  --color-header-bg: #0f172a;
  --color-nav-bg: #0f172a;
  --color-navy: #0f172a;
  --color-navy-light: #1e293b;
  --color-gold: #fbbf24;
  --color-gold-light: #fef08a;
  --color-gold-dark: #f59e0b;
  --color-text-main: #ffffff;
  --color-text-muted: #cbd5e1;
  --color-border: #1e3a5f;
  --color-heading: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Light Theme Variables (RNIB & WCAG AAA Compliant for Sight Loss) */
[data-theme="light"] {
  --color-bg: #f8fafc;
  --color-card-bg: #ffffff;
  --color-header-bg: #ffffff;
  --color-nav-bg: #f1f5f9;
  --color-navy: #0f172a;
  --color-navy-light: #e2e8f0;
  --color-gold: #854d0e;
  --color-gold-light: #b45309;
  --color-gold-dark: #78350f;
  --color-text-main: #0f172a;
  --color-text-muted: #334155;
  --color-border: #cbd5e1;
  --color-heading: #0f172a;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--color-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-gold-light);
}

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

/* Top Accent Bar */
.top-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #0f172a 0%, var(--color-gold) 50%, #0f172a 100%);
}

/* Container */
.site-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Header Component */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-text-main);
  border-bottom: 3px solid var(--color-gold);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin-top: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: background-color 0.3s ease;
}

.header-banner-container {
  width: 100%;
  background: #0f172a url('../images/header-banner.png') center center no-repeat;
  background-size: contain;
  min-height: 180px;
  position: relative;
}

.header-overlay-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header-contact-details {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  color: #ffffff;
}

.header-contact-details a {
  color: var(--color-gold);
  text-decoration: none;
  font-weight: 700;
}

.header-contact-details a:hover {
  text-decoration: underline;
}

.header-address a {
  font-size: 0.9rem;
  color: #cbd5e1;
  text-decoration: none;
}

.header-address a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

/* Main Navigation Bar - Streamlined Single Row */
.site-nav {
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.nav-list {
  display: flex;
  list-style: none;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
}

.nav-item a {
  display: block;
  padding: 14px 10px;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.2px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
  background: rgba(255, 255, 255, 0.05);
}

/* Light Mode Overrides for Header & Navigation */
[data-theme="light"] .header-overlay-info {
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

[data-theme="light"] .header-contact-details {
  color: #0f172a;
}

[data-theme="light"] .header-contact-details a {
  color: var(--color-gold-dark);
}

[data-theme="light"] .header-address a {
  color: #334155;
}

[data-theme="light"] .nav-item a {
  color: #0f172a;
}

[data-theme="light"] .nav-item a:hover,
[data-theme="light"] .nav-item.active a {
  color: var(--color-gold-dark);
  border-bottom-color: var(--color-gold);
  background: rgba(133, 77, 14, 0.12);
}

/* Icon-Only Circular Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.theme-toggle-btn:hover {
  background: var(--color-gold);
  color: #0f172a;
  transform: scale(1.08);
}

[data-theme="light"] .theme-toggle-btn {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--color-gold);
  color: #0f172a;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: var(--color-gold);
  color: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

[data-theme="light"] .mobile-menu-btn {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

/* Main Layout Grid */
.main-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  margin-top: 30px;
}

/* Content Area */
.content-area {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: 35px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  margin-bottom: 16px;
  line-height: 1.2;
}

h1 {
  font-size: 2.3rem;
  border-bottom: 2px solid var(--color-gold);
  padding-bottom: 10px;
}

h2 {
  font-size: 1.8rem;
  margin-top: 24px;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 16px;
  color: var(--color-text-main);
  font-size: 1.05rem;
}

.lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text-main);
  margin-bottom: 20px;
}

/* Form Styles with Contrast Compliance */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-heading);
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px;
  background: var(--color-bg);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* Sidebar Widgets */
.sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-widget {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-gold);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-widget.gold-border {
  border-top-color: var(--color-gold);
}

.sidebar-widget h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: var(--color-heading);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

/* Opening Hours Table */
.opening-hours-table {
  width: 100%;
  border-collapse: collapse;
}

.opening-hours-table td {
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.95rem;
}

.opening-hours-table td.day {
  font-weight: 600;
  color: var(--color-heading);
}

.opening-hours-table td.time {
  text-align: right;
  color: var(--color-text-muted);
}

.opening-hours-table tr.closed td {
  color: #dc2626;
  font-weight: 600;
}

/* Credentials Badge */
.credentials-box {
  background: rgba(251, 191, 36, 0.12);
  border-left: 4px solid var(--color-gold);
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-main);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Adaptive Contrast-Safe Callout Utilities */
.info-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 25px 0;
  color: var(--color-text-main);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.info-box h2,
.info-box h3,
.info-box p {
  color: var(--color-heading);
}

.action-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  margin-top: 30px;
  color: var(--color-text-main);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.action-card h2,
.action-card h3 {
  color: var(--color-heading);
}

.proprietor-badge {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-top: 30px;
  color: var(--color-text-main);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.profile-card {
  width: 190px;
  text-align: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-main);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Cards & Grid Utilities (Full-Surface Clickable) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none !important;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.2s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold);
}

.service-card h3 {
  font-size: 1.25rem;
  color: var(--color-heading);
  margin-bottom: 10px;
  text-decoration: none !important;
}

.service-card p {
  color: var(--color-text-main);
  text-decoration: none !important;
  margin-bottom: 20px;
}

.service-card .btn {
  align-self: flex-start;
  pointer-events: none;
}

/* Buttons & Callouts */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-gold);
  color: #0f172a;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gold);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
}

.btn:hover {
  background: var(--color-gold-dark);
  color: #ffffff;
  border-color: var(--color-gold-dark);
}

.btn-gold {
  background: var(--color-gold);
  color: #0f172a;
  border-color: var(--color-gold);
}

.btn-gold:hover {
  background: var(--color-gold-dark);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
  border-color: var(--color-gold);
}

[data-theme="light"] .btn {
  background: var(--color-gold);
  color: #ffffff;
  border-color: var(--color-gold);
}

[data-theme="light"] .btn:hover {
  background: var(--color-gold-dark);
  color: #ffffff;
}

/* Mobile Floating Quick-Action Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-header-bg);
  border-top: 2px solid var(--color-gold);
  padding: 8px 12px;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  transition: background-color 0.3s ease;
}

[data-theme="light"] .mobile-bottom-bar {
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.12);
}

.mobile-bottom-bar-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  gap: 8px;
}

.mobile-bottom-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  text-decoration: none !important;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 48px;
}

[data-theme="light"] .mobile-bottom-btn {
  background: #f1f5f9;
  color: #0f172a;
}

.mobile-bottom-btn:hover,
.mobile-bottom-btn:active {
  background: var(--color-gold);
  color: #0f172a !important;
  border-color: var(--color-gold);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 50px;
  padding: 40px 0 20px;
  border-top: 3px solid var(--color-gold);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-column h4 {
  color: var(--color-gold);
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.footer-column p, .footer-column li {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

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

.footer-column a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .main-content-grid {
    grid-template-columns: 1fr;
  }
  
  .header-overlay-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .header-contact-details {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 960px) {
  .nav-list {
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }

  .mobile-bottom-bar {
    display: block;
  }

  .site-wrapper {
    padding: 0 14px 30px;
  }

  .content-area {
    padding: 24px 18px;
  }

  .header-banner-container {
    background-size: 260% auto;
    background-position: center center;
    min-height: 130px;
  }

  .mobile-menu-btn {
    display: block;
    margin: 10px 0;
  }
  
  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    overflow-x: visible;
  }
  
  .nav-list.is-open {
    display: flex;
  }
  
  .nav-item a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  [data-theme="light"] .nav-item a {
    border-bottom-color: rgba(15, 23, 42, 0.08);
  }
}

@media (max-width: 480px) {
  .header-banner-container {
    background-size: 310% auto;
    background-position: center center;
    min-height: 115px;
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.45rem;
  }
}
