@import url('https://fonts.googleapis.com/css2?family=Lalezar&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Climate+Crisis&family=Lalezar&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --karate-navy: var(--navy);
    --karate-blue: #0047ab;
    --karate-gold: #FFD700;
    --karate-gray: #e4e7e9;
    --text-main: #333;
    --text-muted: #555;
    --heading-font: 'Lalezar', sans-serif;
}

a {
    text-decoration: none;
}

h3 {
    font-family: "Roboto", sans-serif;
}

p {
    font-family: "Roboto", sans-serif;
}

/* Base Container */
.about-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #fff;
}

/* Header Section */
.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h1 {
    font-family: var(--heading-font);
    color: var(--karate-navy);
    border-bottom: 4px solid var(--karate-gold);
    display: inline-block;
    padding-bottom: 5px;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.lead-text {
    font-size: 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Layout Grid */
.info-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.info-column {
    flex: 1;
    min-width: 300px;
}

.section-title {
    font-family: var(--heading-font);
    color: var(--karate-blue);
    font-size: 26px;
    border-left: 6px solid var(--karate-gold);
    padding-left: 15px;
    margin-bottom: 15px;
}

/* Instructor Section */
.instructor-section {
    margin-bottom: 60px;
    padding: 30px;
    background-color: var(--karate-gray);
    border-radius: 12px;
    border: 1px solid #eee;
}

.instructor-section-title {
    font-family: var(--heading-font);
    color: var(--karate-navy);
    text-align: center;
    text-transform: uppercase;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.instructor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.instructor-card {
    background: #fff;
    border: 1px solid #ddd;
    border-top: 5px solid var(--karate-navy);
    border-radius: 8px;
    padding: 20px;
    transition: border-top-color 0.3s ease;
    margin-bottom: 20px
}

.instructor-card:hover {
    border-top-color: var(--karate-gold);
}

.instructor-card h4 {
    font-family: var(--heading-font);
    color: var(--karate-navy);
    font-size: 1.5rem;
    margin: 0;
}

.instructor-role {
    font-size: 13px;
    font-weight: bold;
    color: var(--karate-blue);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.instructor-bio {
    font-size: 13px;
    margin-top: 5px;
}

.equipment-text {
    font-size: 13px;
    line-height: 1.5; /* This creates a predictable vertical rhythm */
    margin-top: 5px;

    /* Calculation: 13px (font) * 1.5 (line-height) * 5 (lines) = 97.5px */
    height: 98px;

    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limits text to 5 lines with ellipsis in modern browsers */
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}

/* Grading / Belt Section */
.belt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 15px;
}

.belt-item {
    padding: 12px;
    background: var(--karate-gray);
    font-size: 13px;
    border-left: 10px solid #ccc;
}

/* Awards Banner */
.awards-banner {
    background-color: var(--karate-navy);
    color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 8px solid var(--karate-gold);
}

.awards-banner h2 {
    font-family: var(--heading-font);
    color: var(--karate-gold);
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.award-badge-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.award-badge {
    border: 2px solid var(--karate-gold);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Resources Section */
.resource-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.resource-grid4 {
    display: grid;
    /* This creates 4 equal columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Tablet: 2 per row */
@media (max-width: 992px) {
    .resource-grid4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 per row */
@media (max-width: 576px) {
    .resource-grid4 {
        grid-template-columns: 1fr;
    }
}

.resource-card {
    width: 100%;
    background: var(--karate-gray);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: left;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    border-bottom: 3px solid transparent;
    transition: border 0.2s;
}

.resource-card:hover {
    border-bottom: 3px solid var(--karate-blue);
    transition: border 0.2s;
}

.resource-card p {
    margin: 0;
    line-height: 1.5;
    color: #444;
}

.btn-container {
    text-align: center;
    margin-top: 30px;
}

.btn-purchase {
    background-color: var(--karate-gold);
    color: #001f3f;;
    font-family: var(--heading-font);
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    display: inline-block;
    border: none;
    text-transform: uppercase;
    transition: transform 0.1s ease;
}

.btn-purchase:hover {
    background-color: #001f3f;
    color: #FFD700;
    border-color: #FFD700;
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}


.btn-purchase:active {
    transform: scale(0.98);
}

/* Enhanced Section Spacer */
.section-spacer {
    margin-top: 10px;
    margin-bottom: 0px;

    /* These two lines are the 'secret sauce' to stop margin collapse */
    display: flow-root;
    padding-top: 0.1px;

    width: 100%;
}

/* Reduce gap for the very first section so it's not too far down */
.about-header + .section-spacer {
    margin-top: 10px;
}

/* Ensure gold-bar headers align properly */
.section-title {
    margin-top: 0;
    border-left: 5px solid var(--karate-gold);
    padding-left: 15px;
    color: var(--karate-navy);
}

.btn-karate {
    display: inline-block;
    background-color: var(--karate-gold);
    color: var(--karate-navy) !important;
    padding: 18px 45px;
    font-family: var(--heading-font);
    font-size: 1.4rem;
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: 2px;
    border: 2px solid var(--karate-navy);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0px rgba(0, 10, 68, 0.2); /* Subtle depth */
    cursor: pointer;
}

.btn-karate:hover {
    background-color: var(--karate-navy);
    color: var(--karate-gold) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-karate:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Container to ensure centering and spacing */
.btn-container {
    padding: 40px 0;
    text-align: center;
}


/* The Spinner Animation */
.htmx-indicator {
    display: none; /* Hidden by default */
}

.htmx-request .htmx-indicator {
    display: inline-block; /* Show when HTMX is working */
}

.htmx-request.btn-pay-init {
    display: none; /* Hide the button text while loading */
}

.spinner-karate {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid rgba(184, 134, 11, 0.3); /* Faint gold */
    border-radius: 50%;
    border-top-color: var(--karate-gold); /* Solid gold top */
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dojo Code Specific Styles */
.dojo-code-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.kanji-block {
    margin-bottom: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--karate-gold, #FFD700);
}

.kanji-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--karate-navy, #10253f);
    display: block;
}

.translation-text {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
    display: block;
}

.explanation-text {
    font-size: 1.1rem;
    line-height: 1.6;
}


/* dojo code */
.etiquette-section {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-top: 50px;
}

.etiquette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.bowing-box {
    border: 2px solid var(--karate-navy, #10253f);
    padding: 25px;
    margin-top: 40px;
    border-radius: 8px;
}

.section-title {
    color: var(--karate-navy, #10253f);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e1e1;
    padding-bottom: 10px;
}


/* Container for the filter to give it space */
.filter-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-left: 5px solid var(--karate-gold); /* Brand accent */
}

/* Styled Dropdown */
.filter-select {
    appearance: none; /* Removes default browser arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23051626' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;

    background-color: #fff;
    color: var(--karate-navy);
    font-weight: 700;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--karate-navy);
    border-radius: 6px;
    cursor: pointer;
    min-width: 250px;
    transition: all 0.2s ease;
    outline: none;
}

.filter-select:hover {
    border-color: var(--karate-gold);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

.filter-select:focus {
    border-color: var(--karate-gold);
    background-color: #fffdf0; /* Subtle gold tint on focus */
}

/* Label styling */
.filter-label {
    text-transform: uppercase;
    font-family: var(--heading-font);
    letter-spacing: 1px;
    color: var(--karate-navy);
    font-size: 0.9rem;
}

.stripe-button {
        background-color: #635bff; /* Official Stripe 'Blurple' */
        color: #ffffff;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 16px;
        font-weight: 600;
        padding: 12px 24px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
        transition: all 0.15s ease;
    }

    .stripe-button:hover {
        background-color: #7a73ff;
        transform: translateY(-1px);
        box-shadow: 0 7px 14px rgba(50, 50, 93, 0.3), 0 3px 6px rgba(0, 0, 0, 0.08);
    }

    .stripe-logo {
        height: 20px;
        margin-right: 10px;
    }

    .nav-link-custom {
    text-decoration: none;
    color: #000a14;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
    display: block;
    padding: 8px 0;
}

.nav-link-custom:hover {
    color: var(--karate-gold);
}

/* Navigation Links on Navy Background */
.nav-link-custom.header-link {
    color: #ffffff !important;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link-custom.header-link:hover {
    color: var(--karate-gold) !important;
}

/* Ensure the navbar border doesn't clash */
.navbar.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-member-account {
    background: #FFD700;
    color: #000a14;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    display: inline-block;
    width: auto;
    text-align: center;
}

/* On mobile, make the button full width and add spacing */
@media (max-width: 991px) {
    .btn-member-account {
        display: block;
        margin-top: 10px;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    /* Scale down the Hero text so it doesn't wrap awkwardly */
    .hero-title {
        font-size: 26px;
        padding: 0 10px;
    }

    .hero-banner {
        padding: 60px 20px;
    }

    /* Make the CTA box full-width on mobile */
    .cta-box {
        display: block;
        padding: 20px 15px;
    }

    .book-btn {
        font-size: 1rem;
        padding: 12px 25px;
        width: 100%; /* Full width button for easier thumb-tapping */
    }

    /* Adjust the Grid */
    .feature-grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
        padding: 30px 15px;
        gap: 15px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    /* Reduce image size slightly for mobile height */
    .feature-card-img {
        width: 80px;
        height: 80px;
    }

    /* Remove the translation on hover for mobile (touching scrolls instead) */
    .feature-card:hover {
        transform: none;
    }
}

/* Specific fix for very small screens (iPhone SE etc.) */
@media (max-width: 380px) {
    .hero-title {
        font-size: 22px;
    }
}

/* Login Container Styling */
.login-card-wrapper {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--karate-gray);
}

/* Custom link styling to match your Navy/Gold theme */
.forgot-password-link {
    font-size: 13px;
    color: var(--karate-navy);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--karate-gold);
}

.contact-support-link {
    color: var(--karate-navy);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--karate-gold);
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .login-card-wrapper {
        padding: 25px 20px;
        box-shadow: none;
        border: none;
    }
}

.receipt-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f6f9fc; /* Light Stripe grey */
    color: #6772e5; /* Stripe Blurple text */
    border: 1px solid #dce2e9;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.receipt-button:hover {
    background-color: #eef2f7;
    border-color: #c0cad5;
}

.validation_special {
    position: absolute;
    left: -5000px; /* Moves the field way off the screen */
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;   /* Extra layer of invisibility */
}

.book-btn {
    display: inline-block;
    background-color: #FFD700; /* Gold/Yellow from your palette */
    color: #001f3f;           /* Dark Navy/Black text for high contrast */
    padding: 15px 35px;
    margin: 10px;
    font-family: 'Arial Black', sans-serif; /* Bold, strong font */
    font-size: 1.2rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #001f3f;
    font-weight: 900;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Hover Effect - Flips the colours */
.book-btn:hover {
    background-color: #001f3f;
    color: #FFD700;
    border-color: #FFD700;
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Adjusted grid button for tighter layouts */
.btn-booking-small {
    background-color: var(--karate-gold);
    color: var(--karate-navy) !important;
    padding: 10px 5px;
    text-align: center;
    text-decoration: none !important;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    flex: 1;
}
.btn-booking-small:hover {
    background-color: var(--karate-navy);
    color: var(--karate-gold) !important;
    transform: translateY(-2px);
}

.consent-icon {
        color: #28a745; /* Success Green */
        font-size: 1.1rem;
        cursor: help;
    }
.no-consent-icon {
    color: #dc3545; /* Danger Red */
    font-size: 1.1rem;
    cursor: help;
}

.sub-nav .nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

.sub-nav .nav-link:hover {
    opacity: 1 !important;
    color: var(--karate-gold) !important;
}

/* Optional: Hide sub-nav on mobile if you want it inside the burger menu instead */
@media (max-width: 991px) {
    /* If you prefer to keep it simple, you can leave it visible,
       otherwise add 'd-none d-lg-block' to the sub-nav class */
}



  .badge-flex-container {
    display: flex;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 100px 20px;
    background-color: transparent;
  }

  /* Sharp Diamond Shape with Gold Bezel */
  .ucas-premium-badge {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #4b0082 0%, #000080 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transform: rotate(45deg);

    /* Solid Gold Outer Border */
    border: 5px solid #FFD700;

    /* Multiple Shadows for Depth */
    box-shadow:
      0 0 15px rgba(255, 215, 0, 0.4),
      15px 15px 40px rgba(0,0,0,0.4);

    overflow: hidden;
  }

  /* Internal Gold "Stitch" Line */
  .ucas-premium-badge::after {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1.5px solid rgba(255, 215, 0, 0.5);
    pointer-events: none;
  }

  /* Glassmorphism Sheen Effect */
  .ucas-premium-badge::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 100%);
    transform: rotate(-10deg);
    pointer-events: none;
  }

  .badge-content-wrapper {
    transform: rotate(-45deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150%;
  }

  /* Text Styling */
  .badge-header-text {
    font-family: 'Arial Black', Gadget, sans-serif;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  }

  .text-ucas {
    font-size: 36px;
    display: block;
    letter-spacing: 2px;
    color: #FFD700;
  }

  .text-statement {
    font-size: 16px;
    color: #ffffff;
    display: block;
    font-weight: bold;
    letter-spacing: 1px;
  }

  /* UPDATED: Just Karate Logo with #0A1F33 background */
  .just-karate-badge-logo {
    font-family: Arial, sans-serif;
    font-size: 21px;
    font-weight: bold;
    padding: 8px 18px;
    background: #0A1F33;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    text-transform: lowercase;
  }

  .jk-white { color: #ffffff; }
  .jk-gold { color: #FFD700; }
