/**
 * CSS Improvements & Bug Fixes
 * Add this to the end of style.css or as a separate enqueued file
 * 
 * Fixes:
 * - Pricing section background (cleaner look)
 * - Footer logo always light
 * - Mobile optimizations
 * - Blog template styling
 * - Lazy loading support
 */

/* ========================================
   BUG FIX: Pricing Section Background
   ======================================== */

/* Remove beige background, use clean white/dark bg */
.section-soft {
    background-color: var(--bg) !important;
    padding: 80px 0;
}

/* Add subtle top border instead */
.section-soft {
    border-top: 1px solid var(--border);
}

/* ========================================
   BUG FIX: Powered By Logos Visibility
   ======================================== */

/* CRITICAL FIX: Make logos fully visible in light theme */
.powered-track img {
    filter: grayscale(100%) brightness(0) !important;
    opacity: 1 !important;
}

.powered-track img:hover {
    filter: none !important;
    opacity: 1 !important;
}

/* Dark theme - keep white */
[data-theme="dark"] .powered-track img {
    filter: brightness(0) invert(1) !important;
    opacity: 0.7 !important;
}

[data-theme="dark"] .powered-track img:hover {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--brand-orange);
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumbs a:hover {
    opacity: 0.7;
}

.breadcrumb-separator {
    color: var(--text);
    opacity: 0.5;
    margin: 0 0.5rem;
}

.breadcrumb-current {
    color: var(--text);
    opacity: 0.7;
}

/* ========================================
   LOCAL FONTS - Self-hosted for performance & GDPR
   ======================================== */

/* Note: For production, download fonts from Google Fonts and place in /assets/fonts/
   This example shows how to use them. Actual font files not included to keep package small.
   Instructions in FONTS-SETUP.md */

/* ========================================
   SEARCH FUNCTIONALITY
   ======================================== */

.search-form {
    display: flex;
    gap: 0;
    max-width: 500px;
    margin: 0 auto;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-field {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-field:focus {
    border-color: var(--brand-orange);
}

.search-submit {
    padding: 12px 24px;
    background: var(--brand-orange);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit:hover {
    background: var(--brand-dark-orange);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Search Results Page */
.search-results-page {
    max-width: 900px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border);
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.search-header h1 span {
    color: var(--brand-orange);
}

.search-count {
    opacity: 0.7;
    font-size: 0.95rem;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.search-result-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.search-result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-orange);
}

.result-thumbnail {
    flex-shrink: 0;
    width: 200px;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    padding: 20px;
    flex: 1;
}

.result-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

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

.result-title a:hover {
    color: var(--brand-orange);
}

.result-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.result-meta i {
    margin-right: 5px;
}

.result-excerpt {
    margin-bottom: 15px;
    line-height: 1.6;
}

.result-link {
    color: var(--brand-orange);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.result-link:hover {
    gap: 10px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.search-again {
    margin-top: 30px;
}

.helpful-links {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.helpful-links ul {
    list-style: none;
    padding: 0;
}

.helpful-links li {
    margin: 10px 0;
}

.helpful-links a {
    color: var(--brand-orange);
    text-decoration: none;
}

.helpful-links a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
    }
    
    .result-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

.breadcrumbs a {
    color: var(--brand-orange);
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumbs a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text);
}

.breadcrumbs i {
    margin: 0 0.5rem;
}

/* Breadcrumbs in pages */
.page .breadcrumbs,
.single .breadcrumbs,
.archive .breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
}

/* ========================================
   ENHANCEMENT: Dedicated Server Section
   ======================================== */

.dedicated-bar {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-dark-orange) 100%);
    padding: 50px 40px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    box-shadow: 0 10px 40px rgba(230, 126, 34, 0.3);
}

.dedicated-icon {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dedicated-content {
    flex: 1;
    min-width: 250px;
}

.dedicated-content h2,
.dedicated-content p {
    color: white;
    margin: 0;
}

.dedicated-content h2 {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .dedicated-bar {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }
    
    .dedicated-icon {
        font-size: 3rem;
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

/* Better mobile menu */
@media (max-width: 992px) {
    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--card-bg);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding: 80px 30px 30px;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .main-menu.active {
        right: 0;
    }
    
    .main-menu ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-menu a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border);
    }
    
    /* Mobile menu backdrop */
    .main-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 300px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Responsive pricing cards */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .card.popular {
        transform: scale(1) !important;
    }
    
    .card:hover {
        transform: translateY(-5px);
    }
}

/* Responsive hero slider */
@media (max-width: 768px) {
    .swiper {
        height: 500px;
    }
    
    .slide-content h1 {
        font-size: 2rem !important;
    }
    
    .slide-content p {
        font-size: 1.1rem !important;
    }
}

/* Responsive feature grid */
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   BLOG TEMPLATES STYLING
   ======================================== */

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.entry-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text);
    opacity: 0.7;
    font-size: 0.9rem;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.entry-content img {
    border-radius: 8px;
    margin: 30px 0;
}

.entry-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.tags-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.tags-links a {
    background: var(--bg-soft-orange);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--brand-orange);
}

.tags-links a:hover {
    background: var(--brand-orange);
    color: white;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.post-navigation a {
    flex: 1;
    padding: 15px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    border-color: var(--brand-orange);
    transform: translateY(-2px);
}

/* Archive Page */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border);
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.archive-description {
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

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

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-orange);
}

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

.post-card .post-content {
    padding: 20px;
}

.post-card .entry-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-card .entry-title a {
    color: var(--text);
}

.post-card .entry-title a:hover {
    color: var(--brand-orange);
}

.post-card .entry-excerpt {
    opacity: 0.8;
    margin: 15px 0;
    line-height: 1.6;
}

.post-card .read-more {
    color: var(--brand-orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-card .read-more:hover {
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.pagination a:hover,
.pagination .current {
    background: var(--brand-orange);
    color: white;
    border-color: var(--brand-orange);
}

/* ========================================
   IMAGE OPTIMIZATIONS
   ======================================== */

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Responsive images */
img {
    height: auto;
}

.wp-post-image {
    width: 100%;
    height: auto;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-orange);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}

/* Focus states */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--brand-orange);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    header,
    footer,
    .promo-bar,
    .whatsapp-float,
    .gdpr-banner,
    .mobile-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .entry-content {
        font-size: 12pt;
    }
}

/* Feature Emoji Icons */
.feature-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1;
}
