/*==============================================================================
  TEMPLATE 1001 - MODERN GENEALOGY DESIGN
  
  Custom styles blending traditional genealogy aesthetics with modern design
  Built with: Bootstrap 5.3, Font Awesome 6, Google Fonts
  Fonts: Playfair Display (headings) + Source Sans Pro (body)
==============================================================================*/

/*------------------------------------------------------------------------------
  CSS CUSTOM PROPERTIES (Variables)
  Traditional genealogy palette with modern accents
------------------------------------------------------------------------------*/
:root {
	/* Primary Colors - Warm, traditional genealogy tones */
	--color-primary: #504034;        /* Rich brown - main brand color */
	--color-primary-light: #6B584A;  /* Lighter brown */
	--color-primary-dark: #413226;   /* Darker brown */
	--color-secondary: #987e64;      /* Medium warm brown */
	--color-accent: #dfcebc;         /* Light beige/cream */
	--color-accent-2: #C2AC96;       /* Warmer beige */
	
	/* Text Colors */
	--color-text-primary: #1F1A14;   /* Almost black, warm undertone */
	--color-text-secondary: #655543; /* Medium brown for secondary text */
	--color-text-light: #FFFFFF;     /* White for dark backgrounds */
	--color-text-muted: #777777;     /* Muted gray */
	
	/* Link Colors */
	--color-link: #655543;           /* Brown links */
	--color-link-hover: #504034;     /* Darker on hover */
	--color-link-visited: #413226;   /* Subtle visited state */
	
	/* Background Colors */
	--color-bg-body: #FFFFFF;        /* Clean white background */
	--color-bg-primary: #FFFFFF;     /* Primary background */
	--color-bg-secondary: #F8F6F3;   /* Secondary background */
	--color-bg-alt: #F8F6F3;         /* Off-white alternative */
	--color-bg-dark: #504034;        /* Dark sections */
	--color-bg-overlay: rgba(80, 64, 52, 0.05); /* Subtle overlay */
	
	/* Border & Divider Colors */
	--color-border: #E7D6C4;         /* Light border */
	--color-border-dark: #795F46;    /* Darker border */
	
	/* Shadow & Depth */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.10);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
	--shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
	
	/* Typography - Modern font stack */
	--font-heading: 'Playfair Display', 'Palatino Linotype', Georgia, 'Times New Roman', Times, serif;
	--font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, Helvetica, sans-serif;
	--font-mono: 'Courier New', Courier, monospace;
	
	/* Font Sizes - Fluid typography scale */
	--font-size-xs: 0.75rem;    /* 12px */
	--font-size-sm: 0.875rem;   /* 14px */
	--font-size-base: 1rem;     /* 16px */
	--font-size-md: 1.125rem;   /* 18px */
	--font-size-lg: 1.25rem;    /* 20px */
	--font-size-xl: 1.5rem;     /* 24px */
	--font-size-2xl: 1.875rem;  /* 30px */
	--font-size-3xl: 2.25rem;   /* 36px */
	--font-size-4xl: 3rem;      /* 48px */
	
	/* Font Weights */
	--font-weight-light: 300;
	--font-weight-normal: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;
	
	/* Line Heights */
	--line-height-tight: 1.25;
	--line-height-normal: 1.5;
	--line-height-relaxed: 1.75;
	--line-height-loose: 2;
	
	/* Spacing System - Consistent spacing scale */
	--space-1: 0.25rem;   /* 4px */
	--space-2: 0.5rem;    /* 8px */
	--space-3: 0.75rem;   /* 12px */
	--space-4: 1rem;      /* 16px */
	--space-5: 1.5rem;    /* 24px */
	--space-6: 2rem;      /* 32px */
	--space-8: 3rem;      /* 48px */
	--space-10: 4rem;     /* 64px */
	--space-12: 6rem;     /* 96px */
	
	/* Border Radius - Subtle, classic feel */
	--radius-sm: 0.25rem;   /* 4px */
	--radius-md: 0.375rem;  /* 6px */
	--radius-lg: 0.5rem;    /* 8px */
	--radius-xl: 0.75rem;   /* 12px */
	--radius-2xl: 1rem;     /* 16px */
	--radius-full: 50%;     /* Circular */
	
	/* Transitions */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/*------------------------------------------------------------------------------
  BASE TYPOGRAPHY
  Modern, readable typography with classic genealogy feel
------------------------------------------------------------------------------*/
body {
	font-family: var(--font-body) !important;
	font-size: var(--font-size-base) !important;
	line-height: var(--line-height-normal);
	color: var(--color-text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Headings - Elegant serif font */
h1, h2, h3, h4, h5, h6,
.cb-headline, .cb-slogan,
.header, .plainheader, .nameheader,
.mmaintitle {
	font-family: var(--font-heading) !important;
	font-weight: var(--font-weight-semibold);
	line-height: var(--line-height-tight);
	color: var(--color-text-primary);
	margin-bottom: var(--space-4);
	letter-spacing: -0.01em;
}

h1, .plainheader { 
	font-size: var(--font-size-3xl);
	font-weight: var(--font-weight-bold);
}

h2, .nameheader {
	font-size: var(--font-size-2xl);
}

h3, .header {
	font-size: var(--font-size-xl);
}

h4 {
	font-size: var(--font-size-lg);
}

h5, h6 {
	font-size: var(--font-size-md);
}

/* Paragraph improvements */
p {
	margin-bottom: var(--space-4);
	line-height: var(--line-height-relaxed);
}

/* Links - Subtle, elegant */
a, a:link {
	color: var(--color-link);
	text-decoration: none;
	transition: color var(--transition-base), text-decoration var(--transition-base);
}

a:hover {
	color: var(--color-link-hover);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:visited {
	color: var(--color-link-visited);
}

/*------------------------------------------------------------------------------
  BOOTSTRAP BUTTON RESET
  Reset TNG's default button and link styles for Bootstrap compatibility
------------------------------------------------------------------------------*/
.btn {
	/* Reset TNG link styles */
	text-decoration: none !important;
	background-image: none !important;
	
	/* Reset any inherited styles */
	font-family: inherit !important;
	font-weight: inherit !important;
	
	/* Reset padding and margin to Bootstrap defaults */
	margin: 0 !important;
	padding: 0.375rem 0.75rem !important;
	
	/* Ensure Bootstrap styles apply properly */
	display: inline-block !important;
	text-align: center !important;
	vertical-align: middle !important;
	cursor: pointer !important;
	user-select: none !important;
	border: 1px solid transparent !important;
	border-radius: 0.25rem !important;
	line-height: 1.5 !important;
	transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
	            border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

/* Bootstrap button sizes */
.btn-lg {
	padding: 0.5rem 1rem !important;
	font-size: 1.25rem !important;
	border-radius: 0.3rem !important;
}

.btn-sm {
	padding: 0.25rem 0.5rem !important;
	font-size: 0.875rem !important;
	border-radius: 0.2rem !important;
}

.btn:hover,
.btn:focus,
.btn:active {
	text-decoration: none !important;
}

.btn:focus {
	outline: 0 !important;
	box-shadow: 0 0 0 0.25rem rgba(80, 64, 52, 0.25) !important;
}

/* Focus states for accessibility */
a:focus, 
button:focus, 
input:focus, 
select:focus, 
textarea:focus {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/*------------------------------------------------------------------------------
  UTILITY CLASSES
  Helpful classes for common patterns
------------------------------------------------------------------------------*/
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-serif { font-family: var(--font-heading); }
.font-sans { font-family: var(--font-body); }

.fw-light { font-weight: var(--font-weight-light); }
.fw-normal { font-weight: var(--font-weight-normal); }
.fw-medium { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold { font-weight: var(--font-weight-bold); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/*------------------------------------------------------------------------------
  LEGACY OVERRIDES
  Keep existing custom styles that work well
------------------------------------------------------------------------------*/
.frontpage-image {
	border-radius: var(--radius-full);
	box-shadow: var(--shadow-md);
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.frontpage-image:hover {
	transform: scale(1.02);
	box-shadow: var(--shadow-lg);
}

.circular-square,
.circular-landscape, 
.circular-portrait {
	border-radius: var(--radius-full);
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.circular-landscape { 
	display: inline-block; 
	position: relative; 
	width: 300px; 
	height: 300px; 
} 

.circular-landscape img { 
	width: auto; 
	height: 100%; 
	margin-left: -50px; 
}

.circular-portrait { 
	position: relative; 
	width: 200px; 
	height: 200px; 
} 

.circular-portrait img { 
	width: 100%; 
	height: auto;
}

/*------------------------------------------------------------------------------
  BOOTSTRAP ENHANCEMENTS
  Custom styles for Bootstrap components
------------------------------------------------------------------------------*/

/* Card hover effect */
.hover-lift {
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-xl) !important;
}

/* Improved card styling */
.card {
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.card-img-top {
	border-radius: 0;
}

.card-title a {
	color: var(--color-text-primary);
	transition: color var(--transition-base);
}

.card-title a:hover {
	color: var(--color-primary);
	text-decoration: none;
}

/* Surname cloud styling - Enhanced cloud effect */
.surname-cloud-wrapper {
	padding: var(--space-5) var(--space-4);
	background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,248,255,0.95) 100%);
	border-radius: var(--radius-md);
	text-align: center;
	line-height: 2.5;
	position: relative;
	overflow: hidden;
}

/* Decorative cloud background */
.surname-cloud-wrapper::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle at 20% 50%, rgba(255,204,0,0.03) 0%, transparent 50%),
				radial-gradient(circle at 80% 80%, rgba(74,144,226,0.03) 0%, transparent 50%),
				radial-gradient(circle at 40% 20%, rgba(233,75,139,0.02) 0%, transparent 50%);
	pointer-events: none;
	z-index: 0;
}

.surname-cloud-wrapper > * {
	position: relative;
	z-index: 1;
}

.surname-cloud-wrapper a {
	display: inline-block;
	margin: 0.4rem 0.6rem;
	padding: 0.4rem 1rem;
	text-decoration: none;
	font-weight: 600;
	border-radius: 2rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(33, 37, 41, 0.08);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Color variations based on size/frequency */
.surname-cloud-wrapper a[style*="font-size: 8pt"],
.surname-cloud-wrapper a[style*="font-size: 9pt"],
.surname-cloud-wrapper a[style*="font-size: 10pt"] {
	color: rgba(33, 37, 41, 0.6);
	font-size: 0.85rem !important;
}

.surname-cloud-wrapper a[style*="font-size: 11pt"],
.surname-cloud-wrapper a[style*="font-size: 12pt"],
.surname-cloud-wrapper a[style*="font-size: 13pt"] {
	color: rgba(74, 144, 226, 0.8);
	font-size: 1rem !important;
}

.surname-cloud-wrapper a[style*="font-size: 14pt"],
.surname-cloud-wrapper a[style*="font-size: 15pt"],
.surname-cloud-wrapper a[style*="font-size: 16pt"] {
	color: rgba(255, 153, 0, 0.9);
	font-size: 1.15rem !important;
}

.surname-cloud-wrapper a[style*="font-size: 17pt"],
.surname-cloud-wrapper a[style*="font-size: 18pt"],
.surname-cloud-wrapper a[style*="font-size: 19pt"] {
	color: rgba(233, 75, 139, 0.9);
	font-size: 1.35rem !important;
}

.surname-cloud-wrapper a[style*="font-size: 20pt"],
.surname-cloud-wrapper a[style*="font-size: 21pt"],
.surname-cloud-wrapper a[style*="font-size: 22pt"],
.surname-cloud-wrapper a[style*="font-size: 23pt"],
.surname-cloud-wrapper a[style*="font-size: 24pt"] {
	color: #FFCC00;
	font-size: 1.6rem !important;
	font-weight: 700;
}

/* Hover effects */
.surname-cloud-wrapper a:hover {
	transform: translateY(-3px) scale(1.08);
	box-shadow: 0 6px 20px rgba(255, 204, 0, 0.3);
	background: rgba(255, 204, 0, 0.15);
	border-color: rgba(255, 204, 0, 0.4);
	color: #CC9900 !important;
	text-decoration: none;
}

/* Animation for cloud items */
@keyframes float {
	0%, 100% { transform: translateY(0px); }
	50% { transform: translateY(-5px); }
}

.surname-cloud-wrapper a:nth-child(3n) {
	animation: float 6s ease-in-out infinite;
}

.surname-cloud-wrapper a:nth-child(3n+1) {
	animation: float 7s ease-in-out infinite 0.5s;
}

.surname-cloud-wrapper a:nth-child(3n+2) {
	animation: float 8s ease-in-out infinite 1s;
}

/*------------------------------------------------------------------------------
  MODERN GLASSMORPHISM HEADER
  Dark header with gray subheader, both floating with glass effect
------------------------------------------------------------------------------*/

/* Main Header - Dark Bootstrap style with background image */
.modern-header {
	position: sticky;
	top: 0;
	z-index: 1050;
	width: 100%;
}

.header-main {
	background: rgba(33, 37, 41, 0.95);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
	position: relative;
	z-index: 1052;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1.5rem;
	min-height: 70px;
}

/* Branding with background image */
.header-branding {
	position: relative;
	display: flex;
	align-items: center;
	z-index: 2;
}

.header-bg-image {
	position: absolute;
	left: -1.5rem;
	top: -0.75rem;
	bottom: -0.75rem;
	width: 500px;
	opacity: 0.15;
	overflow: hidden;
	z-index: 1;
	pointer-events: none;
}

.header-bg-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(30%);
}

.header-titles {
	position: relative;
	z-index: 2;
}

.site-title {
	font-family: var(--font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0;
	color: #ffffff;
	line-height: 1.2;
}

.site-title a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.3s ease;
}

.site-title a:hover {
	color: #e0e0e0;
}

.site-subtitle {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.7);
	margin: 0.25rem 0 0 0;
	font-weight: 400;
}

/* Navigation in header */
.header-nav {
	flex: 1;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-left: 2rem;
	z-index: 1100;
	position: relative;
}

/* Override .cb-nav wrapper to be invisible in our new header */
.header-nav .cb-nav,
.header-main .cb-nav {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	display: flex !important;
	align-items: center;
}

/* TNG Menu - Complete override for glassmorphism */
.header-nav ul.cb-hmenu,
.header-main ul.cb-hmenu,
.header-nav .cb-nav ul.cb-hmenu,
.header-main .cb-nav ul.cb-hmenu {
	background: transparent !important;
	background-image: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0.25rem !important;
	border: none !important;
	float: none !important;
	vertical-align: middle !important;
}

/* Menu items - override float */
.header-nav ul.cb-hmenu li,
.header-main ul.cb-hmenu li,
.header-nav .cb-nav ul.cb-hmenu li,
.header-main .cb-nav ul.cb-hmenu li {
	position: relative !important;
	background: transparent !important;
	border: none !important;
	float: none !important;
	margin: 0 !important;
	display: block !important;
}

/* Hide menu separators */
.header-nav ul.cb-hmenu>li:before,
.header-main ul.cb-hmenu>li:before,
.header-nav .cb-nav ul.cb-hmenu>li:before,
.header-main .cb-nav ul.cb-hmenu>li:before {
	display: none !important;
}

/* Menu links */
.header-nav ul.cb-hmenu > li > a,
.header-main ul.cb-hmenu > li > a,
.header-nav .cb-nav ul.cb-hmenu > li > a,
.header-main .cb-nav ul.cb-hmenu > li > a {
	display: block !important;
	padding: 0.65rem 1rem !important;
	color: rgba(255, 255, 255, 0.9) !important;
	text-decoration: none !important;
	font-weight: 500 !important;
	font-size: 0.9rem !important;
	transition: all 0.3s ease !important;
	border-radius: 6px !important;
	background: transparent !important;
	border: 1px solid transparent !important;
	height: auto !important;
	line-height: normal !important;
	margin: 0 !important;
}

/* Menu link hover */
.header-nav ul.cb-hmenu > li > a:hover,
.header-main ul.cb-hmenu > li > a:hover,
.header-nav .cb-nav ul.cb-hmenu > li > a:hover,
.header-main .cb-nav ul.cb-hmenu > li > a:hover,
.header-nav ul.cb-hmenu > li:hover > a,
.header-main ul.cb-hmenu > li:hover > a {
	background-color: rgba(255, 255, 255, 0.1) !important;
	color: #ffffff !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Active menu item */
.header-nav ul.cb-hmenu > li > a.active,
.header-main ul.cb-hmenu > li > a.active,
.header-nav .cb-nav ul.cb-hmenu > li > a.active,
.header-main .cb-nav ul.cb-hmenu > li > a.active {
	background-color: rgba(255, 255, 255, 0.15) !important;
	color: #ffffff !important;
	font-weight: 600 !important;
}

/* Dropdown menus */
.header-nav ul.cb-hmenu ul,
.header-main ul.cb-hmenu ul,
.header-nav .cb-nav ul.cb-hmenu ul,
.header-main .cb-nav ul.cb-hmenu ul {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	min-width: 200px !important;
	background: rgba(33, 37, 41, 0.98) !important;
	backdrop-filter: blur(15px) !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
	border-radius: 8px !important;
	list-style: none !important;
	margin: 0.25rem 0 0 0 !important;
	padding: 0.5rem !important;
	display: none !important;
	z-index: 9999 !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	visibility: hidden !important;
}

/* Show dropdown on hover */
.header-nav ul.cb-hmenu li:hover > ul,
.header-main ul.cb-hmenu li:hover > ul,
.header-nav .cb-nav ul.cb-hmenu li:hover > ul,
.header-main .cb-nav ul.cb-hmenu li:hover > ul {
	display: block !important;
	visibility: visible !important;
}

/* Hide dropdown ::before pseudo element */
.header-nav ul.cb-hmenu ul:before,
.header-main ul.cb-hmenu ul:before,
.header-nav .cb-nav ul.cb-hmenu ul:before,
.header-main .cb-nav ul.cb-hmenu ul:before {
	display: none !important;
}

/* Dropdown menu items */
.header-nav ul.cb-hmenu ul li,
.header-main ul.cb-hmenu ul li,
.header-nav .cb-nav ul.cb-hmenu ul li,
.header-main .cb-nav ul.cb-hmenu ul li {
	float: none !important;
	margin: 0 !important;
}

/* Dropdown menu links */
.header-nav ul.cb-hmenu ul a,
.header-main ul.cb-hmenu ul a,
.header-nav .cb-nav ul.cb-hmenu ul a,
.header-main .cb-nav ul.cb-hmenu ul a {
	display: block !important;
	padding: 0.6rem 1rem !important;
	color: rgba(255, 255, 255, 0.85) !important;
	text-decoration: none !important;
	font-size: 0.875rem !important;
	transition: all 0.3s ease !important;
	border-radius: 4px !important;
	background: transparent !important;
	height: auto !important;
	line-height: normal !important;
	min-width: auto !important;
	border: none !important;
	margin: 0 !important;
}

/* Dropdown menu link hover */
.header-nav ul.cb-hmenu ul a:hover,
.header-main ul.cb-hmenu ul a:hover,
.header-nav .cb-nav ul.cb-hmenu ul a:hover,
.header-main .cb-nav ul.cb-hmenu ul a:hover,
.header-nav ul.cb-hmenu ul li:hover > a,
.header-main ul.cb-hmenu ul li:hover > a {
	background-color: rgba(255, 255, 255, 0.1) !important;
	color: #ffffff !important;
	padding-left: 1.25rem !important;
}

/* Search Subheader - Gray glassmorphism */
.header-search-bar {
	background: rgba(240, 242, 245, 0.85);
	backdrop-filter: blur(15px) saturate(180%);
	-webkit-backdrop-filter: blur(15px) saturate(180%);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
	padding: 0.75rem 0;
	position: relative;
	z-index: 1051;
}

.search-form-glass {
	max-width: 100%;
}

.search-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0 1.5rem;
}

.search-field {
	position: relative;
	flex: 1;
	min-width: 180px;
}

.search-input {
	width: 100% !important;
	padding: 0.75rem 1rem !important;
	border: 1px solid rgba(0, 0, 0, 0.15) !important;
	border-radius: 8px !important;
	background: rgba(255, 255, 255, 0.95) !important;
	font-size: 0.95rem !important;
	transition: all 0.3s ease !important;
	color: #333 !important;
	font-family: var(--font-body) !important;
	line-height: normal !important;
	height: auto !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.search-input:focus {
	outline: none !important;
	border-color: #0d6efd !important;
	background: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.search-input::placeholder {
	color: rgba(0, 0, 0, 0.45) !important;
	font-weight: 400 !important;
}

.search-icon {
	display: none !important;
}

.search-submit {
	padding: 0.75rem 1.75rem !important;
	background: #0d6efd !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	display: flex !important;
	align-items: center !important;
	gap: 0.5rem !important;
	white-space: nowrap !important;
	height: auto !important;
	line-height: normal !important;
	font-family: var(--font-body) !important;
	box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2) !important;
	text-decoration: none !important;
}

.search-submit:hover {
	background: #0b5ed7 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 16px rgba(13, 110, 253, 0.35) !important;
}

/* Dashboard CTA Button */
.dashboard-cta-btn {
	padding: 0.75rem 2rem !important;
	background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 1.1rem !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.5rem !important;
	white-space: nowrap !important;
	height: auto !important;
	line-height: normal !important;
	font-family: var(--font-body) !important;
	box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
	text-decoration: none !important;
	margin: 0 !important;
}

.dashboard-cta-btn:hover {
	background: linear-gradient(135deg, #FF5555 0%, #FF7F43 100%) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45) !important;
	color: #ffffff !important;
	text-decoration: none !important;
}

.dashboard-cta-btn:active {
	transform: translateY(0) !important;
	box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3) !important;
}

.search-submit i {
	font-size: 0.95rem;
}

.search-link {
	padding: 0.75rem 1.25rem !important;
	color: #495057 !important;
	text-decoration: none !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	transition: all 0.3s ease !important;
	border-radius: 8px !important;
	display: flex !important;
	align-items: center !important;
	gap: 0.45rem !important;
	white-space: nowrap !important;
	background: transparent !important;
	border: 1px solid transparent !important;
	height: auto !important;
	line-height: normal !important;
	font-family: var(--font-body) !important;
}

.search-link:hover {
	background: rgba(0, 0, 0, 0.06) !important;
	color: #212529 !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	transform: translateY(-1px) !important;
}

.search-link i {
	font-size: 0.85rem;
}

/*------------------------------------------------------------------------------
  LAYOUT SYSTEM - FLEXBOX MODERNIZATION
  Replace old Artisteer table/float layouts with modern Flexbox
------------------------------------------------------------------------------*/

/* Modern wrapper with max-width constraint */
.cb-sheet {
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--space-4);
}

/* Convert table-based layouts to Flexbox */
.cb-content-layout {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	width: 100%;
}

.cb-content-layout-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	width: 100%;
}

.cb-layout-cell {
	flex: 1;
	min-width: 0; /* Prevents flex items from overflowing */
	display: block;
}

/* Layout wrapper modernization */
.cb-layout-wrapper {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	margin: var(--space-4) auto 0;
}

/* Content area styling */
.cb-content {
	flex: 1;
	background-color: var(--color-bg-primary);
	padding: var(--space-4);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

/* Post content modernization */
.cb-post {
	background-color: transparent;
	border: none;
	margin-bottom: var(--space-4);
}

.cb-postcontent {
	line-height: var(--line-height-relaxed);
	color: var(--color-text-primary);
}

/* Sidebar layouts */
.cb-sidebar1,
.cb-sidebar2 {
	flex: 0 0 280px;
	background-color: var(--color-bg-alt);
	padding: var(--space-3);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

/* Responsive layout breakpoints */
@media (max-width: 991px) {
	.cb-content-layout,
	.cb-content-layout-row {
		flex-direction: column;
	}
	
	.cb-layout-cell {
		width: 100% !important;
		flex: none;
	}
	
	.cb-sidebar1,
	.cb-sidebar2 {
		flex: none;
		width: 100%;
	}
	
	.cb-sheet {
		padding: var(--space-2);
	}
}

/* Two-column layouts */
.layout-item-0,
.layout-item-1 {
	flex: 1;
	min-width: 250px;
}

/* Three-column layouts */
.cb-layout-cell.layout-item-0 {
	flex: 2;
}

.cb-layout-cell.layout-item-1 {
	flex: 1;
}

/* TNG-specific content area */
.cb-tng-area {
	background-color: var(--color-bg-primary);
	padding: var(--space-5);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	margin-top: var(--space-4);
}

/* Main content wrapper */
#cb-main {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--color-bg-secondary);
}

/*------------------------------------------------------------------------------
  FOOTER STYLING
  Modern glassmorphism footer matching header design
------------------------------------------------------------------------------*/

.modern-footer {
	background: rgba(33, 37, 41, 0.95);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.9);
	width: 100%;
	margin: 0;
	padding: 0;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
	position: relative;
	overflow: hidden;
}

.modern-footer::before {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 100%;
	max-width: 1200px;
	height: 100%;
	transform: translateX(-50%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 768'%3E%3Cpath fill='%23ffffff' opacity='0.06' d='M822.58,530.61c-9.75-5.36-21.51-10.18-31.83-8.23c7.33-8.84,15.72-20.64,19.83-30.42c28.1-0.3,35.42-46.22,16-62.31c-15.31,12.69-32.84,40.57-20.81,59.9c-37.95,51.27-109.44,82.42-173.13,64.56c31.06-9.71,67.02-31.19,89.49-53.48c24.67,5.6,39.78-33.14,27.41-50.81c-16.51,7.25-37.28,27.88-30.49,47.36c-14.7,11.35-36.94,24.94-55.95,33.69c7.91-12.56,7.11-34.72-6.22-43.27c-11.76,13.3-24.69,34.58-14.58,51.66c-9.19,3.25-18.61,6.02-27.69,9.18c-12.65-4.71-24.31-11.63-36.04-18.46c18.32-4.36,32.78-31.94,22.41-48.98c-16.18,6.42-38.87,20.69-40.06,39.32c-21.34-11.49-45.32-14.87-66.08-7.78c2.81-21.75,4.48-44.02,4.94-66.48c15.77-7.9,30.75-16.91,47.56-22.61c5.4,2.32,12.39,4.64,18.33,6.87c-12.82,8.31-7.83,34.83,2.4,42.63c9.33-6.16,15.59-26.81,9.64-37.77c7.68,3.27,16.36,7.37,24.11,11.27c0.35,19.86,24.76,32.02,42.29,32.98c5.3-19.41-20.94-50.19-40.82-36.63c-13.82-8.47-31.88-17.69-45.8-22.48c36.35-10.29,77.35-7.04,111.36,7.31c-1.76,19.73,20.93,34.71,38.19,38.02c7.71-18.26-13.43-51.5-34.73-42.56c-17.19-10.14-39.21-17.26-59.92-19.67c17.38-8.77,36.86-17.06,56.87-19.91c13.71,20.48,43.58,19.97,65.56,15.07c-1.01-28.4-53.33-48.92-65.97-19.04c-23.8,2.58-47.8,8.92-66.09,22.98c-7.37-0.49-14.8-0.5-22.19-0.03c12.03-11.39,13.08-38.3,2.34-50.68c-15.99,8.63-31.89,35.79-20.27,52.78c-22.92,3.95-44.75,12.76-62.72,26.73c-0.07-22.65-1.36-45.42-3.99-67.95c5.92-8.04,9.57-13.38,15.49-20.5c10.31,13.15,34.22,8.92,45.85-0.4c-4.77-10.21-20.64-16.04-31.76-15.03c4.79-4.71,9.85-9.13,15.22-13.19c25.08-0.61,41,1.64,59.58,10.07c-0.34,23.29,26.49,38.84,46.85,42.7c9.37-23.56-20.66-62.42-45.26-46.55c-15.51-8.59-34.93-13.56-51.84-12.69c26.24-17.5,58.49-18.94,89.23-26.9c3.35,21.82,28.73,32.76,48.63,35.85c5.8-17.53-9.56-38.21-25.78-44.01c7.81-3.78,15.7-9.09,21.53-15.1c28.43,8.23,46.46-37.79,28.84-57.23c-16.7,10.37-38.12,32.68-31.63,53.54c-28.96,19.06-56.55,17.63-89.5,23.02c6.99-8.65,11.97-17.36,17.72-28.88c8.15,13.72,35.82,8.81,43.95-1.8c-6.3-9.6-27.67-16.13-38.82-9.78c1.64-4.08,3.09-8.19,4.28-12.21c22.6-4.5,24.42-43.86,11.73-57.87c-16.54,7.14-32.76,42.69-14.86,56.57c-7.12,19.7-21.02,39.24-32,55.41c-4.51,0.9-9.25,1.89-13.71,3.34c11.17-14.86,1.62-45.88-15.89-51.85c-9.33,15.35-15.35,44.73,0.29,57.69c-25.3,11.08-48.45,29.43-61.29,52.91c-4.62-29.18-11.56-57.76-20.98-84.96c6.2-18.75,13.35-36.45,22.72-52.53c14.54,15.3,41.8,9.62,58.49,0.57c-5.67-16.97-29.35-24.61-45.49-20.17c12.26-16.6,30.92-33.36,48.42-44.76c20.48,12.05,46.31,0.6,65.15-10.71c-10.41-27.69-69.58-26.56-68.2,7.14c-11.13,5.51-23.98,14.25-33.24,21.96c2.75-13.8,0.83-33.33-7.1-45.05c-22.01,7.51-36.33,51.34-11.97,63.99c-15.35,17.52-29.22,39.37-35.46,61.53c-9.84-24.8-20.31-48.25-34.71-69.71c-1.53-10.33-4.48-20.13-3.87-30.54c16.91,5.94,33.46-3.07,49.19-8.82c-4.12-19.06-34.27-22.45-46.72-9.99c1.81-8.15,4.6-16.08,8.45-23.59c20.47,2.29,36.46-17.32,44.96-34.12c-18.89-14.39-60.08,7.68-48.31,32.02c-10.99,17.25-16.67,40.77-14.46,60.84c-8.22-10.41-20.44-17.91-32.91-23.45c11.52-16.06,0.58-39.6-11.47-52.42c-13.62,8.24-15.47,33.97-6.15,46.39c-7.73-2.05-16.17-3.71-24.21-4.82c-7.7-21.99-46.03-13.01-50.54,7.39c14.62,5.91,37.59,10.38,49.27-2.84c52.42,9.59,84.8,41.78,94.83,94.91c-14.69-12.19-44.39-11.54-55.72,5.17c14.26,13.91,42.6,29.34,61.21,17.31c3.39,14.68,6.36,29.26,8.88,43.75c-20.27-15.04-48.3-23.32-71.69-30.1c-5.75-13.34-12.08-28.63-14.13-44.34c15.86-10.68,12.46-36.84,3.56-51.14c-18.03,6.53-28.25,43.63-6.56,51.92c1.22,15.08,4.85,31.7,8.96,41.2c-32.28-9.33-62.6-19.01-87.46-47.24c15.05-19.24,3.13-49.64-10.83-66.86c-24.15,12.77-24.65,65.78,6.29,68.85c9.44,16.02,22.86,27.86,38.35,37.17c-8.08,0.17-17.56,1.49-26.11,4.01c-10.86-16.71-40.75-1.56-41.39,15.47c13.72,3.23,35.48,2.13,41.77-12.75c12.16-1.97,26.32-4.9,37.39-0.4c-15.6,4.42-28.3,27.44-19.19,42.21c15.05-6.52,34.57-16.83,36.6-34.49c38.49,14.82,77.63,24.45,108.23,50.39c5.95,42.03,8.07,83.38,5.98,124.46c-14.49-20.64-35.12-39.4-56.86-55.16c0.3-4.74-0.72-10.73-2.71-17.23c25.51,3.38,33.92-41.85,11.93-52.03c-7.44,10.76-15.68,23.69-18.06,36.57c-3.7-7.71-8.3-15.32-13.3-21.77c8.09-20.97-25.71-37.45-41.27-26.4c6.34,13.99,21.7,32.15,38.73,28.11c9.51,14.26,13.91,27.47,16.55,47.03c-35.84-24.6-73.53-41.34-115.9-50.88c-2.68-11.05-18.92-26.88-36.3-37.41c-1.22-22.18-38.02-25.89-49.83-10.89c10.58,12.37,33.13,25.32,48.39,14.43c11.02,7.96,19.34,17.62,28.76,32.14c-20.13-3.58-44.22-5.99-60.18-5c-17.67-32.18-75.41-6.52-74.22,26.71c25.39,3.14,60.15,3.58,74.76-20.66c32.74,4.63,70.53,14.11,102.45,28.36c-10.41,0.02-22.34,1.27-33.56,3.84c-18.38-20.78-56.12,6.42-52.04,30.79c18.72,0.27,47.18-6.38,52.72-26.47c16.17-2.94,32.79-2.07,47.9-1c31.1,15.86,61.09,37.39,84.38,59.73c-20.64-6.67-45.15-10.43-65.41-10c-7.33-20.46-43.07-12.65-47.97,6.27c13.87,6.23,36.2,10.88,47.31-2.23c4.9,0.47,9.93,1.04,15.4,1.86c-13.94,5.8-25.65,25.38-19.22,40.07c16.9-4.34,40-16.35,39.53-36.31c15.45,3.62,29.67,9.14,44.11,14.49c2.77,3.07,5.32,6.13,8.05,9.18c-18.9,2.4-25.7,34.45-13.44,46.92c11.1-6.82,22.71-21.88,23.54-34.99c4.54,5.58,8.81,11.22,12.92,17.04c-4.35,39.23-12.66,78.33-25.3,117.69c-16.3-26-39.67-47.37-66.63-63.31c20.62-11.32,22.29-44.47,15.98-64.69c-23.06,2.57-41.24,35.42-32.41,55.85c-5.77-2.81-11.66-5.38-17.65-7.71c-5.47-25.02-49.7-72.23-90.29-74c-7.61-21.47-44.93-12.32-49.09,7.62c14.51,5.69,37.3,9.74,48.36-3.92c6.71,1.76,14.84,4.59,21.94,7.85c-17.08-0.56-36.5,19.5-32.63,37.07c17.96-0.96,43.8-8.62,47.14-28.97c18.62,12.34,33.24,30.17,42.92,50.15c-40.05-13.33-85.2-16.35-124.86-5.24c-13.57-18.14-46.88,5.63-38.53,25.18c14.47-3.81,32.31-6.47,39.66-20.78c11.13-0.79,27.78-1.34,41.13-0.51c-11.74,6.45-20.58,25.84-15.16,38.18c15.67-3.27,37.2-18.26,33.53-36.47c37.2,4.61,72.73,18.75,103.98,39.37c-13.18,9.44-30.35,19.48-46.77,25.8c1.42-18.29-19.78-33.68-36.01-36.99c-6.23,13.96,4.17,35.87,17.53,42.67c-78.76,17.3-123.72-19.63-180.95-64.91c20.78-8.03,17.68-46.57,3.91-58.81c-13.78,7.66-25.16,37.83-14.94,52.56c-3.9-1.9-7.93-3.53-12.11-4.78c-7.46-30.66-60.66-20.78-66.04,6.98c20.34,7.46,48.98,14.36,65.46-3.18c13.87,6.81,26.31,16.31,38.32,26.85c-19.4-3.12-44.04,20.48-41.53,39.89c19.23,1.71,50.44-6.67,55.07-28.1c8.57,7.39,17.45,14.66,26.92,20.8c-16.24,3.17-29.05,28.19-18.59,42.46c13.65-7.28,31.29-17.57,33.26-34c20,10.28,41.94,16.72,64.26,18.95c-9.09,7.72-19.73,21.16-21.65,33.03c19.19,9.22,55.75-9.06,51.77-32.6c34.05-2.59,70.3-14.3,95.64-36.81c21.83,16.25,34.09,38.75,49.98,60.74c-11.46,31.08-25.65,62.38-42.72,94.07h0.01c-17.61,35.4-32.53,70.9-27.22,101.37h128.41c-66.14-83.71-7.21-174.97,6.26-265.2c49.7-22.78,93.69,33.16,117.26,70.86c-11.69,16.29,2,41.07,16.67,50.8c13.98-13.74,9.98-52.28-13.72-52.9c-7.13-17.29-19.81-35.86-34.52-51.49c24.69,13.29,52.64,21.02,81.17,21.65c-14.9,16.03,2.44,48.89,23.41,49.98c3.61-15.33,3.03-39.36-9.71-50.17c14.72-0.7,29.29-3.43,43.25-7.9c0.87,31.29,53.14,39.3,70.19,16.29c-11.09-12.86-28.92-22.59-44.82-26.73c14.29-7.28,27.53-16.58,39.17-27.65c6.21,22.56,45.4,23.32,58.13,6.82C833.64,537.72,828.32,533.86,822.58,530.61z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center bottom;
	pointer-events: none;
	z-index: 0;
}

/* No additional branch system needed - complete tree in ::before */
.modern-footer::after {
	display: none;
}

/* Override all footer link colors */
.modern-footer a {
	color: rgba(255, 255, 255, 0.9) !important;
}

.modern-footer a:hover {
	color: #ffffff !important;
}

.footer-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem 1.5rem 0;
	position: relative;
	z-index: 1;
}

.footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	padding: 2rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column {
	flex: 1;
	min-width: 200px;
}

.footer-column.footer-main {
	flex: 2;
	min-width: 300px;
}

.footer-heading {
	font-family: var(--font-heading);
	font-weight: 600;
	color: #ffffff;
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
}

.footer-heading i {
	color: rgba(255, 255, 255, 0.7);
}

.footer-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links li {
	margin-bottom: 0.65rem;
}

.footer-links a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	font-size: 0.95rem;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
}

.footer-links a:hover {
	color: #ffffff;
	transform: translateX(4px);
}

.footer-links i {
	width: 16px;
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

.footer-links a:hover i {
	opacity: 1;
}

.footer-copyright {
	text-align: center;
	padding: 1.5rem 0;
	margin: 0;
}

.copyright-text {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.9rem;
	margin: 0;
}

.copyright-text a {
	color: rgba(255, 255, 255, 0.9) !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.copyright-text a:hover {
	color: #ffffff !important;
}

.copyright-text i {
	opacity: 0.5;
	font-size: 0.8rem;
}

.hg-footertext {
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.6;
	font-size: 0.9rem;
}

.hg-footertext a {
	color: rgba(255, 255, 255, 0.9) !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hg-footertext a:hover {
	color: #ffffff !important;
}

.hg-footertext-inline {
	display: inline;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.9rem;
}

.hg-footertext-inline a {
	color: rgba(255, 255, 255, 0.9) !important;
	text-decoration: none;
}

.hg-footertext-inline a:hover {
	color: #ffffff !important;
}

/* Responsive footer */
@media (max-width: 991px) {
	.footer-row {
		gap: 1.5rem;
	}
	
	.footer-column,
	.footer-column.footer-main {
		flex: 1 1 calc(50% - 1rem);
		min-width: 0;
	}
}

@media (max-width: 576px) {
	.footer-content {
		padding: 1.5rem 1rem 0;
	}
	
	.footer-row {
		flex-direction: column;
		gap: 1.5rem;
		padding: 1.5rem 0;
	}
	
	.footer-column,
	.footer-column.footer-main {
		flex: 1 1 100%;
	}
	
	.footer-heading {
		font-size: 0.85rem;
		margin-bottom: 0.75rem;
	}
	
	.footer-links a {
		font-size: 0.85rem;
	}
	
	.copyright-text {
		font-size: 0.75rem;
	}
}

/*------------------------------------------------------------------------------
  ANIMATIONS & TRANSITIONS
  Smooth interactions and visual feedback
------------------------------------------------------------------------------*/

/* Smooth page transitions */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Apply animations to content */
.cb-content,
.cb-post,
.card {
	animation: fadeIn 0.5s ease-out;
}

.cb-layout-cell {
	animation: slideIn 0.6s ease-out;
}

.cb-layout-cell:nth-child(2) {
	animation-delay: 0.1s;
}

.cb-layout-cell:nth-child(3) {
	animation-delay: 0.2s;
}

/* Link hover effects */
a {
	transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}

/* Button hover effects */
button,
input[type="submit"],
input[type="button"],
.btn {
	transition: all var(--transition-base);
	position: relative;
	overflow: hidden;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active,
.btn:active {
	transform: translateY(0);
	box-shadow: var(--shadow-sm);
}

/* Image hover effects */
img {
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.cb-post img:hover,
.cb-content img:hover {
	transform: scale(1.02);
	box-shadow: var(--shadow-lg);
}

/* Card entrance animations */
.card {
	animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* Ripple effect for buttons */
@keyframes ripple {
	0% {
		transform: scale(0);
		opacity: 1;
	}
	100% {
		transform: scale(4);
		opacity: 0;
	}
}

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* Loading skeleton animation */
@keyframes shimmer {
	0% {
		background-position: -1000px 0;
	}
	100% {
		background-position: 1000px 0;
	}
}

.skeleton {
	animation: shimmer 2s infinite;
	background: linear-gradient(
		to right,
		#f0f0f0 0%,
		#e0e0e0 20%,
		#f0f0f0 40%,
		#f0f0f0 100%
	);
	background-size: 1000px 100%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/*------------------------------------------------------------------------------
  BUTTON SYSTEM
  Modern button components with genealogy theme
------------------------------------------------------------------------------*/

/* Base button styles */
.btn-genealogy,
input[type="submit"],
input[type="button"],
button[type="submit"] {
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
	color: var(--color-text-light);
	border: none;
	padding: var(--space-2) var(--space-4);
	font-family: var(--font-body);
	font-weight: var(--font-weight-semibold);
	font-size: var(--font-size-base);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all var(--transition-base);
	box-shadow: var(--shadow-sm);
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.btn-genealogy:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button[type="submit"]:hover {
	background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
	color: var(--color-text-light);
}

.btn-genealogy:active,
input[type="submit"]:active,
input[type="button"]:active,
button[type="submit"]:active {
	transform: translateY(0);
	box-shadow: var(--shadow-sm);
}

/* Accent button variant */
.btn-accent {
	background-color: var(--color-accent);
	color: var(--color-text-primary);
}

.btn-accent:hover {
	background-color: var(--color-secondary);
	color: var(--color-text-light);
}

/* Outline button variant */
.btn-outline {
	background: transparent;
	color: var(--color-primary);
	border: 2px solid var(--color-primary);
}

.btn-outline:hover {
	background-color: var(--color-primary);
	color: var(--color-text-light);
}

/* Light button variant */
.btn-light {
	background-color: var(--color-bg-alt);
	color: var(--color-text-primary);
	border: 1px solid var(--color-border);
}

.btn-light:hover {
	background-color: var(--color-accent);
	border-color: var(--color-accent);
}

/* Button sizes */
.btn-sm {
	padding: var(--space-1) var(--space-3);
	font-size: var(--font-size-sm);
}

.btn-lg {
	padding: var(--space-3) var(--space-6);
	font-size: var(--font-size-lg);
}

/* Icon buttons */
.btn-icon {
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
}

/* Button with icon */
.btn i {
	margin-right: var(--space-2);
}

.btn i:last-child {
	margin-right: 0;
	margin-left: var(--space-2);
}

/* Disabled state */
.btn-genealogy:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

/*------------------------------------------------------------------------------
  SURNAME CLOUD STYLING
  Modern typography and interactions for surname display
------------------------------------------------------------------------------*/

.surnamecloud,
.surnames {
	line-height: 2;
	padding: var(--space-4);
}

.surnamecloud a,
.surnames a {
	display: inline-block;
	color: var(--color-primary);
	text-decoration: none;
	padding: var(--space-1) var(--space-2);
	margin: var(--space-1);
	border-radius: var(--radius-sm);
	transition: all var(--transition-base);
	font-weight: var(--font-weight-medium);
	background-color: var(--color-bg-alt);
	border: 1px solid var(--color-border);
}

.surnamecloud a:hover,
.surnames a:hover {
	background-color: var(--color-accent);
	color: var(--color-text-primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
	border-color: var(--color-accent);
}

/* Variable font sizes for frequency */
.surnamecloud .size1 { font-size: var(--font-size-xs); }
.surnamecloud .size2 { font-size: var(--font-size-sm); }
.surnamecloud .size3 { font-size: var(--font-size-base); }
.surnamecloud .size4 { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); }
.surnamecloud .size5 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
.surnamecloud .size6 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
.surnamecloud .size7 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }

/*------------------------------------------------------------------------------
  ACCESSIBILITY IMPROVEMENTS
  WCAG 2.1 AA compliance enhancements
------------------------------------------------------------------------------*/

/* Skip to main content link */
.skip-to-main {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--color-primary);
	color: var(--color-text-light);
	padding: var(--space-2) var(--space-4);
	text-decoration: none;
	border-radius: 0 0 var(--radius-md) 0;
	z-index: 10000;
	transition: top var(--transition-base);
}

.skip-to-main:focus {
	top: 0;
}

/* Enhanced focus states */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	:root {
		--color-primary: #2d2418;
		--color-text-primary: #000000;
		--color-bg-primary: #ffffff;
	}
	
	a {
		text-decoration: underline;
	}
}

/* ARIA live regions */
[aria-live="polite"],
[aria-live="assertive"] {
	position: relative;
}

/* Screen reader only text */
.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;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
	position: static;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

/* Ensure sufficient color contrast */
.text-light-bg {
	color: var(--color-text-primary);
	background-color: var(--color-bg-primary);
}

/* Focus trap for modals */
.modal-open {
	overflow: hidden;
}

/* Keyboard navigation indicators */
*:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* Better table accessibility */
table caption {
	padding: var(--space-2);
	font-weight: var(--font-weight-semibold);
	text-align: left;
	color: var(--color-text-primary);
}

th {
	font-weight: var(--font-weight-semibold);
	text-align: left;
}

/* Form labels always visible */
label {
	display: block;
	margin-bottom: var(--space-1);
	font-weight: var(--font-weight-medium);
	color: var(--color-text-primary);
}

/* Required field indicator */
.required::after {
	content: " *";
	color: #dc3545;
	font-weight: var(--font-weight-bold);
}

/* Error states */
.error,
.invalid {
	border-color: #dc3545 !important;
	background-color: #fff5f5;
}

.error-message {
	color: #dc3545;
	font-size: var(--font-size-sm);
	margin-top: var(--space-1);
	display: flex;
	align-items: center;
}

.error-message::before {
	content: "⚠ ";
	margin-right: var(--space-1);
}

/*------------------------------------------------------------------------------
  IMAGE OPTIMIZATIONS
  Modern image handling with aspect-ratio and lazy loading support
------------------------------------------------------------------------------*/

/* Responsive images by default */
img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Lazy loading optimization */
img[loading="lazy"] {
	background-color: var(--color-bg-alt);
	min-height: 100px;
}

/* Aspect ratio containers */
.img-container {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-md);
}

.img-container-16x9 {
	aspect-ratio: 16 / 9;
}

.img-container-4x3 {
	aspect-ratio: 4 / 3;
}

.img-container-1x1 {
	aspect-ratio: 1 / 1;
}

.img-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Thumbnail gallery */
.photo-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: var(--space-3);
	padding: var(--space-4) 0;
}

.photo-gallery img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: var(--radius-md);
	transition: all var(--transition-base);
	cursor: pointer;
}

.photo-gallery img:hover {
	transform: scale(1.05);
	box-shadow: var(--shadow-lg);
	z-index: 10;
}

/* Person photo styling */
.personphoto,
.familyphoto {
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	margin: var(--space-3) 0;
	max-width: 100%;
	height: auto;
}

/* Media page enhancements */
.mediabox {
	background-color: var(--color-bg-primary);
	padding: var(--space-3);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	margin-bottom: var(--space-3);
	transition: all var(--transition-base);
}

.mediabox:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

/* Image caption styling */
figcaption,
.caption {
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	font-style: italic;
	margin-top: var(--space-2);
	text-align: center;
	padding: var(--space-2);
}

/*------------------------------------------------------------------------------
  UTILITY CLASSES
  Helper classes for common patterns
------------------------------------------------------------------------------*/

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }

/* Text utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-muted { color: var(--color-text-secondary) !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flexbox utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.align-center { align-items: center !important; }
.align-start { align-items: flex-start !important; }

/* Border utilities */
.border { border: 1px solid var(--color-border) !important; }
.border-0 { border: none !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Background utilities */
.bg-primary { background-color: var(--color-bg-primary) !important; }
.bg-secondary { background-color: var(--color-bg-secondary) !important; }
.bg-alt { background-color: var(--color-bg-alt) !important; }

/*------------------------------------------------------------------------------
  GENEALOGY DATA CARDS (VCARD)
  Modern card styling for person/family information display
------------------------------------------------------------------------------*/

/* vCard - Main container for genealogy data */
.vcard {
	position: relative;
}

.vcard:hover {

}

/* vCard sections */
.vcard dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--space-3) var(--space-4);
	margin: 0;
}

.vcard dt {
	font-weight: var(--font-weight-semibold);
	color: var(--color-text-secondary);
	font-size: var(--font-size-sm);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: var(--space-2) 0;
}

.vcard dd {
	margin: 0;
	padding: var(--space-2) 0;
	color: var(--color-text-primary);
	font-size: var(--font-size-base);
}

/* Profile photo container - Circular with shadow and border */
.defphoto {
	float: left;
	margin: 0 var(--space-5) var(--space-4) 0;
	position: relative;
	z-index: 1;
}

.defphoto img {
	border-radius: var(--radius-full) !important;
	border: 4px solid rgba(255, 255, 255, 0.95);
	box-shadow: 
		0 4px 12px rgba(0, 0, 0, 0.15),
		0 2px 6px rgba(0, 0, 0, 0.1),
		inset 0 0 0 1px rgba(0, 0, 0, 0.05);
	transition: all var(--transition-base);
	width: 100px;
	height: 100px;
	object-fit: cover;
	object-position: center;
}

.defphoto img:hover {
	transform: scale(1.05);
	box-shadow: 
		0 8px 24px rgba(0, 0, 0, 0.2),
		0 4px 12px rgba(0, 0, 0, 0.15),
		inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Add subtle ring effect for profile photos */
.defphoto::before {
	content: '';
	position: absolute;
	inset: -8px;
	border-radius: var(--radius-full);
	background: linear-gradient(135deg, 
		rgba(152, 126, 100, 0.2) 0%, 
		rgba(80, 64, 52, 0.15) 50%,
		rgba(152, 126, 100, 0.2) 100%);
	z-index: -1;
	opacity: 0;
	transition: opacity var(--transition-base);
}

.defphoto:hover::before {
	opacity: 1;
}

/* Responsive adjustments for profile photo */
@media (max-width: 768px) {
	.defphoto {
		float: none;
		margin: 0 auto var(--space-4);
		display: block;
		text-align: center;
	}
	
	.defphoto img {
		width: 90px;
		height: 90px;
	}
}

/* Gender icon overlay - floats over profile photo */
/* Target the specific gender icon that's a sibling of defphoto */
#cb-main > div > div > div.vcard > div.normal > img {
	display: block !important;
	width: 32px !important;
	height: 32px !important;
	padding: 6px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-radius: var(--radius-full) !important;
	border: 2px solid rgba(255, 255, 255, 0.95);
	box-shadow: 
		0 2px 8px rgba(0, 0, 0, 0.15),
		0 1px 4px rgba(0, 0, 0, 0.1);
	transition: all var(--transition-base);
	object-fit: contain;
	position: absolute;
	z-index: 200;
	left: 70px;
	top: 65px;
}

#cb-main > div > div > div.vcard > div.normal > img:hover {
	transform: scale(1.1);
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 
		0 4px 12px rgba(0, 0, 0, 0.2),
		0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Person name in vcard */
.vcard .fn {
	font-family: var(--font-heading);
	font-size: var(--font-size-2xl);
	font-weight: var(--font-weight-bold);
	color: var(--color-text-primary);
	margin-bottom: var(--space-3);
	display: block;
}

/* Dates and places styling */
.vcard .bday,
.vcard .dday,
.vcard .location {
	font-style: italic;
	color: var(--color-text-secondary);
}

/* vCard links */
.vcard a {
	color: var(--color-link);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: all var(--transition-base);
}

.vcard a:hover {
	color: var(--color-link-hover);
	border-bottom-color: var(--color-link-hover);
}

/*------------------------------------------------------------------------------
  PRINT STYLES
  Optimized styles for printing genealogy pages
------------------------------------------------------------------------------*/

@media print {
	/* Hide navigation and non-essential elements */
	.cb-header,
	.cb-footer,
	.search-wrapper,
	.btn,
	button,
	nav {
		display: none !important;
	}
	
	/* Optimize layout for print */
	body {
		background: white !important;
		color: black !important;
		font-size: 12pt;
	}
	
	/* Remove shadows and backgrounds */
	* {
		box-shadow: none !important;
		text-shadow: none !important;
	}
	
	.card,
	.cb-content,
	.cb-post {
		border: 1px solid #ccc;
		page-break-inside: avoid;
	}
	
	/* Show URLs for links */
	a[href]:after {
		content: " (" attr(href) ")";
		font-size: 10pt;
		color: #666;
	}
	
	/* Optimize images for print */
	img {
		max-width: 100% !important;
		page-break-inside: avoid;
	}
	
	/* Page breaks */
	h1, h2, h3 {
		page-break-after: avoid;
	}
	
	/* Table improvements */
	table {
		border-collapse: collapse;
		width: 100%;
	}
	
	th, td {
		border: 1px solid #ccc;
		padding: 4px;
	}
}
