/* Modern Professional Website Template */
/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgb(0 0 0 / 0.2), 0 2px 3px rgb(0 0 0 / 0.25);
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
    --transition-slow: 350ms ease-out;
    
    /* Layout */
    --max-width: 1280px;
    --header-height: 4rem;

    /* News Layout Variables */
    --news-layout-gap: 2rem;
    --news-layout-margin: 2rem 0;
    --news-layout-max-width: 1200px;
    
    /* Feature story dimensions */
    --news-feature-image-height: 300px;
    --news-feature-padding: 1.5rem;
    --news-feature-title-size: 1.5rem;
    --news-feature-summary-size: 1rem;
    --news-feature-summary-lines: 4;
    
    /* Sidebar story dimensions */
    --news-sidebar-image-height: 120px;
    --news-sidebar-padding: 1rem;
    --news-sidebar-title-size: 1.1rem;
    --news-sidebar-summary-size: 0.9rem;
    --news-sidebar-summary-lines: 3;
    
    /* Row story dimensions */
    --news-row-image-width: 120px;
    --news-row-image-height: 100px;
    --news-row-content-padding: 0 0 0 1rem;
    --news-row-title-size: 1rem;
    --news-row-summary-size: 0.875rem;
    --news-row-summary-lines: 2;
    
    /* News colors */
    --news-bg-color: #fff;
    --news-title-color: #1a1a1a;
    --news-summary-color: #4a5568;
    --news-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --news-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --news-border-radius: 8px;
    --news-focus-color: #3182ce;
    --news-transition: 0.2s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 var(--space-4) 0;
    color: var(--gray-900);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 var(--space-4) 0;
    color: var(--gray-900);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Header */
.header {
    background: var(--primary-color, var(--gray-800));
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    height: var(--header-height);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
    position: relative;
}

/* Default: Logo left (order 1), Menu right (order 2) */
.header__logo {
    order: 1;
}

.header__right {
    order: 2;
    margin-left: auto;
}

/* =================================================================
   MOBILE MENU SHARED STYLES
   Applied to both centered logo layouts and responsive breakpoint
   ================================================================= */

/* Mobile arrow base styling - applies to centered logo */
.header__inner[data-logo-align="center"] .nav__arrow {
    background: var(--white);
    border-radius: 50%;
    padding: 4px;
    margin-left: var(--space-2);
    color: var(--gray-900) !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 26px;
    transform: rotate(-90deg);
    position: relative;
}

.header__inner[data-logo-align="center"] .nav__arrow svg {
    width: 14px;
    height: 14px;
    color: var(--gray-900);
    stroke: currentColor;
}

/* Invisible clickable area for centered logo arrows */
.header__inner[data-logo-align="center"] .nav__link {
    position: relative;
}

/* Only show clickable area for links that have arrows (children) */
.header__inner[data-logo-align="center"] .nav__link:has(.nav__arrow)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 10;
}

/* Logo center - use mobile menu */
.header__inner[data-logo-align="center"]:not([data-menu-align="center"]) .header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Both centered logo scenarios use same mobile menu styles */
.header__inner[data-logo-align="center"] .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    flex-direction: column;
    gap: 0;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    z-index: 100;
}

.header__inner[data-logo-align="center"] .nav.nav--open {
    display: flex;
}

.header__inner[data-logo-align="center"] .nav__toggle {
    display: flex !important;
}

.header__inner[data-logo-align="center"] .header__mobile-controls {
    display: flex;
}

.header__inner[data-logo-align="center"] .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--gray-100);
}

.header__inner[data-logo-align="center"] .nav__item--desktop {
    display: none;
}

.header__inner[data-logo-align="center"] .nav__item:last-child {
    border-bottom: none;
}

.header__inner[data-logo-align="center"] .nav__link {
    padding: var(--space-4);
    justify-content: space-between;
    width: 100%;
    font-weight: 600;
    color: var(--gray-900);
    background: none;
    max-width: none;
    white-space: normal;
    line-height: 1.4;
}

/* Remove all hover and active effects in mobile */
.header__inner[data-logo-align="center"] .nav__link,
.header__inner[data-logo-align="center"] .nav__link:hover,
.header__inner[data-logo-align="center"] .nav__link:active,
.header__inner[data-logo-align="center"] .nav__item:has(.nav__dropdown--hover) > .nav__link,
.header__inner[data-logo-align="center"] .nav__item:has(.nav__dropdown--open) > .nav__link {
    -webkit-tap-highlight-color: transparent !important;
    color: var(--gray-900) !important;
    background-color: transparent !important;
}

.header__inner[data-logo-align="center"] .nav__link--active {
    color: var(--secondary-color, var(--primary-color));
    font-weight: 700;
}

