/* =========================
   GLOBAL STYLES
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: #333;
    background: #fffaf7;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* =========================
  HERO
========================= */
.hero {
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a0f07 0%, #3d1f0d 50%, #5a3018 100%);
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background: url("https://res.cloudinary.com/ddlx5lxjg/image/upload/v1783671174/when-you-cast-the-spell_njckub.jpg") center/cover no-repeat;
    z-index: 0;
    filter: brightness(0.5) saturate(1.2);
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    max-width: 800px;
    animation: fadeUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: #b88645;
    color: white;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
}

.btn:hover {
    background: #8b5e3c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 94, 60, 0.4);
}

/* =========================
  BLOG SECTION
========================= */
.blog-section {
    padding: 80px 0 100px;
    background: #fffaf7;
}

.blog-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 50px;
    align-items: start;
}

/* =========================
  BLOG FILTERS
========================= */
.blog-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e0d5c5;
    background: white;
    color: #5a3b28;
    border-radius: 30px;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #b88645;
    color: #b88645;
    background: #fefbf6;
}

.filter-btn.active {
    background: #b88645;
    color: white;
    border-color: #b88645;
    box-shadow: 0 4px 12px rgba(184, 134, 69, 0.3);
}

.blog-search-bar {
    width: 100%;
    max-width: 400px;
}

.blog-search-bar .search {
    display: flex;
    border: 2px solid #e0d5c5;
    border-radius: 30px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s;
}

.blog-search-bar .search:focus-within {
    border-color: #b88645;
}

.blog-search-bar .search input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    background: transparent;
}

.blog-search-bar .search button {
    width: 48px;
    border: none;
    background: #b88645;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-bar .search button:hover {
    background: #8b5e3c;
}

/* =========================
  BLOG GRID
========================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: -1;
    }
}

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

/* =========================
  BLOG CARD
========================= */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(139, 94, 60, 0.15);
    border-color: rgba(184, 134, 69, 0.2);
}

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-image-wrapper {
    overflow: hidden;
    position: relative;
}

.blog-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #b88645;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(184, 134, 69, 0.3);
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
    font-family: "Poppins", sans-serif;
}

.blog-card-meta i {
    color: #b88645;
    margin-right: 4px;
}

.blog-card-title {
    font-size: 1.15rem;
    color: #5a3b28;
    margin-bottom: 10px;
    line-height: 1.3;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
    color: #8b5e3c;
}

.blog-card-excerpt {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b88645;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: "Poppins", sans-serif;
    transition: all 0.3s;
    margin-top: auto;
}

.blog-card-read-more:hover {
    color: #8b5e3c;
    gap: 10px;
}

.blog-card-read-more i {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.blog-card:hover .blog-card-read-more i {
    transform: translateX(4px);
}

/* =========================
  SINGLE BLOG POST
========================= */
#blog-post-view {
    animation: fadeIn 0.4s ease;
}

#blog-post-view .back-to-blogs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b88645;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 20px;
    cursor: pointer;
    padding: 8px 0;
    border: none;
    background: none;
    font-family: "Poppins", sans-serif;
    transition: color 0.3s;
}

#blog-post-view .back-to-blogs:hover {
    color: #8b5e3c;
}

.single-post-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

