/*
Theme Name: Next Child
Description: High-performance child theme with optimized layout
Template: generatepress
Version: 1.0.0
Author: AlienWeb
Author URI: https://alienweb.in
Text Domain: next-child
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #089ba1;
    --primary-dark: #06777a;
    --primary-light: #0abfc7;
    --bg-dark: #1a1a1a;
    --bg-darker: #121212;
    --bg-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #888888;
    --border-color: rgba(8, 155, 161, 0.3);
    --card-bg: rgba(255, 255, 255, 0.03);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 15px 35px rgba(8, 155, 161, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* Header Styles - FIXED with hide/show on scroll */
.site-header {
    background: #000000 !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: transform 0.3s ease;
    width: 100%;
}

.site-header.hidden {
    transform: translateY(-100%);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-branding h1 {
    margin: 0;
}

.site-branding a {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 300;
    text-decoration: none;
    transition: var(--transition);
}

.site-branding a:hover {
    color: var(--primary-color);
}

.site-branding .domain {
    color: var(--primary-color);
    font-weight: 400;
}

/* Desktop Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle - IMPROVED */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    transition: all 0.3s ease;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 4px;
    position: absolute;
    transition: transform 0.15s ease;
}

.hamburger-inner::before, .hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -10px;
    transition: top 0.3s ease, transform 0.3s ease;
}

.hamburger-inner::after {
    bottom: -10px;
    transition: bottom 0.3s ease, transform 0.3s ease;
}

/* Active hamburger state */
.mobile-menu-toggle.active .hamburger-inner {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Navigation - IMPROVED */
.mobile-navigation {
    display: none;
    background: #000000 !important;
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-navigation.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-navigation li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-navigation li:last-child {
    border-bottom: none;
}

.mobile-navigation a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.mobile-navigation a:hover {
    background: rgba(8, 155, 161, 0.2);
    color: var(--primary-color);
}

/* Skip to main content for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 6px;
}

.alien-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    position: relative;
    padding: 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.alien-content {
    text-align: center;
    max-width: 1400px;
    width: 100%;
    padding: 2rem 1rem;
}

.alien-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.alien-domain {
    color: var(--primary-color);
    font-weight: 400;
}

.alien-search-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 3rem;
    width: 100%;
}

.alien-search-box {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary) !important;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-weight: 400;
}

.alien-search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(8, 155, 161, 0.4), var(--shadow);
    background: rgba(0, 0, 0, 0.9) !important;
}

.alien-search-box::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.alien-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(8, 155, 161, 0.3);
}

.alien-search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    background: var(--primary-light);
    box-shadow: 0 6px 20px rgba(8, 155, 161, 0.4);
}

.alien-services {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
    transition: var(--transition);
}

.alien-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.alien-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(8, 155, 161, 0.1), transparent);
    transition: left 0.6s ease;
}

.alien-service:hover::before {
    left: 100%;
}

.alien-service:hover {
    background: rgba(8, 155, 161, 0.15);
    border-color: rgba(8, 155, 161, 0.5);
    transform: translateY(-8px) scale(1.02);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-hover);
}

.alien-service-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    filter: grayscale(0.3);
    transition: var(--transition);
    line-height: 1;
}

.alien-service:hover .alien-service-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.alien-service-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Sidebar - FIXED LAYOUT */
.alien-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(25px);
    z-index: 1002;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.alien-sidebar.active {
    left: 0;
}

.alien-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1;
}

.alien-sidebar-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.alien-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alien-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.alien-sidebar-links {
    padding: 1.5rem 0;
}

.alien-sidebar-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 4px solid transparent;
    font-size: 1rem;
    font-weight: 400;
}

.alien-sidebar-link:hover {
    background: rgba(8, 155, 161, 0.2);
    border-left-color: var(--primary-color);
    color: var(--text-primary);
    text-decoration: none;
    padding-left: 2rem;
}

/* Menu Button */
.alien-menu {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1001;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(8, 155, 161, 0.4);
}

.alien-menu:hover {
    transform: scale(1.1);
    background: var(--primary-light);
    box-shadow: 0 8px 25px rgba(8, 155, 161, 0.6);
}

.alien-menu-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Footer */
.alien-footer {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    margin-top: 3rem;
}

.alien-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.alien-footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    font-weight: 400;
}