/* Mobile submenu styles */
.header__inner[data-logo-align="center"] .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
    margin-top: var(--space-1);
    display: none;
    width: 100%;
}

.header__inner[data-logo-align="center"] .nav__dropdown.nav__dropdown--open {
    display: block;
}

/* Override desktop transforms for mobile menu */
.header__inner[data-logo-align="center"] .nav__dropdown.nav__dropdown--hover,
.header__inner[data-logo-align="center"] .nav__dropdown.nav__dropdown--open,
.header__inner[data-logo-align="center"] .nav__dropdown[class*="--level"].nav__dropdown--hover,
.header__inner[data-logo-align="center"] .nav__dropdown[class*="--level"].nav__dropdown--open {
    transform: none;
}

/* All nested levels (level 2+) in mobile menu */
.header__inner[data-logo-align="center"] .nav__dropdown[class*="--level"] {
    background: transparent;
    margin-left: 0;
    margin-top: var(--space-1);
}

.header__inner[data-logo-align="center"] .nav__dropdown-item {
    width: 100%;
}

.header__inner[data-logo-align="center"] .nav__dropdown-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: var(--space-3) var(--space-4) !important;
    padding-left: calc(var(--space-4) + 20px) !important;
    margin: 1px 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    color: var(--gray-600);
    font-weight: 400;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.header__inner[data-logo-align="center"] .nav__dropdown--level2 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 40px) !important;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level3 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 60px) !important;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level4 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 80px) !important;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level5 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 100px) !important;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level6 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 120px) !important;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level7 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 140px) !important;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level8 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 160px) !important;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level9 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 180px) !important;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.header__inner[data-logo-align="center"] .nav__dropdown--level10 .nav__dropdown-link {
    padding-left: calc(var(--space-4) + 200px) !important;
    font-size: 0.7rem;
    color: var(--gray-400);
}

/* Remove all hover and active effects for dropdown links */
.header__inner[data-logo-align="center"] .nav__dropdown-link,
.header__inner[data-logo-align="center"] .nav__dropdown-link:hover,
.header__inner[data-logo-align="center"] .nav__dropdown-link:active {
    -webkit-tap-highlight-color: transparent !important;
    background-color: transparent !important;
    color: var(--gray-600) !important;
    text-decoration: none;
}

.header__inner[data-logo-align="center"] .nav__dropdown-link--active {
    color: var(--secondary-color, var(--primary-color));
    font-weight: 600;
}

.header__inner[data-logo-align="center"][data-menu-align="right"] .header__right {
    margin-left: auto;
}

.header__inner[data-logo-align="center"][data-menu-align="left"] .header__right {
    order: 1;
    margin-left: 0;
}

.header__inner[data-logo-align="center"][data-menu-align="left"] .header__logo {
    order: 2;
}

/* Logo right, Menu left */
.header__inner[data-logo-align="right"][data-menu-align="left"] .header__logo {
    order: 2;
    margin-left: auto;
}

.header__inner[data-logo-align="right"][data-menu-align="left"] .header__right {
    order: 1;
    margin-left: 0;
}

/* Logo left, Menu center */
.header__inner[data-logo-align="left"][data-menu-align="center"] .header__logo {
    order: 1;
}

.header__inner[data-logo-align="left"][data-menu-align="center"] .header__right {
    order: 2;
    margin-left: auto;
    margin-right: auto;
}


/* Logo right, Menu center */
.header__inner[data-logo-align="right"][data-menu-align="center"] .header__logo {
    order: 3;
}

.header__inner[data-logo-align="right"][data-menu-align="center"] .header__right {
    order: 2;
    margin-left: auto;
    margin-right: auto;
}

/* Both left - Logo outside */
.header__inner[data-logo-align="left"][data-menu-align="left"] .header__logo {
    order: 1;
}

.header__inner[data-logo-align="left"][data-menu-align="left"] .header__right {
    order: 2;
    margin-left: 0;
}

/* Both center - Show logo + hamburger together, centered */
.header__inner[data-logo-align="center"][data-menu-align="center"] .header__logo {
    order: 2;
    margin-left: auto;
    position: static;
    transform: none;
}

.header__inner[data-logo-align="center"][data-menu-align="center"] .header__right {
    order: 3;
    margin-right: auto;
    margin-left: var(--space-4);
}

/* Mobile menu styles now inherited from .header__inner[data-logo-align="center"] rules above */

/* Both right - Menu inside left, Logo outside right */
.header__inner[data-logo-align="right"][data-menu-align="right"] .header__logo {
    order: 3;
}

.header__inner[data-logo-align="right"][data-menu-align="right"] .header__right {
    order: 2;
    margin-left: auto;
}

/* Logo visual styles */
.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-site-name, 'Inter', sans-serif);
}

/* Header Right Side Container - flex container for mobile controls and nav */
.header__right {
    display: flex;
    align-items: center;
}

