/**
 * Homepage Utility Classes
 * Extracted from inline styles in templates/index.html
 * Uses semantic naming convention
 */

@import 'design-tokens.css';

/* =================================
   SPACING UTILITIES
   ================================= */

/* Margin Bottom */
.margin-bottom-xs { margin-bottom: 0.5rem; }
.margin-bottom-sm { margin-bottom: 1rem; }
.margin-bottom-md { margin-bottom: 1.5rem; }
.margin-bottom-lg { margin-bottom: 2rem; }

/* Margin Top */
.margin-top-sm { margin-top: 0.5rem; }
.margin-top-md { margin-top: 1rem; }
.margin-top-lg { margin-top: 2rem; }

/* Margin Auto */
.margin-x-auto { margin-left: auto; margin-right: auto; }
.margin-y-md { margin-top: 1rem; margin-bottom: 1rem; }
.margin-y-lg { margin-top: 2rem; margin-bottom: 2rem; }

/* Padding */
.padding-sm { padding: 1rem; }
.padding-md { padding: 1.5rem; }
.padding-lg { padding: 2rem; }
.padding-section { padding: 3rem 1.5rem; }

/* =================================
   TYPOGRAPHY UTILITIES
   ================================= */

/* Text Alignment */
.text-align-center { text-align: center; }
.text-align-left { text-align: left; }

/* Font Weight */
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

/* Font Style */
.font-style-italic { font-style: italic; }

/* Font Size */
.font-size-sm { font-size: 0.9rem; }
.font-size-md { font-size: 1rem; }
.font-size-lg { font-size: 1.1rem; }
.font-size-xl { font-size: 1.2rem; }
.font-size-2xl { font-size: 1.8rem; }
.font-size-3xl { font-size: 2rem; }

/* Text Decoration */
.text-decoration-none { text-decoration: none; }
.text-decoration-underline { text-decoration: underline; }

/* =================================
   COLOR UTILITIES
   ================================= */

/* Text Colors */
.text-color-gold { color: var(--gold-accent-text); } /* Accessible gold for text on light backgrounds */
.text-color-gold-bright { color: var(--gold-accent); } /* Bright gold for decorative use or dark backgrounds only */
.text-color-indigo { color: var(--indigo-deep); }
.text-color-muted { color: var(--text-muted); }
.text-color-light { color: var(--text-light); }
.text-color-white { color: white; }

/* Background Colors */
.background-surface { background: var(--bg-surface); }
.background-indigo { background: var(--indigo-deep); }
.background-white-10 { background: rgba(255, 255, 255, 0.1); }

/* =================================
   LAYOUT UTILITIES
   ================================= */

