/*
Theme Name: Blogma
Theme URI: https://example.com/blogma
Author: abdelaziz achatbi
Description: A modern, high-performance, premium WordPress theme for travel blogs (focusing on North Africa).
Version: 1.1.0
Text Domain: blogma
*/

:root {
    /* Color Palette - Premium North Africa Inspired */
    --color-primary: #D35400;
    /* Rich Terracotta */
    --color-primary-hover: #E67E22;
    --color-secondary: #1F3A4B;
    /* Deep Mediterranean Navy */

    --color-text-main: #1A1A1A;
    /* Near Black */
    --color-text-muted: #6B7280;

    --color-bg-body: #FDFBF7;
    /* Luxurious warm off-white */
    --color-bg-card: #FFFFFF;
    --color-bg-sand: #F4EBE1;

    --color-border: #E5E7EB;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 25px 35px -5px rgba(0, 0, 0, 0.1), 0 15px 15px -5px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

html {
    overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(211, 84, 0, 0.39);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
}

.btn-white {
    background: white;
    color: var(--color-secondary);
    border: none;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.08);
}

.btn-white:hover {
    background: #fafafa;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Pagination Styling */
.pagination-wrapper {
    margin-top: 4rem;
    text-align: center;
    width: 100%;
}

.pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

.nav-links {
    display: inline-flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 4px;
    background: white;
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.nav-links .page-numbers:hover {
    background: var(--color-bg-sand);
    border-color: var(--color-text-muted);
}

.nav-links .page-numbers.current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.nav-links .dots {
    border: none;
    background: transparent;
    pointer-events: none;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg-body);
}

.site-main {
    flex-grow: 1;
}

/* -------------------------------------- */
/* HEADER & MEGA MENU                     */
/* -------------------------------------- */
.site-header {
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
    margin: 0;
}

.site-title a {
    color: var(--color-secondary);
}

.premium-menu {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    align-items: center;
}

.premium-menu>li>a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0;
    position: relative;
}

.premium-menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-smooth);
}

.premium-menu>li:hover>a::after {
    width: 100%;
}

/* Mega Menu Core */
.has-mega-menu {
    position: static;
    /* Let dropdown span full width */
}

.mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    z-index: 999;
    padding: var(--spacing-lg) 0;
}

.has-mega-menu:hover .mega-menu-wrapper {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega Menu Content */
.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.mega-title {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-bg-sand);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.mega-title a {
    color: var(--color-secondary);
}

.mega-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mega-post-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: var(--transition-smooth);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.mega-post-card:hover {
    background: var(--color-bg-sand);
}

.mega-img-link {
    flex: 0 0 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

.mega-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.mega-post-card:hover .mega-img-link img {
    transform: scale(1.1);
}

.fallback-img {
    background: var(--color-border);
}

.mega-post-content h4 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    font-family: var(--font-body);
    font-weight: 600;
}

.mega-post-content a {
    color: var(--color-text-main);
}

.mega-empty {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.menu-toggle {
    display: none;
}

/* -------------------------------------- */
/* FRONT PAGE - PREMIUM HERO              */
/* -------------------------------------- */
.hero-section {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--color-bg-sand) 0%, #FFFFFF 100%);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--color-primary);
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    position: relative;
}

.hero-images .img-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}

.hero-images .img-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.hero-images .img-card-1 {
    transform: translateY(2rem);
}

.hero-images .img-card-2 {
    transform: translateY(-2rem);
}

.hero-images img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* -------------------------------------- */
/* GRIDS & CARDS (Premium Feel)           */
/* -------------------------------------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--color-secondary);
}

.view-all {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 2px;
}

.destinations-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-sand);
}

.latest-stories-section {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-sand);
    position: relative;
    overflow: hidden;
}

/* Abstract Background Objects */
.latest-stories-section::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.latest-stories-section::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--color-secondary) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.destinations-swiper {
    width: 100%;
    padding-bottom: 3rem !important; /* space for pagination and shadows */
    overflow: hidden;
}

.destinations-swiper .swiper-slide {
    height: auto; /* To make cards equal height if needed */
}

.destinations-swiper .swiper-button-next,
.destinations-swiper .swiper-button-prev {
    color: var(--color-primary);
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    top: 40%;
}

