/* Ottawa Handiman - Shared Styles for All Pages */
/* This file contains navigation, footer, and common component styles */
/* Must be included on every page along with page-specific styles */

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2C5530;
    --primary-dark: #1e3a21;
    --primary-light: #E8F5E8;
    --secondary-color: #8B4513;
    --accent-color: #D2691E;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #FFFFFF;
    --light-bg: #F8F9FA;
    --border-color: #E9ECEF;
    --success-color: #27AE60;
    --error-color: #e74c3c;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 16px;
    padding-top: 70px; /* Space for fixed navigation */
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-tagline {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 400;
}

.nav-check {
    display: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-cta a {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.nav-cta a:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* Navigation scroll states */
.navigation.scroll-down {
    transform: translateY(-100%);
}

.navigation.scroll-up {
    transform: translateY(0);
}

/* ============================================
   SHARE BUTTON STYLES
   ============================================ */
.share-button {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 998;
}

.share-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-button svg {
    flex-shrink: 0;
}

/* Share Menu Styles */
#share-menu-inline {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option:hover {
    background: #f0f7f2 !important;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.8);
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495E;
    color: rgba(255,255,255,0.7);
}

.footer-credit {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    font-size: 14px;
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
}

.footer-credit p {
    margin: 0;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.footer-credit a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* ============================================
   COMMON COMPONENTS
   ============================================ */

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

/* Typography */
h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.cta-button.primary {
    background: var(--primary-color);
    color: var(--white);
}

.cta-button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cta-button.secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.cta-button.large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Trust Badges */
.badge {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(44, 85, 48, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.badge:hover {
    background: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Section Spacing */
section {
    padding: 80px 0;
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

/* Mobile Navigation */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .nav-container {
        height: 70px;
    }
    
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
        -webkit-tap-highlight-color: transparent;
        width: 40px;
        height: 40px;
        align-items: center;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.1);
        padding: 20px 0;
        gap: 1rem;
        z-index: 999;
    }
    
    /* CSS-only hamburger menu */
    .nav-check:checked ~ .nav-menu {
        left: 0;
    }
    
    .nav-check:checked ~ .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-check:checked ~ .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-check:checked ~ .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Share button mobile */
    .share-button {
        top: 70px;
        right: 15px;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .share-button span {
        display: none; /* Hide text on mobile, show icon only */
    }
    
    #share-menu-inline {
        right: 10px !important;
        left: auto !important;
        top: 110px !important;
        min-width: 180px !important;
    }
    
    /* Footer mobile */
    .footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Typography mobile */
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    section {
        padding: 60px 0;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    #share-menu-inline {
        right: 10px !important;
        left: 10px !important;
        width: calc(100% - 20px) !important;
        min-width: unset !important;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
}

/* Large desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .cta-button {
        min-height: 48px;
        padding: 14px 24px;
    }
    
    .card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
}

/* Print styles */
@media print {
    .navigation,
    .share-button,
    #share-menu-inline,
    .footer-credit {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        margin-top: 40px;
        padding: 20px 0;
    }
    
    .footer-section h3,
    .footer-section p,
    .footer-section li,
    .footer-section a {
        color: black !important;
    }
}