/* ==============================================
   CUSTOM STYLES
   Non-Tailwind project-specific styles
   ============================================== */

/* Font display override to prevent FOIT on Font Awesome icons.
   These redeclare the CDN @font-face rules (same family/style/weight/src),
   and being loaded after the CDN stylesheet they replace its
   font-display: block with swap. URLs must match the CDN version in core. */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2") format("woff2"),
       url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.ttf") format("truetype");
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2") format("woff2"),
       url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.ttf") format("truetype");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2") format("woff2"),
       url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.ttf") format("truetype");
}

body, html, * {
  font-family: Helvetica, Arial, Lucida, sans-serif !important;
}

.fas,
.fa-solid,
.far,
.fa-regular {
  font-family: "Font Awesome 6 Free" !important;
}

.fab,
.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
}

/* CSS VARIABLES */
:root {
  --color-black: #000000;
  --color-light-blue: #1C2947;
  --color-grey: #929292;
  --color-black: #000000;
  --color-yellow: #ff9600;
  --gold-button: #C6A75E;
  --gold-button-hover: #B79A55;
  --gold-text: #B79A55;
  --gold-button-text: #1B2430;
}

html {
  color-scheme: light;
}

.object-cover {
  object-fit: cover;
}

/* Journey section icons */
.journey-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Social media icons */
.social-icon-link {
  display: inline-flex;
  text-decoration: none;
}

.social-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  transition: color 0.2s ease;
}

.social-icon-link:hover .social-icon-circle {
  color: var(--gold-text);
}

/* Cookie banner */
#cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background-color: #020617;
  color: #f9fafb;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.35);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner-text {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
}

.cookie-banner-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.375rem;
  padding: 0.625rem 1rem;
  background-color: transparent;
  color: #f9fafb;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.cookie-banner-button:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.cookie-banner-button-primary {
  background-color: var(--gold-button);
  border-color: var(--gold-button);
  color: var(--gold-button-text);
}

.cookie-banner-button-primary:hover {
  background-color: var(--gold-button-hover);
  border-color: var(--gold-button-hover);
  color: var(--gold-button-text);
}

