/*
Theme Name: Cyber Nebula
Description: Professional tech blog theme with clean design and ad support
Version: 2.0
Author: Cyber Nebula Team
*/

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --border-dark: #374151;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
    --card-padding: 1.5rem;
    --border-radius: 8px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Container */
.container {
    max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.site-logo img {
    height: 32px;
    width: auto;
}

.site-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.site-description {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: -0.25rem;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Search */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-field {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    min-width: 160px;
}

.search-submit {
    padding: 0.375rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-xs);
    transition: background-color 0.2s ease;
}

.search-submit:hover {
    background: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8) 0%, rgba(30, 64, 175, 0.8) 100%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-slide .hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
}

.hero-slide .hero-content h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease-out;
}

.hero-slide .hero-content p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-slide .cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInUp 1s ease-out 0.4s both;
}

.hero-slide .cta-button:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Dynamic Slider Elements */
.hero-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 1s ease-out 0.1s both;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-sm);
    opacity: 0.9;
    animation: slideInUp 1s ease-out 0.3s both;
}

.hero-date,
.hero-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-date::before {
    content: '📅';
    font-size: 0.875rem;
}

.hero-read-time::before {
    content: '⏱️';
    font-size: 0.875rem;
}

/* Fallback image styles */
.hero-slide[style*="hero-fallback.jpg"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.hero-slide[style*="hero-fallback.jpg"]::before {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* Hero Navigation */
.hero-nav-next,
.hero-nav-prev {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px !important;
    height: 50px !important;
    margin-top: -25px !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-nav-next:hover,
.hero-nav-prev:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hero-nav-next::after,
.hero-nav-prev::after {
    font-size: 18px !important;
    font-weight: bold;
}

/* Hero Pagination */
.hero-pagination {
    bottom: 30px !important;
}

.hero-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.hero-pagination .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Hero Slider */
@media (max-width: 1024px) {
    .hero-slider-section {
        height: 550px;
    }
}

@media (max-width: 768px) {
    .hero-slider-section {
        height: 450px;
    }
    
    .hero-slide .hero-content h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero-slide .hero-content p {
        font-size: var(--font-size-base);
    }
    
    .hero-slide .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: var(--font-size-sm);
    }
    
    .hero-category {
        padding: 0.375rem 0.75rem;
        font-size: var(--font-size-xs);
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .hero-nav-next,
    .hero-nav-prev {
        width: 40px !important;
        height: 40px !important;
        margin-top: -20px !important;
    }
    
    .hero-nav-next::after,
    .hero-nav-prev::after {
        font-size: 14px !important;
    }
    
    .hero-pagination {
        bottom: 20px !important;
    }
    
    .hero-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .hero-slider-section {
        height: 400px;
    }
    
    .hero-slide .hero-content {
        padding: 1rem;
    }
    
    .hero-slide .hero-content h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-slide .hero-content p {
        font-size: var(--font-size-sm);
        margin-bottom: 1.5rem;
    }
    
    .hero-category {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .hero-meta {
        font-size: var(--font-size-xs);
    }
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.main-content-area {
    min-height: 400px;
}

/* Featured Posts Section */
.featured-posts-section {
    margin-bottom: 3rem;
}

/* Inline Ad Container */
.inline-ad-container {
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
}

.inline-ad-container .content-ad {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

/* Sidebar Ad Containers */
.sidebar-ad-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.sidebar-ad-container .header-ad,
.sidebar-ad-container .sidebar-ad {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.sidebar-ad-container.top-ad {
    margin-top: 0;
}

.sidebar-ad-container.bottom-ad {
    margin-bottom: 0;
}

.hero-content h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
  font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Main Content */
.main-content {
    padding: var(--section-padding);
}

.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Posts Grid */
.posts-grid {
  display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
  overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: var(--card-padding);
}

.post-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.read-more:hover {
    text-decoration: underline;
}

/* Latest News Section */
.latest-news {
    margin-bottom: 3rem;
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: var(--bg-primary);
    margin-bottom: 1rem;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.news-thumbnail {
    width: 120px;
    height: 80px;
    border-radius: var(--border-radius);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.news-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-secondary);
    padding: var(--card-padding);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.popular-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.popular-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.popular-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.popular-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.popular-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-title a:hover {
    color: var(--primary-color);
}

.popular-date {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Categories */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
}

.category-list a:hover {
    color: var(--primary-color);
}

/* Newsletter */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
}

.newsletter-button {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.newsletter-button:hover {
    background: var(--secondary-color);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
  margin-bottom: 1rem;
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #d1d5db;
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: var(--font-size-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 0;
    }
    
    .main-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content-area {
        order: 1;
        min-height: auto;
    }
    
    .inline-ad-container {
        margin: 2rem 0;
        padding: 1rem;
    }
    
    .sidebar-ad-container {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .news-item {
        padding: 1.25rem;
    }
    
    .news-thumbnail {
        width: 100px;
        height: 70px;
    }
    
    .popular-item {
        padding: 0.875rem;
    }
    
    .popular-thumbnail {
        width: 55px;
        height: 55px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .news-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .news-thumbnail {
        width: 100%;
        height: 200px;
        align-self: center;
    }
    
    .news-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .news-content {
        width: 100%;
    }
    
    .news-item {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .popular-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .popular-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .hero-content h1 {
        font-size: var(--font-size-3xl);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .site-title {
        font-size: var(--font-size-lg);
    }
    
    .search-field {
        min-width: 120px;
    }
}