/* Nav wrapper */
.header__right > nav {
    display: flex;
    align-items: center;
}

.header__logo:hover {
    color: var(--secondary-color, var(--primary-color));
    text-decoration: none;
}

.header__logo-img {
    max-height: 50px;
    max-width: 200px;
    object-fit: contain;
}

.header__logo-text {
    white-space: nowrap;
    display: flex;
    align-items: center;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    color: var(--menu-text-color, var(--gray-200));
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav__link:hover,
.nav__item:has(.nav__dropdown--hover) > .nav__link,
.nav__item:has(.nav__dropdown--open) > .nav__link {
    color: var(--menu-text-hover-color, var(--primary-light));
    background-color: var(--menu-hover-bg-color, var(--gray-700));
    text-decoration: none;
}

.nav__link--active {
    color: var(--menu-text-hover-color, var(--primary-light));
    background-color: var(--menu-hover-bg-color, var(--gray-700));
}

.nav__arrow {
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.nav__arrow--right {
    transform: rotate(-90deg);
    transition: transform var(--transition-fast);
}

.nav__arrow--hover,
.nav__arrow--open {
    transform: rotate(0deg) !important;
}

/* Dropdown Navigation */
.nav__dropdown {
    position: absolute;
    top: 100%;
    left: -10px;
    min-width: 160px;
    background: var(--accent-color, var(--gray-800));
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 999;
    padding: var(--space-1);
    margin-top: var(--space-2);
    list-style: none;
}

.nav__dropdown::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--space-2));
    left: 0;
    right: 0;
    height: var(--space-2);
}

/* All nested dropdowns (level 2+) */
/* Right-opening menus: offset left by 2px */
.nav__dropdown[class*="--level"] {
    left: calc(100% - 2px);
    top: 0;
    background: var(--accent-color, var(--gray-800));
    transform: translateY(-10px);
}

/* Left-opening menus: +3px offset (small gap) */
.nav__dropdown[class*="--level"].nav__dropdown--flip-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 4px;
}

/* Show dropdown on hover (JavaScript-managed) */
.nav__dropdown.nav__dropdown--hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show dropdown when click-locked */
.nav__dropdown.nav__dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nested dropdowns: no horizontal centering transform */
.nav__dropdown[class*="--level"].nav__dropdown--hover,
.nav__dropdown[class*="--level"].nav__dropdown--open {
    transform: translateY(0);
}

.nav__dropdown-item {
    position: relative;
}

.nav__dropdown-item:has(.nav__dropdown[class*="--level"])::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(-1 * var(--space-2));
    width: var(--space-2);
}

.nav__dropdown-item:has(.nav__dropdown[class*="--level"].nav__dropdown--flip-left)::after {
    right: auto;
    left: calc(-1 * var(--space-2));
}

.nav__dropdown-item:hover > .nav__dropdown[class*="--level"]:not(.nav__dropdown--just-closed) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show nested dropdown when it has hover or open state */
.nav__dropdown[class*="--level"].nav__dropdown--hover,
.nav__dropdown[class*="--level"].nav__dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    color: var(--dropdown-text-color, var(--gray-200));
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    max-width: 275px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav__dropdown-link:hover {
    color: var(--dropdown-text-hover-color, var(--white));
    background-color: var(--dropdown-hover-bg-color, var(--gray-700));
    text-decoration: none;
}

.nav__dropdown-link--active {
    color: var(--menu-text-hover-color, var(--primary-light));
    background-color: var(--dropdown-hover-bg-color, var(--gray-700));
    font-weight: 600;
}

/* Mobile Navigation */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
}

.nav__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-fast);
    border-radius: 1px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    padding: var(--space-24) 0;
    text-align: center;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Main Content */
.main {
    padding: var(--space-16) 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* Remove top padding for home templates */
.main--no-top-padding {
    padding-top: 0 !important;
}

.content {
    max-width: var(--content-max-width, 800px);
    margin: 0 auto;
    line-height: 1.7;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: var(--space-6) 0;
}

.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--space-6);
    margin: var(--space-8) 0;
    font-style: italic;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
}

.content code {
    background: var(--gray-100);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--gray-800);
}

.content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-6) 0;
}

.content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

.card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

.card__content {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-8);
}

.grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: 500;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

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

.btn--primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn--secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn--secondary:hover {
    background: var(--gray-50);
    color: var(--gray-900);
    text-decoration: none;
}

.btn--large {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
}

/* Search Toggle Button */
.search__toggle {
    background: none !important;
    border: none !important;
    padding: var(--space-2) !important;
    cursor: pointer;
    color: var(--gray-300);
    transition: color var(--transition-fast);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.search__toggle:hover {
    color: var(--white) !important;
    text-decoration: none !important;
}

/* Search Dropdown */
.search__dropdown {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--accent-color, var(--gray-800));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-4) 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 100ms ease-out;
    z-index: 999;
}