.display-inline-block { display: inline-block; }
.display-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { justify-content: center; align-items: center; }
.flex-start { align-items: flex-start; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

/* =================================
   BORDER UTILITIES
   ================================= */

.border-radius-sm { border-radius: 4px; }
.border-radius-md { border-radius: 6px; }
.border-radius-lg { border-radius: 8px; }
.border-radius-xl { border-radius: 12px; }

.border-left-purple { border-left: 3px solid var(--purple-primary, #7c3aed); }
.border-left-indigo { border-left: 3px solid var(--indigo-deep); }

/* =================================
   CONTAINER UTILITIES
   ================================= */

.content-container-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-container-medium {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================
   HOMEPAGE COMPONENT CLASSES
   ================================= */

/* --- Section Containers --- */
.homepage-section {
    background: var(--bg-surface);
    padding: 3rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.homepage-section-gradient {
    background: linear-gradient(135deg, var(--indigo-deep) 0%, var(--purple-deep, #5b21b6) 100%);
    padding: 4rem 1.5rem;
    margin: 3rem 0;
    border-radius: 12px;
    color: white;
    text-align: center;
}

/* --- Section Titles --- */
/* Indigo titles for light backgrounds - better aesthetics than gold */
.section-title-gold {
    color: var(--indigo-deep); /* Indigo on light backgrounds */
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title-gold-lg {
    color: var(--indigo-deep); /* Indigo on light backgrounds */
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* White titles for dark/purple backgrounds - better contrast than gold */
.section-title-white {
    color: var(--text-on-dark, #ffffff);
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title-white-lg {
    color: var(--text-on-dark, #ffffff);
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* --- Section Descriptions --- */
.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-light);
}

/* Override for descriptions on dark backgrounds */
.section-description.text-color-white,
.section-background-indigo .section-description,
.section-background-purple .section-description {
    color: rgba(255, 255, 255, 0.9);
}

/* --- Testimonials --- */
.testimonial-card {
    border-left: 3px solid var(--purple-primary, #7c3aed);
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: bold;
    color: var(--indigo-deep);
}

/* --- Education Cards --- */
.education-item-highlight {
    background-color: rgba(106, 75, 196, 0.1);
}

.education-card-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.education-icon {
    font-size: 1.8rem;
    margin-top: 0.2rem;
}

.education-heading {
    color: var(--indigo-deep); /* Indigo on white cards - high contrast */
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.education-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn-education {
    display: inline-block;
    padding: 0.625rem 1rem; /* 10px vertical for 44px touch target */
    min-height: 44px; /* WCAG 2.5.5 minimum touch target */
    background: var(--indigo-deep);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-education:hover {
    opacity: 0.9;
}

.btn-secondary-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--gray-600, #4b5563);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Links --- */
.link-gold {
    text-decoration: none;
    color: var(--gold-accent-text); /* Accessible amber/gold - works on both light and dark */
}

.link-gold:hover {
    text-decoration: underline;
}

/* --- Feature Lists --- */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list-item {
    margin-bottom: 10px;
}

.feature-list-check {
    color: var(--gold-accent);
    margin-right: 10px;
}

/* --- Premium Feature Columns --- */
.premium-features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.premium-feature-column {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

/* --- Mars Transit Banner --- */
.mars-transit-banner {
    display: block;
    background: linear-gradient(135deg, #3d3194 0%, #5b21b6 50%, #7c3aed 100%);
    color: white;
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    border-bottom: 2px solid var(--gold-accent);
    position: relative;
    overflow: hidden;
}

.mars-banner-content {
    position: relative;
    z-index: 1;
}

.mars-banner-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
}

.mars-banner-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.mars-banner-title {
    color: #fef3c7;
    font-weight: 500;
}

.mars-countdown-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.mars-banner-cta {
    color: #fbbf24;
    font-weight: 600;
    white-space: nowrap;
}

.mars-banner-subtext {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.mars-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* --- AI Welcome Banner --- */
.ai-welcome-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #4F46E5 100%);
    color: white;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #FFD700;
}

.ai-banner-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.ai-banner-link {
    color: #FFD700;
    margin-left: 10px;
    font-weight: bold;
    text-decoration: underline;
}

/* --- Newcomer Header --- */
.newcomer-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.newcomer-title {
    color: var(--indigo-deep);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.newcomer-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* --- Premium Teaser --- */
.premium-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* --- Content Gap / Educational Section Colors --- */
.section-background-indigo {
    background-color: var(--indigo-deep);
    color: white;
}

.section-background-purple {
    background-color: var(--purple-deep, #5b21b6);
    color: white;
}

/* =================================
   COMPARISON TABLE
   ================================= */

.comparison-section {
    padding: 64px 20px;
    background: white;
}

.comparison-container {
    max-width: 800px;
    margin: 0 auto;
}

.comparison-title {
    font-family: 'Lora', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-indigo-600, #4F46E5);
    text-align: center;
    margin-bottom: 12px;
}

.comparison-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
}

.comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    min-width: 480px;
}

.comparison-table thead tr {
    border-bottom: 2px solid var(--color-indigo-600, #4F46E5);
}

.comparison-table th {
    text-align: left;
    padding: 12px 10px;
    color: #9ca3af;
    font-weight: 400;
}

.comparison-table th:first-child,
.comparison-table th:last-child {
    color: var(--color-indigo-600, #4F46E5);
    font-weight: 600;
}

.comparison-table td {
    padding: 12px 10px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.comparison-table .col-feature {
    font-weight: 500;
}

.comparison-table .col-generic,
.comparison-table .col-western {
    color: #6b7280;
}

.comparison-table .col-dashaclub {
    color: #059669;
    font-weight: 500;
}

/* =================================
   FAQ SECTION
   ================================= */

.faq-section {
    padding: 64px 20px;
    background: #f8f7ff;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-title {
    font-family: 'Lora', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-indigo-600, #4F46E5);
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-item summary {
    font-weight: 600;
    color: #1e1b4b;
    cursor: pointer;
    font-size: 1.0625rem;
}

.faq-item p {
    margin-top: 12px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* =================================
   MARS BANNER RESPONSIVE + HOVER
   ================================= */

@media (max-width: 640px) {
    .mars-transit-banner {
        padding: 10px 12px !important;
    }
    .mars-transit-banner .mars-banner-flex {
        gap: 6px 10px;
        font-size: 0.9rem;
    }
    .mars-transit-banner .mars-banner-subtext {
        font-size: 0.75rem;
    }
}

.mars-transit-banner:hover {
    filter: brightness(1.1);
}

.mars-transit-banner:active {
    transform: scale(0.995);
}

/* =================================
   FRAGMENT URL SEO PROTECTION
   ================================= */

[data-noindex="true"] {
    display: none !important;
}

/* =================================
   SHARED RESOURCE/SERVICE CARDS
   (used on about, consultations, learn)
   ================================= */

.related-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(106, 75, 196, 0.05);
    border-radius: 12px;
}

.related-section-title {
    color: #6a4bc4;
    text-align: center;
    margin-bottom: 2rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    display: block;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(106, 75, 196, 0.2);
    transition: all 0.3s ease;
}

.resource-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.resource-card h4 {
    color: #6a4bc4;
    margin-bottom: 0.5rem;
}

.resource-card p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* =================================
   ABOUT PAGE
   ================================= */

.about-image-text-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 1.5em;
}

.about-image-text-layout img {
    width: 200px;
    height: auto;
    border-radius: var(--border-radius);
    margin-top: 5px;
    flex-shrink: 0;
}

.about-contact-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(106, 75, 196, 0.05);
    border-radius: 12px;
}

.about-contact-section h2 {
    color: var(--indigo-deep);
}

/* =================================
   CONSULTATIONS PAGE
   ================================= */

.consultations-image-text-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 1.5em;
}

.consultations-image-text-layout img {
    width: 250px;
    height: auto;
    border-radius: var(--border-radius);
    margin-top: 5px;
    flex-shrink: 0;
}

.consultations-coming-soon {
    background-color: var(--bg-surface);
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    margin-top: 2rem;
}

.consultations-coming-soon h2 {
    color: var(--indigo-deep);
}

.consultations-coming-soon .waitlist-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 1rem auto;
}

.waitlist-form-wrapper {
    margin: 2rem 0;
}

.waitlist-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 500px;
    width: 100%;
    justify-content: center;
    margin: 0 auto;
}

.waitlist-form input[type="email"] {
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    flex: 1;
    min-width: 200px;
}

.waitlist-form-note {
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.7;
}

.consultations-contact-divider {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(106, 75, 196, 0.2);
}

.consultations-contact-divider h3 {
    color: var(--indigo-deep);
    margin-bottom: 1rem;
}

.consultations-contact-divider a {
    color: var(--gold-accent);
}

.consultations-address {
    font-size: 0.9rem;
    color: #666;
}

.consultations-upsell {
    background: linear-gradient(135deg, rgba(106, 75, 196, 0.1) 0%, rgba(255, 183, 77, 0.1) 100%);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.consultations-upsell h3 {
    color: var(--gold-accent);
    margin-bottom: 1rem;
}

.consultations-upsell-list {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    list-style-type: none;
    padding: 0;
}

.consultations-upsell-list li span {
    font-weight: 600;
}

@media (max-width: 768px) {
    .about-image-text-layout,
    .consultations-image-text-layout {
        flex-direction: column;
        align-items: center;
    }

    .about-image-text-layout img,
    .consultations-image-text-layout img {
        width: 100%;
        max-width: 300px;
    }
}
