/**
 * Frontend Main Styles
 * Contains: CSS Variables, Reset, Base Typography, Container
 */

/* ==================== CSS Custom Properties ==================== */
:root {
    /* Primary Color Palette */
    --primary-blue: #4A90E2;
    --primary-blue-dark: #357ABD;
    --primary-blue-light: #E8F4FD;
    
    /* Secondary Colors */
    --accent-orange: #FF8A65;
    --accent-orange-light: #FFF3E0;
    --soft-lavender: #B39DDB;
    --gentle-green: #81C784;
    
    /* Neutral Palette */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-xxl: 4rem;     /* 64px */
    
    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-heading: 'Poppins', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Shadows */
    --shadow-soft: 0 2px 20px rgba(74, 144, 226, 0.1);
    --shadow-medium: 0 8px 30px rgba(74, 144, 226, 0.15);
    --shadow-strong: 0 12px 40px rgba(74, 144, 226, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
    
    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-mobile-menu: 950;
    --z-header: 1000;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ==================== CSS Reset ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-primary);
    color: var(--text-primary);
    background-color: var(--white);
    line-height: var(--line-height-base);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Ensure footer sits at bottom when content is short and remove white gap */
html, body {
    height: 100%;
}

/* #page is the theme wrapper (closed in footer.php). Make it a column flex container
   so main content can grow and footer stays at the bottom without extra whitespace. */
#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content area should expand to fill available space */
main#site-content {
    flex: 1 0 auto;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }   /* 40px */
h2 { font-size: 2rem; }     /* 32px */
h3 { font-size: 1.5rem; }   /* 24px */
h4 { font-size: 1.25rem; }  /* 20px */
h5 { font-size: 1.125rem; } /* 18px */
h6 { font-size: 1rem; }     /* 16px */

p {
    margin: 0 0 var(--space-sm) 0;
    color: var(--text-secondary);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-blue-dark);
}

/* ==================== Focus Visible ==================== */
/* Global keyboard-only focus indicator — visible for keyboard users, hidden for mouse */
:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Remove default focus ring for mouse/touch interactions */
:focus:not(:focus-visible) {
    outline: none;
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

/* ==================== GDPR Cookie Banner ==================== */
.fpa-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--dark-gray);
    color: var(--white);
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.fpa-cookie-banner p {
    margin: 0;
    flex: 1 1 400px;
    color: #FFFFFF;
}
.fpa-cookie-banner a {
    color: var(--primary-blue-light);
    text-decoration: underline;
}
.fpa-cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.fpa-cookie-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-md, 6px);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}
.fpa-cookie-btn:hover { opacity: 0.85; }
.fpa-cookie-btn--accept {
    background: var(--primary-blue);
    color: var(--white);
}
.fpa-cookie-btn--decline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
}