.search__dropdown--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search__dropdown-form {
    width: 100%;
}

.search__dropdown-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search__dropdown-input {
    width: 100%;
    padding: var(--space-4) var(--space-16) var(--space-4) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    transition: all var(--transition-fast);
}

.search__dropdown-input::placeholder {
    color: var(--gray-300);
}

.search__dropdown-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search__dropdown-button {
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-2);
    color: var(--white);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search__dropdown-button:hover {
    background: var(--primary-hover);
}

/* Legacy search styles (kept for compatibility) */
.search {
    position: relative;
    max-width: 400px;
}

.search__input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
    border: 1px solid var(--gray-600);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--gray-700);
    color: var(--white);
}

.search__input::placeholder {
    color: var(--gray-300);
}

.search__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search__icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-300);
    pointer-events: none;
}

/* Footer */
.footer {
    background: var(--primary-color, var(--gray-900));
    color: var(--footer-text-color, var(--white));
    padding: var(--space-16) 0;
    margin-top: var(--space-24);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-footer);
}

.footer__content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-16);
}

/* Only apply flexbox when footer has logo */
.footer__content--with-logo {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

/* Footer logo - default left aligned */
.footer__logo {
    order: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.footer__logo:hover {
    opacity: 0.8;
}

/* Footer main content - default right side */
.footer__main {
    order: 2;
    flex: 1;
}

/* Default: Logo left alignment */
.footer__content--with-logo .footer__logo {
    order: 1;
}

.footer__content--with-logo .footer__main {
    order: 2;
}

/* Logo center alignment - stack vertically */
.footer__content--with-logo[data-logo-align="center"] {
    flex-direction: column;
}

.footer__content--with-logo[data-logo-align="center"] .footer__logo {
    order: 1;
    margin-bottom: var(--space-4);
    align-self: center;
}

.footer__content--with-logo[data-logo-align="center"] .footer__main {
    order: 2;
    width: 100%;
}

/* Logo right alignment */
.footer__content--with-logo[data-logo-align="right"] .footer__logo {
    order: 2;
    margin-left: auto;
}

.footer__content--with-logo[data-logo-align="right"] .footer__main {
    order: 1;
}

.footer__logo-img {
    max-height: 50px;
    max-width: 200px;
    object-fit: contain;
    opacity: 0.9;
}

.footer__text {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
    text-align: var(--footer-alignment, center);
}

/* Mobile: stack logo and content */
@media (max-width: 768px) {
    .footer__content--with-logo {
        flex-direction: column;
        text-align: center;
    }

    .footer__logo,
    .footer__main {
        order: 0;
        margin: 0 auto;
    }

    .footer__logo {
        margin-bottom: var(--space-4);
    }
}

/* Footer navigation styling - single level (no grandchildren) */
.footer .children {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: var(--footer-alignment, center);
}

.footer .children__item {
    margin: 0;
}

.footer .children__link {
    color: var(--footer-text-color, var(--white));
    text-decoration: none;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
    display: block;
    padding: var(--space-2) 0;
}

.footer .children__link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer navigation styling - columnar layout (with grandchildren) */
.footer .children--columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    gap: var(--space-4);
    text-align: var(--footer-alignment, center);
    justify-content: var(--footer-alignment, center);
}

.footer .children__column {
    display: flex;
    flex-direction: column;
}

.footer .children__column-header {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--space-4) 0;
    color: var(--footer-text-color, var(--white));
}