.destinations-swiper .swiper-button-next:after,
.destinations-swiper .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.destinations-swiper .swiper-pagination-bullet {
    background: var(--color-secondary);
    opacity: 0.2;
}

.destinations-swiper .swiper-pagination-bullet-active {
    background: var(--color-primary);
    opacity: 1;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

@media (min-width: 1025px) {
    .stories-grid.related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.destination-card,
.story-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.destination-card:hover,
.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.05);
}

.card-img-wrap,
.story-img {
    position: relative;
    overflow: hidden;
}

.destination-card .card-img-wrap {
    aspect-ratio: 4/5;
}

.story-card .story-img,
.story-card .story-img-wrapper {
    aspect-ratio: 16/10;
    width: 100%;
    display: block;
    overflow: hidden;
    position: relative;
}

.card-img-wrap img,
.story-img img,
img.story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
}

.destination-card:hover .card-img-wrap img,
.story-card:hover .story-img img {
    transform: scale(1.05);
}

.destination-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
}

.destination-card h3 {
    color: white;
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
}

.destination-card p {
    opacity: 0.8;
    font-size: 1rem;
}

.story-card .story-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.story-category {
    display: block;
    margin-bottom: 1rem;
}

.story-category a {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    font-weight: 700;
}

.story-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    flex-grow: 1;
}

.story-card h3 a {
    color: var(--color-secondary);
}

.story-card h3 a:hover {
    color: var(--color-primary);
}

.story-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* -------------------------------------- */
/* NEWSLETTER CTA                         */
/* -------------------------------------- */
.newsletter-cta {
    padding: var(--spacing-xl) 0;
}

.CTA-inner {
    background: var(--color-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.CTA-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1539020140153-e479b8c22e70?w=1600&q=80') center/cover;
    opacity: 0.1;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.CTA-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.CTA-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.cta-form {
    display: flex;
    box-shadow: var(--shadow-md);
    border-radius: 50px;
    overflow: hidden;
    background: white;
    padding: 0.25rem;
}

.cta-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: var(--font-body);
}

.cta-form button {
    padding: 1rem 2.5rem;
    border-radius: 50px;
}

/* -------------------------------------- */
/* FOOTER                                 */
/* -------------------------------------- */
.site-footer {
    background: var(--color-secondary);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.site-footer a {
    color: var(--color-bg-sand);
}

.site-footer a:hover {
    color: var(--color-primary);
}

.footer-legal-menu {
    flex-grow: 1;
    display: flex;
    justify-content: end;
}

.legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.legal-links li a {
    color: white;
    opacity: 0.6;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.legal-links li a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo a {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    display: block;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    max-width: 90%;
}

.widget-title {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-widget-col ul {
    list-style: none;
    padding: 0;
}

.footer-widget-col ul li {
    margin-bottom: 0.75rem;
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem;
    border-radius: 50px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: white;
    outline: none;
    font-family: var(--font-body);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

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

.site-info {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* -------------------------------------- */
/* AJAX SEARCH OVERLAY                    */
/* -------------------------------------- */
.search-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: 0.5rem;
}

.search-toggle:hover {
    color: var(--color-primary);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(253, 251, 247, 0.98);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    max-width: 800px;
    margin: 10vh auto;
    padding: var(--spacing-md);
    position: relative;
}

.search-close {
    position: absolute;
    top: -3rem;
    right: var(--spacing-md);
    background: transparent;
    border: none;
    font-size: 3rem;
    line-height: 1;
    color: var(--color-text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.search-close:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.search-form-container input {
    width: 100%;
    font-size: 2.5rem;
    border: none;
    border-bottom: 2px solid var(--color-border);
    background: transparent;
    padding: 1rem 0;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-main);
    outline: none;
    transition: var(--transition-smooth);
}

.search-form-container input:focus {
    border-color: var(--color-primary);
}

.search-form-container input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.search-results-container {
    margin-top: var(--spacing-lg);
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.search-results-container::-webkit-scrollbar {
    width: 6px;
}

.search-results-container::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 10px;
}

.search-loading,
.search-error {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--spacing-md);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    margin-bottom: 1rem;
    background: white;
    box-shadow: var(--shadow-sm);
}

.search-result-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.search-result-img,
.search-result-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.search-result-placeholder {
    background: var(--color-bg-sand);
}

.search-result-info {
    flex: 1;
}

.search-result-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: block;
}

.search-result-info h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text-main);
}

/* ------------------------------------------------------------------------- *
 * 9. SINGLE POST TYPOGRAPHY & TOC
 * ------------------------------------------------------------------------- */

.single-post .container article {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.single-post .container article h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 26px;
    color: var(--secondary-color);
}

.single-post .container article h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--secondary-color);
}

