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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation - Optimized */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    will-change: transform;
    transform: translateZ(0);
    contain: layout style;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #0056b3;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-hero p {
    font-size: 1.1rem;
}

/* Search Bar */
.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
}

.search-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    margin: 0 10px;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Blog Posts */
.blog-posts {
    padding: 80px 0;
    background: white;
}

.blog-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.post-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.placeholder-image {
    font-size: 3rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.post-card:hover .placeholder-image {
    transform: scale(1.1);
}

.placeholder-image svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: filter 0.3s ease;
}

.post-card:hover .placeholder-image svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.post-content {
    padding: 25px;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

.post-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #888;
}

.post-category {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.read-more {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #0056b3;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* Ad Placeholders */
.ad-placeholder {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 5px;
    color: #6c757d;
    font-weight: 500;
}

.banner-ad {
    height: 100px;
    margin: 20px auto;
    max-width: 728px;
}

.content-ad {
    height: 200px;
    margin: 30px 0;
}

.sidebar-ad {
    height: 300px;
    margin: 20px 0;
}

.bottom-ad {
    height: 150px;
    margin: 40px 0;
}

/* Blog Post Layout */
.blog-post {
    background: white;
    padding: 40px 0;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 40px;
}

.post-header {
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 30px 0 20px 0;
}

.post-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 25px 0 15px 0;
}

.post-content h4 {
    font-size: 1.2rem;
    color: #333;
    margin: 20px 0 10px 0;
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content-full {
    grid-column: 1 / -1;
}

/* Sidebar */
.post-sidebar {
    background: #f8f9fa;
    padding: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.table-of-contents {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-of-contents h3 {
    margin-bottom: 15px;
    color: #333;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: #0056b3;
}

/* FAQ Section */
.faq-section {
    margin: 40px 0;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.faq-toggle {
    font-size: 1.5rem;
    color: #007bff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height, padding;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 200px;
}

/* About Page */
.about-content {
    padding: 60px 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.about-main h2 {
    font-size: 2rem;
    color: #333;
    margin: 30px 0 20px 0;
}

.about-main p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.feature-list, .approach-list {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.feature-list li, .approach-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:last-child, .approach-list li:last-child {
    border-bottom: none;
}

.audience-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.audience-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.audience-card h3 {
    color: #007bff;
    margin-bottom: 15px;
}

.stats-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
}

.stat-item {
    margin: 20px 0;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.cta-card {
    background: #007bff;
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.cta-card h3 {
    margin-bottom: 15px;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #007bff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #f8f9fa;
    transform: translate3d(0, -2px, 0);
}

/* Contact Page */
.contact-content {
    padding: 60px 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.submit-btn {
    background: #007bff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #0056b3;
}

.contact-methods {
    margin: 30px 0;
}

.contact-method {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.contact-method h3 {
    margin-bottom: 10px;
    color: #333;
}

.contact-method a {
    color: #007bff;
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

.browse-link {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.browse-link:hover {
    background: #0056b3;
}

.faq-preview {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.faq-preview h3 {
    margin-bottom: 20px;
    color: #333;
}

.faq-preview .faq-item {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: none;
}

.faq-preview .faq-item h4 {
    color: #007bff;
    margin-bottom: 10px;
}

.faq-preview .faq-item p {
    color: #666;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.modal-btn:hover {
    background: #0056b3;
}

/* Privacy Page */
.privacy-content {
    padding: 60px 0;
    background: white;
}

.privacy-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.privacy-main h2 {
    font-size: 2rem;
    color: #333;
    margin: 30px 0 20px 0;
}

.privacy-main h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 25px 0 15px 0;
}

.privacy-main p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.privacy-main ul {
    margin: 20px 0;
    padding-left: 30px;
}

.privacy-main li {
    margin-bottom: 8px;
}

.privacy-nav {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.privacy-nav h3 {
    margin-bottom: 15px;
    color: #333;
}

.privacy-nav ul {
    list-style: none;
}

.privacy-nav li {
    margin-bottom: 8px;
}

.privacy-nav a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-nav a:hover {
    color: #0056b3;
}

.privacy-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.privacy-summary h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Post Navigation */
.post-navigation {
    margin: 40px 0;
    text-align: center;
}

.nav-button {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: #0056b3;
    transform: translate3d(0, -2px, 0);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 50px 0 20px 0;
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 20px;
    color: #fff;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Animations - Hardware Accelerated */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Performance Optimizations */
* {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Hardware acceleration for smooth animations */
.post-card,
.nav-link,
.read-more,
.submit-btn,
.cta-button,
.nav-button,
.modal-btn,
.browse-link,
.hamburger,
.nav-menu,
.faq-question,
.modal {
    will-change: transform;
    transform: translateZ(0);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Reduce layout thrashing */
.container {
    contain: layout style;
}

/* Optimize images and placeholders */
.placeholder-image,
.post-image {
    contain: layout;
    transform: translateZ(0);
}

/* Optimize transitions */
.post-card {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
    transition: color 0.2s ease;
}

.read-more, .submit-btn, .cta-button, .nav-button, .modal-btn, .browse-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-content-full {
        grid-column: 1;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .privacy-layout {
        grid-template-columns: 1fr;
    }

    .audience-cards {
        grid-template-columns: 1fr;
    }

    .search-container {
        max-width: 100%;
        margin: 0 20px;
    }

    .container {
        padding: 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 25px;
    }

    .modal-content {
        width: 90%;
        margin: 25% auto;
        padding: 20px;
    }

    .banner-ad {
        height: 80px;
    }
}