.footer .children__column-link {
    color: var(--footer-text-color, var(--white));
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.footer .children__column-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer .children__column-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.footer .children__column-item {
    margin: 0;
}

.footer .children__column-item-link {
    color: var(--footer-text-color, var(--white));
    text-decoration: none;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
    display: block;
    padding: calc(var(--space-1) / 2) 0;
    font-size: 0.9rem;
}

.footer .children__column-item-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer responsive breakpoints */
@media (max-width: 768px) {
    .footer .children--columns {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .footer {
        padding: var(--space-12) 0;
    }
}

@media (max-width: 480px) {
    .footer .children--columns {
        grid-template-columns: 1fr;
        text-align: var(--footer-alignment, center);
    }

    .footer .children {
        grid-template-columns: 1fr;
        text-align: var(--footer-alignment, center);
    }

    .footer {
        padding: var(--space-8) 0;
    }
}

/* Messages */
.message {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    border-left: 4px solid;
}

.message--success {
    background: #ecfdf5;
    border-color: var(--success-color);
    color: #065f46;
}

.message--error {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.message--warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: #92400e;
}

.message--info {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: #1e40af;
}

/* Mobile Controls Container */
.header__mobile-controls {
    display: none;
    align-items: center;
    gap: var(--space-1);
}

/* Mobile Search Toggle Button (in header) */
.search__toggle--mobile {
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--gray-300);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search__toggle--mobile:hover {
    color: var(--white);
}

/* Desktop/Mobile Navigation Toggle */
.nav__item--desktop {
    display: flex;
}

.nav__item--mobile {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    :root {
        --header-height: 3.5rem;
    }

    /* Show/hide desktop and mobile search */
    .nav__item--desktop {
        display: none;
    }

    .header__mobile-controls {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--gray-200);
        flex-direction: column;
        gap: 0;
        padding: var(--space-4);
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .nav--open {
        display: flex;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .nav__item {
        width: 100%;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .nav__item:last-child {
        border-bottom: none;
    }
    
    .nav__link {
        padding: var(--space-4);
        justify-content: space-between;
        width: 100%;
        font-weight: 600;
        color: var(--gray-900);
        background: none;
        max-width: none;
        white-space: normal;
        line-height: 1.4;
    }
    
    /* Remove all hover and active effects in mobile */
    .nav__link,
    .nav__link:hover,
    .nav__link:active,
    .nav__item:has(.nav__dropdown--hover) > .nav__link,
    .nav__item:has(.nav__dropdown--open) > .nav__link {
        -webkit-tap-highlight-color: transparent !important;
        color: var(--gray-900) !important;
        background-color: transparent !important;
    }

    .nav__link--active {
        color: var(--secondary-color, var(--primary-color));
        font-weight: 700;
    }
    
    /* Mobile arrow styling */
    .nav__arrow {
        background: var(--white);
        border-radius: 50%;
        padding: 4px;
        margin-left: var(--space-2);
        color: var(--gray-900) !important;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        min-height: 26px;
        transform: rotate(-90deg);
        position: relative;
    }

    .nav__arrow svg {
        width: 14px;
        height: 14px;
        color: var(--gray-900);
        stroke: currentColor;
    }

    /* Invisible clickable area extending from arrow to right edge */
    .nav__link {
        position: relative;
    }

    /* Only show clickable area for links that have arrows (children) */
    .nav__link:has(.nav__arrow)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 60px;
        z-index: 10;
    }

    .nav__arrow--right {
        background: var(--white);
        border-radius: 50%;
        padding: 4px;
        margin-left: var(--space-2);
        color: var(--gray-900) !important;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        min-height: 26px;
        transform: rotate(-90deg);
        position: relative;
    }

    /* Invisible clickable area for nested arrows */
    .nav__dropdown-link {
        position: relative;
    }

    /* Only show clickable area for dropdown links that have arrows (children) */
    .nav__dropdown-link:has(.nav__arrow--right)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 60px;
        z-index: 10;
    }

    .nav__arrow--open {
        transform: rotate(0deg) !important;
    }

    .nav__arrow--right.nav__arrow--open {
        transform: rotate(0deg) !important;
    }
    
    
    /* Mobile submenu styles */
    .nav__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        background: transparent;
        margin-top: var(--space-1);
        display: none;
        width: 100%;
    }
    
    .nav__dropdown.nav__dropdown--open {
        display: block;
    }

    /* Override desktop transforms for mobile menu */
    .nav__dropdown.nav__dropdown--hover,
    .nav__dropdown.nav__dropdown--open,
    .nav__dropdown[class*="--level"].nav__dropdown--hover,
    .nav__dropdown[class*="--level"].nav__dropdown--open {
        transform: none;
    }

    /* All nested levels (level 2+) in responsive mobile menu */
    .nav__dropdown[class*="--level"] {
        background: transparent;
        margin-left: 0;
        margin-top: var(--space-1);
    }

    .nav__dropdown-item {
        width: 100%;
    }

    .nav__dropdown-link {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: var(--space-3) var(--space-4) !important;
        padding-left: calc(var(--space-4) + 20px) !important;
        margin: 1px 0 !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        color: var(--gray-600);
        font-weight: 400;
        font-size: 0.95rem;
        text-decoration: none;
        border-radius: var(--radius-md);
        transition: all 0.2s ease;
    }

    .nav__dropdown--level2 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 40px) !important;
        font-size: 0.9rem;
        color: var(--gray-500);
    }

    .nav__dropdown--level3 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 60px) !important;
        font-size: 0.85rem;
        color: var(--gray-500);
    }

    .nav__dropdown--level4 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 80px) !important;
        font-size: 0.8rem;
        color: var(--gray-500);
    }

    .nav__dropdown--level5 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 100px) !important;
        font-size: 0.8rem;
        color: var(--gray-500);
    }

    .nav__dropdown--level6 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 120px) !important;
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    .nav__dropdown--level7 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 140px) !important;
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    .nav__dropdown--level8 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 160px) !important;
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    .nav__dropdown--level9 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 180px) !important;
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    .nav__dropdown--level10 .nav__dropdown-link {
        padding-left: calc(var(--space-4) + 200px) !important;
        font-size: 0.7rem;
        color: var(--gray-400);
    }

    /* Remove all hover and active effects for dropdown links */
    .nav__dropdown-link,
    .nav__dropdown-link:hover,
    .nav__dropdown-link:active {
        -webkit-tap-highlight-color: transparent !important;
        background-color: transparent !important;
        color: var(--gray-600) !important;
        text-decoration: none;
    }

    .nav__dropdown-link--active {
        color: var(--secondary-color, var(--primary-color));
        font-weight: 600;
    }
    

    /* Search item styling */
    .nav__item .search {
        padding: var(--space-2) 0;
    }
    
    .search__input {
        background: var(--gray-50);
        border-color: var(--gray-300);
        color: var(--gray-900);
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .grid--cols-2,
    .grid--cols-3,
    .grid--cols-4 {
        grid-template-columns: 1fr;
    }
    
    .main {
        padding: var(--space-8) 0;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: var(--space-16) 0;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__subtitle {
        font-size: 1rem;
    }
}


/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Legacy compatibility for existing shortcodes */
.search-results {
    list-style: none;
    padding: 0;
    margin: var(--space-8) 0;
}

.search-result {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-4);
    transition: all var(--transition-fast);
}