.single-post .container article p {
    margin-bottom: 25px;
}

.single-post .container article ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.single-post .container article li {
    margin-bottom: 10px;
}

.blogma-toc {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.blogma-toc-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.blogma-toc-title::before {
    content: '📑';
    font-size: 22px;
}

.blogma-toc ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

.blogma-toc li {
    margin-bottom: 12px !important;
    border-bottom: 1px dashed #dee2e6;
    padding-bottom: 8px;
}

.blogma-toc li:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.blogma-toc a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s ease;
    display: block;
}

.blogma-toc a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* -------------------------------------- */
/* SINGLE POST TEMPLATE                   */
/* -------------------------------------- */
.single-post-main {
    padding-bottom: var(--spacing-xl);
}

.entry-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-xl);
}

.entry-header-inner {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.entry-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.entry-meta .story-category {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.entry-meta .post-categories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
}

.entry-meta .story-category a {
    color: var(--color-primary);
    font-weight: 700;
}

.entry-title {
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--color-secondary);
    margin: 0;
}

.post-thumbnail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.entry-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 4rem 5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transform: translateY(-4rem);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-main);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--color-secondary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    font-size: 1.25rem;
    font-style: italic;
    margin: 2rem 0;
    color: var(--color-secondary);
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tags-links {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.tags-links a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-sand);
    border-radius: 50px;
    color: var(--color-text-main);
    margin-left: 0.5rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

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

.post-navigation-wrapper {
    max-width: 800px;
    margin: 0 auto 4rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}

.post-navigation-wrapper .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-secondary);
    transition: var(--transition-smooth);
    display: block;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: var(--color-primary);
}

.comments-container {
    max-width: 800px;
    margin: 0 auto;
}

.comments-area {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
}