.single-post-category-badge {
    display: inline-block;
    background: #b88645;
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.single-post-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #5a3b28;
    margin-bottom: 15px;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-post-meta i {
    color: #b88645;
}

.single-post-content {
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 30px;
}

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

.single-post-content h3 {
    font-size: 1.6rem;
    color: #5a3b28;
    margin: 30px 0 15px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}

/* =========================
  SHARE BUTTONS
========================= */
.share-box {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 25px;
    margin-bottom: 40px;
}

.share-box h4 {
    font-size: 1.2rem;
    color: #5a3b28;
    margin-bottom: 15px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}

.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.social-icon-btn:hover {
    transform: translateY(-4px);
}

.social-icon-btn.facebook { background: #1877f2; }
.social-icon-btn.twitter { background: #1da1f2; }
.social-icon-btn.instagram { background: #e4405f; }
.social-icon-btn.whatsapp { background: #25d366; }
.social-icon-btn.linkedin { background: #0a66c2; }
.social-icon-btn.email { background: #888; }

/* =========================
  POST NAVIGATION
========================= */
.post-navigation {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.post-nav-btn {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    font-family: "Poppins", sans-serif;
}

.post-nav-btn:hover {
    border-color: #b88645;
    box-shadow: 0 8px 25px rgba(184, 134, 69, 0.1);
    transform: translateY(-2px);
}

.post-nav-btn .nav-direction {
    font-size: 0.8rem;
    color: #b88645;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 500;
}

.post-nav-btn .nav-title {
    font-size: 1rem;
    color: #5a3b28;
    font-weight: 600;
    font-family: "Cormorant Garamond", serif;
}

/* =========================
  SIDEBAR
========================= */
.sidebar-box {
    background: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.sidebar-box h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #5a3b28;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
}

.sidebar-box h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #b88645;
    border-radius: 2px;
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    padding: 10px 0;
    border-bottom: 1px solid #f0ebe4;
}

.sidebar-box li:last-child {
    border-bottom: none;
}

.sidebar-box a {
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s;
    display: block;
}

.sidebar-box a:hover {
    color: #b88645;
}

.sidebar-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 8px;
    border-radius: 10px;
}

.sidebar-post-item:hover {
    background: #fefbf6;
    transform: translateX(4px);
}

.sidebar-post-item:last-child {
    margin-bottom: 0;
}

.sidebar-post-item img {
    width: 70px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-post-item-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-post-item-title {
    font-size: 0.85rem;
    color: #5a3b28;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.sidebar-post-item:hover .sidebar-post-item-title {
    color: #b88645;
}

.sidebar-post-item-date {
    font-size: 0.75rem;
    color: #aaa;
}

.search {
    display: flex;
}

.sidebar-box .search input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e8e0d8;
    outline: none;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    background: #fefbf6;
    border-radius: 8px 0 0 8px;
    border-right: none;
    transition: border-color 0.3s;
}

.sidebar-box .search input:focus {
    border-color: #b88645;
}

.sidebar-box .search button {
    width: 48px;
    border: none;
    background: #b88645;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-box .search button:hover {
    background: #8b5e3c;
}

/* =========================
  RELATED ARTICLES
========================= */
.related-articles-section {
    background: #f5efe6;
}

.related-heading {
    text-align: center;
    font-size: 2.2rem;
    color: #5a3b28;
    margin-bottom: 40px;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .single-post-featured-image {
        height: 300px;
    }
}

/* =========================
  CTA
========================= */
.cta {
    padding: 90px 20px;
    text-align: center;
    background: linear-gradient(135deg, #8b5e3c, #b88645);
    color: white;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-family: "Cormorant Garamond", serif;
}

/* =========================
  FOOTER
========================= */
.footer {
    background: #211510;
    color: white;
    padding: 70px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer h3,
.footer h4 {
    margin-bottom: 15px;
}

.footer a {
    display: block;
    margin-bottom: 10px;
    color: #ddd;
    transition: color 0.3s;
}

.footer a:hover {
    color: #b88645;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* =========================
  ANIMATIONS
========================= */
.hero-content {
    animation: fadeUp 1s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.blog-card {
    animation: fadeInCard 0.5s ease forwards;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
.page-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0d5c5;
    border-top-color: #b88645;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No results state */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.no-results i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    color: #ddd;
}

.no-results h3 {
    font-size: 1.4rem;
    color: #5a3b28;
    margin-bottom: 10px;
}

/* Newsletter feedback */
.newsletter-feedback {
    font-size: 0.85rem;
    margin-top: 8px;
    color: #25d366;
    display: none;
}

.newsletter-feedback.error {
    color: #e74c3c;
}

/* =========================
  RESPONSIVE
========================= */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: -1;
    }
    .sidebar-box {
        margin-bottom: 20px;
    }
    .blog-section {
        padding: 50px 0 70px;
    }
    .hero {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 350px;
    }

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

    .hero p {
        font-size: 0.95rem;
    }

    .blog-section {
        padding: 40px 0 60px;
    }

    .container {
        width: 95%;
    }

    .single-post-featured-image {
        height: 250px;
    }

    .single-post-title {
        font-size: 1.6rem;
    }

    .share-box h4 {
        font-size: 1rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-nav-btn {
        min-width: auto;
    }

    .cta h2 {
        font-size: 1.8rem;
    }
}