.search-result:hover {
    box-shadow: var(--shadow-md);
}

.search-result a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.search-result a:hover {
    color: var(--primary-dark);
}

.search-result .preview {
    color: var(--gray-700);
    margin-top: var(--space-2);
    line-height: 1.6;
}

/* ========================================== */
/* NEWS LAYOUT STYLES */
/* ========================================== */

/* News Layout Container */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto auto;
    gap: var(--news-layout-gap);
    max-width: var(--news-layout-max-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: var(--news-layout-margin);
    box-sizing: border-box;
}

/* When news-layout is inside content wrapper, expand it properly */
.content .news-layout {
    max-width: min(var(--news-layout-max-width), calc(100vw - 3rem));
    margin-left: calc(50% - min(var(--news-layout-max-width), calc(100vw - 3rem)) / 2);
    width: min(var(--news-layout-max-width), calc(100vw - 3rem));
}

/* Feature Story - Large story on the left */
.news-feature {
    grid-column: 1;
    grid-row: 1;
}

/* Sidebar Stories - Two stories stacked on the right */
.news-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* News Rows - Remaining stories span full width below */
.news-rows {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* First news-rows section goes in row 2 */
.news-rows:first-of-type {
    grid-row: 2;
}

/* Subsequent news-rows sections flow naturally without explicit grid-row */
.news-rows:not(:first-of-type) {
    grid-row: auto;
}

/* Two-column layout for news rows */
.news-rows--two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
}

/* Spacing between multiple news-rows sections - remove extra spacing */
.news-rows + .news-rows {
    margin-top: 0;
}

/* Individual News Story Styles */
.news-story {
    background: var(--news-bg-color);
    border-radius: var(--news-border-radius);
    overflow: hidden;
    box-shadow: var(--news-shadow);
    transition: transform var(--news-transition), box-shadow var(--news-transition);
    height: 100%;
}

.news-story:hover {
    transform: translateY(-2px);
    box-shadow: var(--news-shadow-hover);
}

/* News Story Link - Remove underlines */
.news-story__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-story__link:hover {
    text-decoration: none;
}