.comments-title,
.comment-reply-title {
    font-size: 1.75rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment-list .comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-body {
    display: flex;
    gap: 1.5rem;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.comment-meta {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.comment-meta b {
    color: var(--color-secondary);
    font-size: 1rem;
}

.comment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-main);
}

.comment-respond {
    background: var(--color-bg-sand);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-main);
    font-size: 0.875rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-primary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .submit {
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

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

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .destinations-grid {
        gap: 1.5rem;
    }
    .destinations-grid .destination-card {
        flex: 0 0 calc(50% - 0.75rem); /* Show 2 cards at a time on tablet */
    }

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

@media (max-width: 1024px) {

    /* Header Fixes for Overlay Menu */
    .header-inner {
        flex-wrap: nowrap;
        height: 80px;
        padding: 0 1rem;
    }

    .site-branding {
        flex: 1;
        z-index: 1002;
        /* Stay above overlay */
    }

    .header-actions {
        z-index: 1002;
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .menu-toggle {
        display: block;
        /* Show hamburger */
        background: none;
        border: none;
        color: var(--color-text-main);
        cursor: pointer;
        z-index: 1002;
        /* Stay above overlay */
        position: relative;
        padding: 10px;
        /* Increase tap target for iOS */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-toggle svg,
    .search-toggle svg {
        pointer-events: none;
        /* Prevent iOS from swallowing clicks on SVGs */
    }

    /* Premium Overlay Navigation */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(253, 251, 247, 0.98);
        /* var(--color-bg-body) with slight transparency */
        backdrop-filter: blur(10px);
        z-index: 1000;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    .main-navigation.toggled {
        right: 0;
    }

    .premium-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        width: 100%;
        padding: 0;
    }

    .premium-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .premium-menu>li>a {
        font-size: 2rem;
        font-family: var(--font-heading);
        font-weight: 700;
        color: var(--color-secondary);
        display: block;
    }

    .premium-menu>li>a:hover {
        color: var(--color-primary);
    }

    /* Mobile Mega Menu Accordion */
    .mega-menu-wrapper {
        display: none; /* Controlled by JS */
        position: relative;
        top: 0;
        width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin-top: 1rem;
        opacity: 1;
        transform: none;
    }

    .mega-menu-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .mega-column {
        width: 100%;
        border: none;
        padding: 0;
    }

    .mega-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .has-mega-menu>a {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    .has-mega-menu>a svg {
        transition: transform 0.3s ease;
    }

    .has-mega-menu.open-accordion>a svg {
        transform: rotate(180deg);
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .site-header {
        position: fixed;
        width: 100%;
        top: 0;
    }

    /* General Layout */
    .container {
        padding: 0 1.25rem;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-break: break-word;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-images {
        grid-template-columns: repeat(2, 1fr);
        min-height: auto;
    }

    .hero-images .img-card-1,
    .hero-images .img-card-2 {
        transform: translateY(0);
        position: static;
        width: 100%;
        margin-bottom: 1rem;
    }

    .destinations-grid .destination-card {
        flex: 0 0 85%; /* Show 1 card + peek of the next on mobile */
    }

    .single-destination-main .entry-title {
        font-size: 2.5rem;
    }

    .CTA-inner {
        padding: 3rem 1.5rem;
        border-radius: var(--radius-lg);
        margin: 0 1.25rem;
        width: auto;
    }

    .CTA-content h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .cta-form {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        gap: 1rem;
    }

    .cta-form input {
        border-radius: 50px;
        background: white;
        border: 1px solid #ddd;
    }

    .cta-form button {
        width: 100%;
    }

    /* Section Header Fixes */
    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    /* Footer Fixes */
    .footer-widgets {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-logo img {
        margin: 0 auto;
    }

    .newsletter-form {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Single Post Fixes */
    .post-navigation-wrapper .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .nav-next {
        text-align: center;
    }
}

/* Extra Small Mobile (Phones) */
@media (max-width: 600px) {
    .hero-images {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Tablet & Mobile Layout Adjustments */
@media (max-width: 768px) {
    .entry-content-wrapper {
        padding: 1.5rem 1rem;
        transform: translateY(-1rem);
    }
}

    /* Ad Containers Styling */
    .blogma-ad-top,
    .blogma-ad-bottom,
    .blogma-ad-in-content {
        width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        clear: both;
    }

    .blogma-ad-top {
        margin-bottom: 30px;
    }

    .blogma-ad-bottom {
        margin-top: 40px;
        margin-bottom: 30px;
    }

    .blogma-ad-in-content {
        margin: 30px 0;
    }

/* -------------------------------------- */
/* 404 PAGE STYLING                       */
/* -------------------------------------- */
.error-404-main {
    background-color: var(--color-bg-sand);
}

.error-404 {
    padding: 8rem 0 5rem 0;
    overflow: hidden;
}

.error-404-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.error-content {
    max-width: 500px;
}

.error-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 4px 4px 0px rgba(232, 106, 51, 0.2);
}

.error-subtitle {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.error-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-404 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-404-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-404-primary:hover {
    background-color: #d15622;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 106, 51, 0.3);
}

.btn-404-secondary {
    background-color: white;
    color: var(--color-secondary);
    border: 2px solid var(--color-border);
}

.btn-404-secondary:hover {
    border-color: var(--color-secondary);
    background-color: var(--color-secondary);
    color: white;
    transform: translateY(-2px);
}

.error-image {
    position: relative;
    z-index: 1;
}

.error-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    bottom: 20px;
    left: 20px;
    background-color: var(--color-primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
    transition: all 0.5s ease;
}

.error-image:hover::before {
    top: -10px;
    right: -10px;
    bottom: 10px;
    left: 10px;
    opacity: 0.2;
}

.error-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
}

.error-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.error-recommendations {
    background-color: white;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Responsive 404 */
@media (max-width: 992px) {
    .error-404-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .error-content {
        margin: 0 auto;
    }
    
    .error-actions {
        justify-content: center;
    }
    
    .error-image img {
        transform: none;
    }
}
@media (max-width: 576px) {
    .error-title {
        font-size: 6rem;
    }
    .error-subtitle {
        font-size: 2rem;
    }
}