.cookie-banner-link {
  color: var(--gold-button);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cookie-banner-link:hover {
  color: #f9fafb;
}

/* Brand Colors */
.bg-black { background-color: var(--color-black); }
.bg-dark-blue { background-color: var(--color-black); }
.bg-dark-red { background-color: #8B0000; }
.bg-light-blue { background-color: var(--color-light-blue); }
.bg-grey { background-color: var(--color-grey); }
.bg-black { background-color: var(--color-black); }
.bg-black-modal { background-color: rgba(0, 0, 0, 0.7); }
.bg-yellow { background-color: var(--color-yellow); }

/* Max Width Utilities */
.max-w-6xl { max-width: 72rem; }
.max-w-4xl { max-width: 56rem; }

.text-black { color: var(--color-black) !important; }
.text-light-blue { color: var(--color-light-blue) !important; }
.text-grey { color: var(--color-grey) !important; }
.text-black { color: var(--color-black) !important; }
.text-yellow { color: var(--color-yellow) !important; font-weight: 100 !important; }
.text-gray-600 { color: #4b5563; }
.text-gray-900 { color: #111827; }
.text-golden { 
  background: linear-gradient(180deg, #e8c89a 0%, #c5a677 50%, #b8935f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-text);
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: bold;
  forced-color-adjust: none;
}
h1,h2,h3,h4,h5,h6 {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold !important;
}
/* Brand Text Styling */
.text-brand {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  line-height: 1.125rem;
  .text-golden {font-weight:normal;}
}

.text-brand-international {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 100;
  font-size: 1.35rem;
  line-height: 1.5rem;
}

.text-brand-taekwondo-council {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
}

@media (min-width: 640px) {
  .text-brand {
    font-size: 1.5rem;
    line-height: 1.625rem;
  }
  
  .text-brand-international {
    font-size: 2.35rem;
  }
}

.bg-black .text-gray-900 { color: #fff !important; }
/* Button Gradients */
.bg-yellow-700 {
  background: linear-gradient(180deg, #d4b17e 0%, #c5a370 50%, #b89560 100%) !important;
  color: var(--color-black) !important;
}

.hover\:bg-yellow-800:hover {
  background: linear-gradient(180deg, #c5a370 0%, #b89560 50%, #a88550 100%) !important;
  color: var(--color-black) !important;
}

/* Ensure h1 line-height override */
h1.text-4xl.md\:text-5xl.lg\:text-6xl.font-bold.text-gray-900.tracking-tight.font-normal.mb-16.leading-tight {
  line-height: 1.25 !important;
}

/* Blockquote styling */
blockquote {
  display: block;
  margin-block-start: 3em;
  margin-block-end: 3em;
  margin-inline-start: 40px;
  border-left: 5px solid #ccc;
  padding-left: 40px;
}

.m-l-auto {
  margin-left: auto !important;
}

/* Navigation Specific Styles */
.nav-scrolling {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  background-color: #000000;
  transition: background-color 0.3s ease;
}

.nav-scrolling.atTop {
  background-color: transparent;
}

/* Hamburger Menu */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  cursor: pointer;
  padding: 4px;
}

.hamburger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu:hover span {
  background-color: #c5a677;
}

.hamburger-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 13rem;
  background-color: #ffffff;
  color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  overflow-y: auto;
  max-height: calc(100dvh - 80px);
}

.hamburger-dropdown.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

.hamburger-dropdown a {
  display: block;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.hamburger-dropdown a:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.hamburger-dropdown a:hover {
  background-color: #1e293b;
  color: #ffffff;
}

.hamburger-dropdown a:last-child {
  border-bottom: none;
  border-radius: 0 0 0.5rem 0.5rem;
}

.hamburger-dropdown hr {
  margin: 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.hamburger-dropdown .hamburger-dropdown-trigger {
  display: block;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hamburger-dropdown .hamburger-dropdown-trigger:hover {
  background-color: #1e293b;
  color: #ffffff;
}

.relative {
  position: relative;
}

/* Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Code blocks */
.code-block {
  background-color: #1e293b;
  color: #cbd5e1;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
}

code {
  background-color: #e5e7eb;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background-color: #f9fafb;
  font-weight: 600;
}

/* Transitions & Animations */
.animate-fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Button focus states */
button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Form elements */
input:focus, textarea:focus, select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 0;
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  nav {
    display: none;
  }
  
  .no-print {
    display: none;
  }
}

.text-mobile-hero {
  font-size: 3rem !important;
  line-height: 3rem !important;
}
.bg-white { background-color: #ffffff; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  background-color: white;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  transition: border-color 0.2s ease;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%208%208'%3E%3Cpath%20fill='none'%20stroke='%23343a40'%20stroke-width='1.5'%20d='M1%202.5%204%205.5%207%202.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.65rem auto;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */

/* Desktop nav link style */
.desktop-nav-link {
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  display: inline-block;
}

.desktop-nav-link:hover {
  color: var(--gold-text);
}

/* Dropdown arrow indicator */
.desktop-nav-trigger::after {
  content: ' ▾';
  font-size: 0.75em;
  opacity: 0.8;
}

/* Dropdown wrapper — needs relative positioning */
.desktop-nav-item {
  position: relative;
  display: inline-block;
}

/* Dropdown panel */
.desktop-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  min-width: 200px;
  background-color: #ffffff;
  border-radius: 0.375rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  padding: 0.25rem 0;
}

.desktop-nav-item:hover .desktop-nav-dropdown,
.desktop-nav-item:focus-within .desktop-nav-dropdown {
  display: block;
}

.desktop-nav-dropdown a {
  display: block;
  padding: 0.625rem 1.125rem;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

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

.desktop-nav-dropdown a:hover {
  background-color: var(--color-black);
  color: #ffffff;
}

/* ============================================
   MOBILE NAV SUB-ITEMS (inside hamburger)
   ============================================ */

.mobile-nav-sub-item {
  padding-left: 2.25rem !important;
  font-size: 0.8125rem !important;
  background-color: #f9fafb;
  color: #374151 !important;
  border-bottom-color: #e5e7eb !important;
}

.mobile-nav-sub-item:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

/* ============================================
   HERO RIBBON — "First Lesson Free"
   ============================================ */

.hero-ribbon {
  position: absolute;
  top: 100px;
  right: -69px;
  background-color: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 56px 7px 180px;
  transform: rotate(45deg);
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
@media (min-width: 768px) {
  .hero-ribbon {
    top: 99px;
    right: -66px;
  }
}

/* School page buttons */
.school-btn {
  transition: background-color 0.2s ease, color 0.2s ease;
}
.school-btn:hover {
  color: var(--gold-text);
}
.school-cta-btn {
  transition: color 0.2s ease;
}
.school-cta-btn:hover {
  color: var(--gold-text);
}

/* Parallax union jack panel */
.parallax-unionjack {
  background-image: url('/public/images/unionjack-small.webp');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (min-width: 600px) {
  .parallax-unionjack {
    background-image: url('/public/images/unionjack.desktop.webp');
  }
}
@media (min-width: 1200px) {
  .parallax-unionjack {
    background-image: url('/public/images/unionjack-large.webp');
  }
}
.parallax-unionjack div {
  background-color: rgba(0,0,0,0.15);
  width:100%;
  height:inherit;
}

/* Product detail description (rendered from markdown) */
.product-description p {
  margin-bottom: 1rem;
}
.product-description ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.product-description li {
  margin-bottom: 0.5rem;
}
/* ============================================
   UTILITIES MISSING FROM CORE'S SITE CSS
   Core's tailwind.css is a fixed safelist build (core/tailwind.config.js), so Tailwind classes used by
   martialwear pages/scripts that it doesn't include are defined here with Tailwind's values.
   Used by the checkout, account pages and the My Orders list (public/account-page.js).
   ============================================ */

.min-h-screen { min-height: 100vh; }
.ml-auto { margin-left: auto; }
.italic { font-style: italic; }
.underline { text-decoration-line: underline; }
.no-underline { text-decoration-line: none; }
.list-disc { list-style-type: disc; }
.list-none { list-style-type: none; }
summary.list-none::-webkit-details-marker { display: none; }
.accent-yellow-700 { accent-color: #a16207; }

.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-t-2 { border-top-width: 2px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-red-200 { border-color: #fecaca; }
.border-green-200 { border-color: #bbf7d0; }
.border-yellow-700 { border-color: #a16207; }
.divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #e5e7eb; }
.divide-gray-300 > :not([hidden]) ~ :not([hidden]) { border-color: #d1d5db; }

.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-100 { background-color: #dcfce7; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-indigo-100 { background-color: #e0e7ff; }

.text-gray-800 { color: #1f2937; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-green-600 { color: #16a34a; }
.text-green-800 { color: #166534; }
.text-blue-800 { color: #1e40af; }
.text-indigo-800 { color: #3730a3; }
.text-yellow-700 { color: #a16207; }
.text-yellow-800 { color: #854d0e; }

.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-yellow-50:hover { background-color: #fefce8; }
.hover\:text-red-800:hover { color: #991b1b; }
.hover\:text-yellow-700:hover { color: #a16207; }
.hover\:text-yellow-800:hover { color: #854d0e; }
.focus\:border-yellow-700:focus { border-color: #a16207; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--mw-ring-color, #a16207); }
.focus\:ring-yellow-700:focus { --mw-ring-color: #a16207; }
.disabled\:opacity-60:disabled { opacity: 0.6; }

details[open] > summary .group-open\:rotate-180 { transform: rotate(180deg); }

@media (min-width: 640px) {
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .sm\:p-8 { padding: 2rem; }
}

@media (min-width: 1024px) {
  .lg\:sticky { position: sticky; }
  .lg\:top-32 { top: 8rem; }
}