/* Feature Story Layout */
.news-story--feature {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-story--feature .news-story__image {
    height: var(--news-feature-image-height);
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
}

.news-story--feature .news-story__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.news-story--feature .news-story__content {
    padding: var(--news-feature-padding);
    flex-grow: 1;
}

.news-story--feature .news-story__title {
    font-size: var(--news-feature-title-size);
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    color: var(--news-title-color);
}

.news-story--feature .news-story__summary {
    font-size: var(--news-feature-summary-size);
    line-height: 1.6;
    color: var(--news-summary-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: var(--news-feature-summary-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Story Layout */
.news-story--sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-story--sidebar .news-story__image {
    height: var(--news-sidebar-image-height);
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
}

.news-story--sidebar .news-story__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.news-story--sidebar .news-story__content {
    padding: var(--news-sidebar-padding);
    flex-grow: 1;
}

.news-story--sidebar .news-story__title {
    font-size: var(--news-sidebar-title-size);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    color: var(--news-title-color);
}

.news-story--sidebar .news-story__summary {
    font-size: var(--news-sidebar-summary-size);
    line-height: 1.5;
    color: var(--news-summary-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: var(--news-sidebar-summary-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Row Story Layout - Grid-based to prevent text wrapping below image */
.news-story--row .news-story__link {
    display: grid;
    grid-template-columns: var(--news-row-image-width) 1fr;
    grid-template-rows: 1fr;
    gap: 1rem;
    align-items: start;
    height: auto;
    text-decoration: none;
    color: inherit;
    line-height: 1;
}

.news-story--row .news-story__image {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: var(--news-row-image-height);
    overflow: hidden;
    border-radius: 4px;
    align-self: start;
    margin: 0;
    padding: 0;
    display: block;
}

.news-story--row .news-story__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.news-story--row .news-story__content {
    grid-column: 2;
    grid-row: 1;
    padding: 0.5rem 1rem 0 0;
    align-self: start;
}

.news-story--row .news-story__title {
    font-size: var(--news-row-title-size);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    color: var(--news-title-color);
}

.news-story--row .news-story__summary {
    font-size: var(--news-row-summary-size);
    line-height: 1.5;
    color: var(--news-summary-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: var(--news-row-summary-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Sidebar and Column Behavior */

/* Base three-column layout */
.news-rows--three-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default: 2 columns */
    gap: 2rem 1.5rem; /* Same as news-rows--two-columns */
}

/* Reset sidebar for responsive behavior between 1024px and 1199px */
@media (min-width: 1025px) and (max-width: 1199px) {
    .news-layout[data-sidebar-wide="4"] .news-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* 2x2 sidebar grid on wide screens when using responsive sidebar */
@media (min-width: 1200px) {
    /* Force all containers to expand on wide screens */
    body, html {
        max-width: none !important;
    }
    
    /* Expand container width for wide news layouts */
    :root {
        --max-width: 1600px;
    }
    
    .container {
        max-width: 1600px !important;
    }
    
    /* Make news layout break out of container constraints and center properly */
    .news-layout {
        width: min(100vw, 1600px) !important;
        max-width: 1600px !important;
        margin: var(--news-layout-margin) auto !important;
        padding: 0 2rem !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    /* Increase sidebar width and overall container width when using 2x2 layout */
    .news-layout[data-sidebar-wide="4"] {
        grid-template-columns: 2fr 560px !important;
    }
    
    /* For all news layouts on wide screens, ensure good proportions */
    .news-layout {
        grid-template-columns: 2fr 560px !important;
    }
    
    .news-layout[data-sidebar-wide="4"] .news-sidebar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        flex-direction: unset !important;
    }
}

/* Hide extra sidebar stories on narrow screens */
@media (max-width: 1199px) {
    .news-layout[data-sidebar-narrow="2"][data-sidebar-wide="4"] .news-sidebar .news-story:nth-child(n+3) {
        display: none;
    }
}

/* Responsive bottom columns: 3 columns on wide screens */
@media (min-width: 1200px) {
    .news-layout[data-columns-wide="3"] .news-rows--three-columns {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Hide extra bottom stories on narrow screens */
@media (max-width: 1199px) {
    .news-layout[data-count-narrow="4"][data-count-wide="6"] .news-rows--three-columns .news-story:nth-child(n+5) {
        display: none;
    }
    
    .news-layout[data-columns-narrow="2"] .news-rows--three-columns {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* News Layout Responsive Design */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-feature {
        grid-column: 1;
        grid-row: 1;
    }
    
    .news-sidebar {
        grid-column: 1;
        grid-row: 2;
        flex-direction: row;
        gap: 1rem;
    }
    
    .news-sidebar .news-story {
        flex: 1;
    }
    
    .news-rows:first-of-type {
        grid-column: 1;
        grid-row: 3;
    }
    
    .news-rows:not(:first-of-type) {
        grid-column: 1;
        grid-row: auto;
    }
    
    .news-rows--two-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .news-layout {
        gap: 1rem;
    }
    
    .news-sidebar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .news-story--feature .news-story__image {
        height: 200px;
    }
    
    .news-story--feature .news-story__content {
        padding: 1rem;
    }
    
    .news-story--feature .news-story__title {
        font-size: 1.25rem;
    }
    
    .news-story--sidebar .news-story__image {
        height: 150px;
    }
    
    .news-story--row .news-story__link {
        grid-template-columns: 100px 1fr;
    }
    
    .news-story--row .news-story__image {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .news-story--feature .news-story__image {
        height: 160px;
    }
    
    .news-story--sidebar .news-story__image {
        height: 120px;
    }
    
    .news-story--row .news-story__image {
        height: 100px;
    }
}

/* News Layout Focus states for accessibility */
.news-story__link:focus {
    outline: 2px solid var(--news-focus-color);
    outline-offset: 2px;
}

/* News Layout Print styles */
@media print {
    .news-story {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .news-story:hover {
        transform: none;
        box-shadow: none;
    }
    
    .news-layout {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar {
        flex-direction: column;
    }
}

/* Breadcrumb Navigation Styles */
.breadcrumb {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-3) 0;
    margin-bottom: var(--space-4);
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
}

.breadcrumb__item:not(:last-child)::after {
    content: "›";
    margin-left: var(--space-2);
    color: var(--gray-400);
    font-weight: 500;
    font-size: 1rem;
}

.breadcrumb__link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.breadcrumb__link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb__current {
    color: var(--gray-600);
    font-weight: 600;
}

/* Mobile breadcrumb adjustments */
@media (max-width: 640px) {
    .breadcrumb {
        padding: var(--space-2) 0;
    }

    .breadcrumb__list {
        font-size: 0.8rem;
        gap: var(--space-1);
    }

    .breadcrumb__item:not(:last-child)::after {
        margin-left: var(--space-1);
        font-size: 0.9rem;
    }
}

/* Feature Photo */
.feature-photo {
    position: relative;
    max-width: var(--feature-photo-max-width);
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-photo--fullwidth {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.feature-photo__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.feature-photo__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.3);
}

.feature-photo__title {
    font-family: var(--feature-photo-title-font);
    font-size: var(--feature-photo-title-size);
    color: var(--feature-photo-title-color);
    text-align: var(--feature-photo-title-alignment, center);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
    max-width: 90%;
}

.feature-photo__description {
    font-family: var(--feature-photo-title-font);
    font-size: var(--feature-photo-description-size, 1.2rem);
    color: var(--feature-photo-title-color);
    text-align: center;
    margin: var(--space-1) 0 0 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    max-width: 90%;
}

/* Parallax effect */
.feature-photo--parallax .feature-photo__image {
    transform: translateY(0);
    will-change: transform;
    transition: none !important;
}

/* Disable parallax on mobile for better performance */
@media (max-width: 768px) {
    .feature-photo--parallax .feature-photo__image {
        transform: none !important;
    }
}

/* ============================================
   Photo Grid
   ============================================ */

.photo-grid {
    display: grid;
    width: 100%;
    margin: 2rem 0 0 0;
}

/* Column layouts */
.photo-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.photo-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.photo-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Gap sizes */
.photo-grid--gap-small {
    gap: 0.75rem;
}

.photo-grid--gap-medium {
    gap: 1.5rem;
}

.photo-grid--gap-large {
    gap: 2.5rem;
}

/* Grid item */
.photo-grid__item {
    position: relative;
    overflow: hidden;
}

/* Link wrapper */
.photo-grid__link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.photo-grid__link:hover {
    transform: translateY(-4px);
}

/* Image */
.photo-grid__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-grid__link:hover .photo-grid__image {
    opacity: 0.9;
}

/* Corner styles */
.photo-grid--square .photo-grid__item {
    border-radius: 0;
}

.photo-grid--square .photo-grid__image {
    border-radius: 0;
}

.photo-grid--round .photo-grid__item {
    border-radius: 8px;
}

.photo-grid--round .photo-grid__image {
    border-radius: 8px;
}

.photo-grid--round-12 .photo-grid__item {
    border-radius: 12px;
}

.photo-grid--round-12 .photo-grid__image {
    border-radius: 12px;
}

.photo-grid--round-full .photo-grid__item {
    border-radius: 50%;
}

.photo-grid--round-full .photo-grid__image {
    border-radius: 50%;
}

/* Border styles */
.photo-grid--border .photo-grid__item {
    border: 1px solid #e2e8f0;
}

.photo-grid--border-2 .photo-grid__item {
    border: 2px solid #e2e8f0;
}

.photo-grid--border-dark .photo-grid__item {
    border: 1px solid #94a3b8;
}

/* Default: no shadow, no border - clean image grid */
.photo-grid:not(.photo-grid--border):not(.photo-grid--border-2):not(.photo-grid--border-dark) .photo-grid__item {
    box-shadow: none;
}

/* Aspect ratio styles */
.photo-grid--ratio-square .photo-grid__item {
    aspect-ratio: 1 / 1;
}

.photo-grid--ratio-landscape .photo-grid__item {
    aspect-ratio: 16 / 9;
}

.photo-grid--ratio-portrait .photo-grid__item {
    aspect-ratio: 3 / 4;
}

.photo-grid--ratio-original .photo-grid__item {
    aspect-ratio: auto;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .photo-grid--cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .photo-grid--cols-3,
    .photo-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-grid--gap-large {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .photo-grid--cols-2,
    .photo-grid--cols-3,
    .photo-grid--cols-4 {
        grid-template-columns: 1fr;
    }

    .photo-grid--gap-medium {
        gap: 1rem;
    }

    .photo-grid--gap-large {
        gap: 1.25rem;
    }
}
