/* Fossil Trail Template - Core Theme Styles */

/* ==========================================================================
   CSS Variables - Single Authoritative Source
   ========================================================================== */
:root {
    /* Typography */
    --font-primary: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: serif;
    
    /* Colors - Primary Palette */
    --color-primary: #000;
    --color-secondary: #666;
    --color-accent: #667eea;
    --color-accent-hover: #5a6fd8;
    
    /* Colors - Background */
    --color-background: #fff;
    --color-background-alt: #f8f8f8;
    --color-background-muted: #f5f5f5;
    
    /* Colors - Text */
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-text-light: #ffffff;
    --color-link: #555555;
    --color-link-hover: #000000;
    
    /* Colors - Borders */
    --color-border: #e5e5e5;
    --color-border-dark: #dee2e6;
    
    /* Spacing */
    --spacing-unit: 1rem;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Layout */
    --max-width: 1440px;
    --header-height: 120px;
    
    /* Borders */
    --border-radius: 4px;
    --border-radius-lg: 8px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Grid System */
.fs-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.fs-cell {
    padding: 0 1rem;
    width: 100%;
}

.fs-lg-6 {
    width: 50%;
}

.fs-lg-5 {
    width: 41.66667%;
}

.fs-lg-4 {
    width: 33.33333%;
}

.fs-lg-8 {
    width: 66.66667%;
}

.fs-xl-6 {
    width: 50%;
}

.fs-xl-5 {
    width: 41.66667%;
}

.fs-lg-push-1 {
    margin-left: 8.33333%;
}

.fs-xl-push-1 {
    margin-left: 8.33333%;
}

/* Typography */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.typography {
    width: 100%;
    max-width: none;
}

.typography p {
    margin-bottom: 1.5rem;
}

.typography .intro {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.typography a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.typography a:hover {
    color: var(--color-link-hover);
}

/* Navigation */
.sub_nav {
    margin: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.sub_nav_list {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub_nav_link {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.sub_nav_link:hover,
.sub_nav_link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Mobile Sidebar */
.mobile_sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-background);
    transition: right var(--transition-normal);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.mobile_sidebar.active {
    right: 0;
}

.mobile_sidebar_handle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

/* Search Takeover */
.search_takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-background);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.search_takeover.active {
    opacity: 1;
    visibility: visible;
}

.search_takeover_close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

.site_search {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.site_search_input {
    width: 100%;
    padding: 1rem;
    font-size: 1.5rem;
    border: none;
    border-bottom: 2px solid var(--color-border);
    background: none;
}

.site_search_input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}

/* Footer */
.footer {
    background: var(--color-background-alt);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer_ribbon {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer_heading {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer_contact {
    margin-bottom: 2rem;
}

.footer_address {
    margin-bottom: 1.5rem;
}

.footer_hours_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer_hours_row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {

    .fs-xl-6,
    .fs-xl-5 {
        width: 100%;
    }

    .fs-xl-push-1 {
        margin-left: 0;
    }
}

@media (max-width: 992px) {

    .fs-lg-8,
    .fs-lg-6,
    .fs-lg-5,
    .fs-lg-4 {
        width: 100%;
    }

    .fs-lg-push-1 {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-unit: 0.875rem;
    }

    .sub_nav_list {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .typography {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-unit: 0.75rem;
    }

    .footer_hours_row {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Print */
@media print {

    .mobile_sidebar,
    .search_takeover,
    .sub_nav {
        display: none;
    }
}

/* ==========================================================================
/* On pages without a hero, add padding to push content below the fixed header */
.no-hero .main_content {
    padding-top: 160px;
}

/* Ensure the page wrapper starts below the header */
.no-hero .page_content {
    padding-top: 0;
}

/* Also handle any component wrappers that have their own padding */
.no-hero .com-content,
.no-hero .com-finder,
.no-hero .com-users,
.no-hero .com-contact,
.no-hero .com-tags,
.no-hero .com-categories {
    padding-top: 0;
}

/* Responsive - reduce padding on mobile since header is smaller */
@media (max-width: 768px) {
    .no-hero .main_content {
        padding-top: 140px;
    }
}

/* ==========================================================================
   Fix for No-Hero Pages - Content Below Fixed Header
   ========================================================================== */

/* On pages without a hero, add padding to push content below the fixed header */
body.no-hero .main_content {
    padding-top: 130px !important;
}

/* Responsive - reduce padding on mobile since header is smaller */
@media (max-width: 768px) {
    body.no-hero .main_content {
        padding-top: 140px !important;
    }
}

/* FS Grid justify utilities */
.fs-row.fs-all-justify-between {
    justify-content: space-between;
}

.fs-row.fs-all-align-center {
    align-items: center;
}
