/*
 * USA Life Nest - Custom CSS
 * Typography, colors, and layout tweaks built on top of Bootstrap 5
 */

:root {
	--primary-color: #1a4f8b;
	--secondary-color: #d32f2f;
	--text-color: #333333;
	--heading-font: 'Playfair Display', serif;
	--body-font: 'Inter', sans-serif;
}

body {
	font-family: var(--body-font);
	color: var(--text-color);
	background-color: #f8f9fa;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .site-title {
	font-family: var(--heading-font);
	color: #111;
}

a {
	color: var(--primary-color);
	transition: all 0.3s ease;
}

a:hover {
	color: var(--secondary-color);
	text-decoration: none;
}

/* Header & Navigation */
.site-header {
	border-bottom: 1px solid #eaeaea;
}

.main-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation li {
	position: relative;
	margin-left: 1.5rem;
}

.main-navigation a {
	display: block;
	padding: 0.5rem 0;
	color: #333;
	font-weight: 500;
	font-size: 0.95rem;
	text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--primary-color);
}

/* Sub-menus */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	min-width: 200px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	z-index: 9999;
	border-radius: 4px;
	padding: 0.5rem 0;
}

.main-navigation li:hover > ul {
	display: block;
}

.main-navigation ul ul li {
	margin: 0;
}

.main-navigation ul ul a {
	padding: 0.5rem 1.5rem;
	font-size: 0.9rem;
}

.main-navigation ul ul a:hover {
	background: #f8f9fa;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
	position: fixed;
	top: 0;
	left: -100%;
	width: 300px;
	height: 100vh;
	z-index: 10000;
	transition: left 0.3s ease;
	box-shadow: 2px 0 10px rgba(0,0,0,0.1);
	overflow-y: auto;
}

.mobile-menu-overlay.active {
	left: 0;
}

.mobile-nav li {
	margin: 0;
	border-bottom: 1px solid #eee;
}

.mobile-nav a {
	padding: 1rem 0;
	color: #333;
	display: block;
	font-weight: 500;
	text-decoration: none;
}

/* Search Overlay */
.search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(26, 79, 139, 0.95);
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.search-overlay.active {
	opacity: 1;
	visibility: visible;
}

.search-overlay .search-field {
	font-size: 2rem;
	color: #fff;
}

.search-overlay .search-field::placeholder {
	color: rgba(255,255,255,0.7);
}

.close-search {
	top: 2rem;
	right: 2rem;
	font-size: 3rem;
	cursor: pointer;
}

/* Cards & Images */
.object-cover {
	object-fit: cover;
}

.blog-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.post-title-link:hover {
	color: var(--primary-color) !important;
}

/* Article Content */
.article-content {
	font-size: 1.1rem;
	line-height: 1.8;
}

.article-content p {
	margin-bottom: 1.5rem;
}

.article-content h2, .article-content h3, .article-content h4 {
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5rem 0;
}

.article-content blockquote {
	border-left: 4px solid var(--primary-color);
	padding-left: 1.5rem;
	margin-left: 0;
	font-style: italic;
	color: #555;
	font-size: 1.25rem;
}

/* Footer */
.site-footer {
	background-color: #111;
}

.footer-bottom-menu a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
}

.footer-bottom-menu a:hover {
	color: #fff;
}

.widget-title {
	border-bottom: 2px solid var(--primary-color);
	padding-bottom: 0.5rem;
	display: inline-block;
}

/* Sidebar */
.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 0.5rem 0;
	border-bottom: 1px solid #eaeaea;
}

.widget ul li:last-child {
	border-bottom: none;
}

.widget ul li a {
	color: #444;
	text-decoration: none;
}

.widget ul li a:hover {
	color: var(--primary-color);
}

/* Hamburger */
.hamburger-box {
	width: 24px;
	height: 24px;
	display: inline-block;
	position: relative;
}

.hamburger-inner {
	display: block;
	top: 50%;
	margin-top: -2px;
	width: 24px;
	height: 2px;
	background-color: #333;
	position: absolute;
	transition: background-color 0.15s ease;
}

.hamburger-inner::before, .hamburger-inner::after {
	width: 24px;
	height: 2px;
	background-color: #333;
	position: absolute;
	content: "";
	transition: transform 0.15s ease;
}

.hamburger-inner::before {
	top: -6px;
}

.hamburger-inner::after {
	bottom: -6px;
}

/* Dark Mode Core */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0;
}
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode .card,
body.dark-mode .site-header,
body.dark-mode .top-bar,
body.dark-mode .mobile-menu-overlay,
body.dark-mode .main-navigation ul ul {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .text-dark,
body.dark-mode .site-title a,
body.dark-mode .main-navigation a,
body.dark-mode .post-title-link,
body.dark-mode .category-card {
    color: #fff !important;
}
body.dark-mode .text-muted {
    color: #aaa !important;
}
body.dark-mode .border-bottom,
body.dark-mode .border {
    border-color: #333 !important;
}
body.dark-mode .card-footer {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}
body.dark-mode .hero-section {
    background-color: #1a1a1a !important;
}
body.dark-mode .dark-mode-toggle,
body.dark-mode .search-toggle {
    color: #fff !important;
}
body.dark-mode .moon-icon { display: none !important; }
body.dark-mode .sun-icon { display: block !important; }
body.dark-mode .main-navigation a:hover,
body.dark-mode .main-navigation .current-menu-item > a {
	color: var(--secondary-color) !important;
}
body.dark-mode .widget ul li a, body.dark-mode .mobile-nav a {
    color: #e0e0e0 !important;
}
body.dark-mode .widget ul li a:hover {
    color: var(--secondary-color) !important;
}

/* Comments System */
.comments-area {
	margin-top: 3rem;
}

.comment-list .comment {
	background: #fff;
	padding: 1.5rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

body.dark-mode .comment-list .comment {
	background: #1e1e1e;
	box-shadow: none;
}

.comment-list .children {
	list-style: none;
	margin-top: 1.5rem;
	padding-left: 2rem;
	border-left: 2px solid #eaeaea;
}

body.dark-mode .comment-list .children {
	border-color: #333;
}

.comment-author .avatar {
	float: left;
	margin-right: 1rem;
	border-radius: 50%;
}

.comment-meta {
	font-size: 0.85rem;
	color: #6c757d;
	margin-bottom: 1rem;
}

.reply a {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: bold;
	text-transform: uppercase;
	padding: 0.2rem 0.5rem;
	background: #f8f9fa;
	border-radius: 4px;
	color: var(--primary-color);
}

body.dark-mode .reply a {
	background: #2a2a2a;
}

.reply a:hover {
	background: var(--primary-color);
	color: #fff;
}
