/**
 * Modern Blog Template Styles
 * Extracted from modern-blog-template.php for better performance
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    position: relative;
}

/* Header/Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #C5A95E 0%, #B8975A 50%, #A68449 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #C5A95E 0%, #8B6914 100%);
    opacity: 0.25;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.blog-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.15;
    max-width: 900px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #C5A95E;
}

/* Main Content Area */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
    width: 100%;
}

.main-content {
    background: white;
    border-radius: 16px;
    padding: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-content {
    font-size: 18px;
    line-height: 1.9;
    color: #333;
    letter-spacing: 0.2px;
}

.blog-content h2 {
    font-size: 34px;
    margin: 48px 0 24px;
    color: #1a1a1a;
    font-weight: 700;
}

.blog-content h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #333;
}

.blog-content p {
    margin-bottom: 24px;
}

.blog-content ul {
    margin: 20px 0 20px 40px;
}

.blog-content li {
    margin-bottom: 10px;
}

.highlight-box {
    background: #faf8f5;
    border-left: 4px solid #C5A95E;
    padding: 24px;
    margin: 36px 0;
    border-radius: 8px;
}

.blog-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 30px 0;
}

/* Sticky Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.featured-homes {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.featured-homes h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #222;
}

.home-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    transition: transform 0.2s ease;
}

.home-card:hover {
    transform: translateX(5px);
}

.home-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.home-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.virtual-tour-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(197, 169, 94, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 15px;
    line-height: 1.2;
}

.home-price {
    font-size: 24px;
    font-weight: 700;
    color: #C5A95E;
    margin-bottom: 8px;
}

.home-details {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.home-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Property injection styles */
.property-injection {
    background: #faf8f5;
    border-radius: 12px;
    padding: 32px;
    margin: 48px 0;
    position: relative;
    width: 100%;
}

.property-injection h3,
.property-injection .section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 24px;
    text-align: center;
    color: #1a1a1a;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Mobile - 1 column */
@media (max-width: 640px) {
    .property-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hide-mobile {
        display: none !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* Tablet - hide third card */
@media (min-width: 641px) and (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
}

.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.property-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    position: relative;
}

.property-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card-address {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.property-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #C5A95E;
    margin-bottom: 12px;
}

.property-card-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

.view-all-properties {
    text-align: center;
}

.view-all-btn {
    display: inline-block;
    background: #C5A95E;
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #B8975A;
    transform: translateY(-2px);
}

.cta-box {
    background: linear-gradient(135deg, #C5A95E 0%, #B8975A 50%, #A68449 100%);
    color: white;
    padding: 28px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(197, 169, 94, 0.3);
}

.cta-box h4 {
    font-size: 20px;
    margin-bottom: 12px;
}

.cta-box p {
    margin-bottom: 16px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #C5A95E;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Related Articles Section */
.related-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.related-header {
    text-align: center;
    margin-bottom: 24px;
}

.related-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.related-header p {
    font-size: 16px;
    color: #666;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.article-content {
    padding: 16px;
}

.article-category {
    display: inline-block;
    background: #faf8f5;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #C5A95E;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 12px;
    color: #999;
}

/* Newsletter Section */
.newsletter-section {
    background: #f8f9fa;
    padding: 60px 20px;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h3 {
    font-size: 32px;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.newsletter-button {
    background: linear-gradient(135deg, #C5A95E 0%, #B8975A 50%, #A68449 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(197, 169, 94, 0.3);
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 169, 94, 0.4);
}

/* FAQ Section Styles */
.faq-section {
    margin-top: 24px;
    padding: 16px 20px;
    background: #faf8f5;
    border-radius: 8px;
    position: relative;
    margin-left: 0;
    margin-right: 0;
}

.faq-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #1a1a1a;
    text-align: center;
    font-weight: 600;
}

.faq-list {
    display: grid;
    gap: 8px;
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 2px solid #C5A95E;
}

.faq-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-question {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.25;
    display: flex;
    align-items: flex-start;
}

.faq-question:before {
    content: "Q";
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #C5A95E;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 9px;
    font-weight: 700;
    margin-right: 6px;
    flex-shrink: 0;
    margin-top: 1px;
}

.faq-answer {
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    margin-left: 22px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Sidebar always visible, stacked below main content on tablets/mobile */
    .sidebar {
        max-width: 100%;
        margin: 0 auto;
        display: block !important;
    }

    .blog-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 40px;
    }

    .blog-title {
        font-size: 28px;
    }

    .content-wrapper {
        padding: 40px 16px;
        gap: 40px;
    }

    .main-content {
        padding: 24px;
        margin: 0;
        border-radius: 12px;
        width: 100%;
    }

    /* Ensure sidebar is always visible on mobile */
    .sidebar {
        display: block !important;
        position: relative !important;
        top: auto !important;
        margin-top: 30px;
    }

    .blog-content {
        font-size: 16px;
    }

    .faq-section {
        margin-left: -24px;
        margin-right: -24px;
        padding: 12px 16px;
        border-radius: 0;
        margin-top: 20px;
    }

    .faq-section h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .faq-list {
        gap: 6px;
    }

    .faq-item {
        padding: 8px 12px;
    }

    .faq-question {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .faq-question:before {
        width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 8px;
        margin-right: 5px;
    }

    .faq-answer {
        font-size: 11px;
        margin-left: 19px;
        line-height: 1.3;
    }

    .property-injection {
        margin: 32px 16px;
        padding: 20px;
        width: auto;
    }

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

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .property-grid {
        grid-template-columns: 1fr;
    }

    .property-injection {
        padding: 12px;
        margin: 16px 12px;
        border-radius: 8px;
        width: auto;
    }

    .property-injection .section-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    .property-injection .property-card-image {
        height: 160px;
    }

    .property-injection .property-card-content {
        padding: 12px;
    }

    .property-injection .property-card-address {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .property-injection .property-card-price {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .property-injection .property-card-details {
        font-size: 12px;
        gap: 8px;
    }

    .property-injection .property-card-details span {
        gap: 2px;
    }
}

/* Pagination styles */
.property-pagination {
    text-align: center;
    margin: 20px 0;
}

.load-more-properties {
    background: #5e7ac5;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-properties:hover {
    background: #4a669e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 122, 197, 0.3);
}

.load-more-properties:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-properties .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