.alien-footer-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Top Ad Section - Fixed */
.top-ad-section {
    width: 100%;
    background: rgba(8, 155, 161, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.top-ad-banner {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(8, 155, 161, 0.08);
    border: 2px dashed rgba(8, 155, 161, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    color: var(--primary-color);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    overflow: hidden;
}

/* Sidebar Ad */
.sidebar-ad {
    background: rgba(8, 155, 161, 0.08);
    border: 2px dashed rgba(8, 155, 161, 0.25);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:not(.home) {
    background: var(--bg-darker);
}

.site-content {
    background: var(--bg-darker);
    color: var(--text-secondary);
    padding-top: 80px; /* Account for fixed header */
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.content-area {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 80% 20%;
    gap: 2rem;
    align-items: start;
    width: 100%;
}

.main-content {
    width: 100%;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    order: 1;
}

.sidebar {
    order: 2;
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(8, 155, 161, 0.3);
}

.sidebar-posts {
    list-style: none;
    padding: 0;
}

.sidebar-posts li {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.3;
}

.sidebar-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-posts a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.3;
    display: block;
    font-weight: 500;
    transition: color 0.3s ease;
}

.sidebar-posts a:hover {
    color: var(--primary-color);
}

/* IMPROVED Search Results & Blog Grid */
.search-page-wrapper,
.blog-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    color: var(--primary-color) !important;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.search-query {
    color: var(--primary-color);
}

.search-count {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* WIDER SINGLE COLUMN FOR SEARCH RESULTS */
.search-page-wrapper .posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
}

.search-page-wrapper .post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: auto;
    display: flex;
    flex-direction: row;
    cursor: pointer;
    position: relative;
    width: 100%;
    min-height: 200px;
}

.search-page-wrapper .post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(8, 155, 161, 0.4);
}

.search-page-wrapper .post-thumbnail {
    position: relative;
    overflow: hidden;
    width: 300px;
    height: auto;
    flex-shrink: 0;
}

.search-page-wrapper .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-page-wrapper .post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.search-page-wrapper .post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.search-page-wrapper .post-title {
    margin-bottom: 1rem;
}

.search-page-wrapper .post-title a {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    display: block;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-page-wrapper .post-title a:hover {
    color: var(--primary-light) !important;
    text-decoration: none;
}

.search-page-wrapper .post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-page-wrapper .read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.search-page-wrapper .read-more:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* REGULAR POSTS GRID - COMPACT HEIGHT */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 320px; /* Reduced height for compact layout */
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(8, 155, 161, 0.4);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 160px; /* Reduced image height */
    flex-shrink: 0;
    width: 100%;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.2rem; /* Reduced padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.post-title {
    margin-bottom: 0.8rem;
}

.post-title a {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-size: 1rem; /* Smaller title */
    font-weight: 700;
    line-height: 1.3;
    display: block;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em; /* Reduced min-height */
}

.post-title a:hover {
    color: var(--primary-light) !important;
    text-decoration: none;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.8rem; /* Smaller meta text */
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller read more */
    transition: var(--transition);
    margin-top: 0.5rem;
    display: inline-block;
}

.read-more:hover {
    color: var(--primary-light);
    text-decoration: none;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-results h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* IMPROVED PAGINATION - Horizontal and Compact */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 40px;
    height: 40px;
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-numbers:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-numbers.dots {
    background: transparent;
    border: none;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
    transform: none;
}

/* Latest Posts on Homepage - 3 COLUMN WITH 12 POSTS */
.alien-posts {
    margin-top: 4rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.alien-posts h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 1.5rem;
    width: 100%;
}

.post-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    height: 320px; /* Compact height */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(8, 155, 161, 0.4);
}

.post-thumb {
    position: relative;
    overflow: hidden;
    height: 160px; /* Reduced image height */
    flex-shrink: 0;
    width: 100%;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumb img {
    transform: scale(1.05);
}

.post-info {
    padding: 1.2rem; /* Reduced padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.post-title-home {
    color: var(--primary-color) !important;
    font-size: 1rem; /* Smaller title */
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em; /* Reduced min-height */
}

.post-meta-home {
    color: var(--text-muted);
    font-size: 0.8rem; /* Smaller meta text */
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
}

.post-meta-home span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.read-more-home {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller read more */
    transition: var(--transition);
    margin-top: 0.5rem;
    display: inline-block;
}

.read-more-home:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    z-index: 99;
    box-shadow: 0 4px 15px rgba(8, 155, 161, 0.4);
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(8, 155, 161, 0.6);
}

/* Single Post Content Fix - FULL WIDTH */
.entry-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.entry-content img,
.entry-content iframe,
.entry-content video {
    max-width: 100%;
    height: auto;
}

/* SMALLER HEADER SIZES FOR POST CONTENT */
.entry-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.entry-content h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.entry-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--primary-color);
}

.entry-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.entry-content h5 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--primary-color);
}

.entry-content h6 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

/* Apply primary color to all headers and links */
h1, h2, h3, h4, h5, h6,
.entry-title,
.post-title a,
.post-title-home,
.alien-sidebar-title,
.page-title,
.sidebar h3 {
    color: var(--primary-color) !important;
}

a {
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* RESPONSIVE DESIGN - IMPROVED FOR FULL SPACE USAGE */
@media (min-width: 768px) {
    .alien-container {
        padding: 2rem;
    }
    
    .alien-content {
        padding: 3rem 2rem;
    }
    
    .alien-services {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .alien-sidebar {
        left: -350px;
        width: 350px;
    }
    
    .alien-menu {
        top: 2rem;
        left: 2rem;
        width: 60px;
        height: 60px;
    }
    
    .alien-menu-icon {
        width: 28px;
        height: 28px;
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .posts-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Search results single column layout for desktop */
    .search-page-wrapper .post-card {
        flex-direction: row;
        height: 200px;
    }
    
    .search-page-wrapper .post-thumbnail {
        width: 300px;
        height: 100%;
    }
}

@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-area {
        grid-template-columns: 70% 30%;
    }
}

@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content {
        order: 1;
    }
    
    .sidebar {
        order: 2;
        position: static;
        top: auto;
    }
    
    .alien-services {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Search results responsive */
    .search-page-wrapper .post-card {
        flex-direction: column;
        height: auto;
    }
    
    .search-page-wrapper .post-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Menu for Smaller Screens - FIXED */
@media (max-width: 767px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }
    
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }
    
    .site-branding {
        order: 1;
        flex: 1;
    }
    
    .alien-sidebar-header {
        padding: 1.5rem 1rem;
    }
    
    .alien-sidebar-link {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .alien-sidebar-link:hover {
        padding-left: 1.5rem;
    }
    
    .alien-footer-links {
        gap: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .site-header {
        padding: 0.5rem 0;
    }
    
    .site-content {
        padding-top: 70px; /* Adjusted for mobile header */
    }
    
    /* Single column for all grids on mobile */
    .posts-grid,
    .posts-list,
    .search-page-wrapper .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Adjust post heights for mobile */
    .post-card,
    .post-item {
        height: auto;
        min-height: 280px;
    }
    
    .post-thumbnail,
    .post-thumb {
        height: 180px;
    }
    
    .search-page-wrapper .post-card {
        height: auto;
    }
    
    .search-page-wrapper .post-thumbnail {
        height: 180px;
        width: 100%;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .site-content,
    .content-area,
    .main-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0 1rem;
    }
    
    .content-area {
        padding: 0;
    }
    
    /* Smaller headers on mobile */
    .entry-content h1 {
        font-size: 1.6rem;
    }
    
    .entry-content h2 {
        font-size: 1.4rem;
    }
    
    .entry-content h3 {
        font-size: 1.3rem;
    }
    
    .entry-content h4 {
        font-size: 1.2rem;
    }
    
    .entry-content h5 {
        font-size: 1.1rem;
    }
    
    .entry-content h6 {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-list {
        grid-template-columns: 1fr;
    }
    
    .search-page-wrapper {
        padding: 1rem 0;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .content-area {
        padding: 0;
    }
    
    .site-content {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    .alien-services {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .alien-service {
        padding: 1.2rem 0.8rem;
    }
    
    .alien-service-icon {
        font-size: 1.8rem;
    }
    
    .alien-service-name {
        font-size: 0.8rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .alien-footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    /* Single column for services on very small screens */
    @media (max-width: 360px) {
        .alien-services {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

/* PERFORMANCE: Lazy loading for images */
img {
    loading: lazy;
}

/* Remove render-blocking CSS */
.alien-container {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}