/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1C3F2E;
    background-image: url('/static/images/cork-texture.jpg');
    background-size: 400px 400px;
    background-repeat: repeat;
    background-attachment: scroll;
    background-position: top left;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Remove transparency for more vivid backgrounds */
    z-index: -1;
    pointer-events: none;
}


/* Header and Breadcrumb Wrapper */
.header-breadcrumb-wrapper {
    margin-top: 0.5rem;
    padding: 0 2rem; /* Outer padding like footer */
    position: sticky;
    top: -122px; /* Negative value to hide header portion when sticky, showing only breadcrumbs */
    z-index: 100;
}

.header-breadcrumb-wrapper::after {
    content: '';
    display: block;
    max-width: calc(1400px - 4rem); /* Match footer-content width */
    margin: 0 auto;
    background: #FFF8F0; /* Same as content area */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.header,
.breadcrumb {
    position: relative;
    z-index: 1;
    max-width: calc(1400px - 4rem);
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Header and Navigation */
.header {
    background: transparent;
    color: #1C3F2E;
    padding: 0;
    position: relative;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 2rem; /* Increased spacing between logo and text */
    text-decoration: none;
    padding-left: 2rem; /* Match breadcrumb left padding */
}

.logo {
    height: 120px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.brand-text-container {
    display: flex;
}

.brand-text {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-text::after {
    content: '●'; /* Black dot separator */
    color: #000000;
    font-size: 1.2rem;
    margin: 0 0.3rem;
    order: 1; /* Place between expatriate and travel */
}

.brand-expatriate {
    color: #1A2F4B; /* Navy blue */
    order: 0;
}

.brand-travel {
    color: #1A2F4B; /* Navy blue */
    order: 2;
}

.brand-tagline-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.brand-tagline {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    color: #047857; /* Softer green */
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    margin-right: 90px; /* Space for bookmark ribbon */
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: #0B5D33; /* Dark green */
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

.nav-links a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #0B5D33;
}

/* Bookmark ribbon in header - looks like a tattered bookmark coming from top */
.bookmark-ribbon {
    position: absolute;
    top: -8px;
    right: 2rem;
    width: 50px;
    height: 80px;
    background: #E7AC53;
    color: #1C3F2E;
    text-decoration: none;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 200;
    border-radius: 0 0 4px 4px;
    
    /* Tattered edge effect at bottom */
    clip-path: polygon(
        0 0, 100% 0, 100% 85%, 95% 90%, 90% 85%, 85% 92%, 80% 86%, 75% 91%, 
        70% 87%, 65% 93%, 60% 88%, 55% 94%, 50% 89%, 45% 95%, 40% 90%, 
        35% 94%, 30% 89%, 25% 93%, 20% 88%, 15% 92%, 10% 87%, 5% 91%, 0 86%
    );
}

.bookmark-ribbon:hover {
    transform: translateY(4px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.25),
        0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Bookmark modal - smaller than other modals */
.modal-bookmark {
    max-width: 500px !important;
    padding: 2rem !important;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: transparent;
    border-top: 2px dashed rgba(11, 93, 51, 0.3);
    padding: 0.375rem 0;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.breadcrumb-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 2rem;
}

.breadcrumb-tools {
    margin-right: 2rem;
}

.breadcrumb-link {
    color: #047857; /* Softer green */
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.breadcrumb-link:hover {
    color: #0B5D33; /* Darker green on hover */
    background: rgba(212, 175, 55, 0.15);
    text-decoration: none;
}

.breadcrumb-separator {
    color: #047857;
    font-weight: 400;
    opacity: 0.6;
}

.breadcrumb-current {
    color: #047857;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
}

/* Main content */
.main {
    min-height: calc(100vh - 200px);
    padding: 0;
    margin-top: calc(1rem + 7px); /* Gap between header/breadcrumb and main content + 7px */
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.content-area {
    background: #FFF8F0; /* Warm cream */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    padding: 2.5rem;
    border-radius: 8px; /* All corners rounded */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.content-area::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    margin-left: calc(-30% - 40px); /* Move left by additional 40px */
    width: 60px;
    height: 60px;
    background-image: url('/static/images/pushpin-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-15deg);
    z-index: 10;
}

.content-area::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    margin-left: 30%;
    width: 60px;
    height: 60px;
    background-image: url('/static/images/pushpin-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-15deg);
    z-index: 10;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.content {
    background: transparent;
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
    margin-top: 30px;
}

/* Typography */
.content h1 {
    color: #1C3F2E;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}

/* Country title and flag styling */
.country-title-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 20px 0;
    padding: 0;
    position: relative;
    min-height: 3em; /* Just enough for the title */
}

.country-title {
    text-align: left;
    margin: 0;
    margin-left: 1rem; /* Align with content left margin */
    display: flex;
    align-items: center;
    font-size: 1.3em; /* 30% bigger than default */
}

.guide-type-parens {
    font-size: 0.55em;
    vertical-align: bottom;
    margin-left: 0.3em;
    position: relative;
    top: 8px;
}

.related-guides {
    font-size: 0.9rem;
    margin: -25px 0 1rem 1rem;
    line-height: 1.6;
}

.related-guides strong {
    color: #1C3F2E;
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.related-guides ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 1.5rem;
}

.related-guides li {
    margin: 0;
    line-height: 1.2;
}

.related-guides a {
    color: #0E6F50;
    text-decoration: none;
}

.related-guides a:hover {
    text-decoration: underline;
}

.country-flag {
    font-size: 1.68em; /* 40% bigger than the 1.2em base (1.2 * 1.4 = 1.68) */
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
    position: relative;
}

.map-link {
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.18em;
    color: #047857;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.3s ease;
}

.map-link:hover {
    color: #0B5D33;
    text-decoration: underline;
}

.country-landmark {
    width: 180px;
    height: 180px;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 120px;
    right: 2rem;
    z-index: 10;
    cursor: pointer;

    /* Polaroid effect */
    padding: 12px 12px 40px 12px; /* More padding on bottom for polaroid look */
    background: #fdfbf5; /* Slightly yellowed white for aged look */
    border-radius: 6px; /* Rounded corners on polaroid */
    border: 1px solid #d4caba; /* Slightly yellowed/aged border */
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.15),
        0 12px 40px rgba(0, 0, 0, 0.2);

    /* Random rotation variants - will be applied via nth-child in separate rules */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Vintage polaroid overlay with yellowing and scratches */
.country-landmark::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 40px;
    pointer-events: none;
    border-radius: 2px;
    
    /* Scratched texture with yellowing */
    background-image: 
        /* More visible scratch lines in various directions */
        linear-gradient(90deg, transparent 0%, transparent 48%, rgba(255, 255, 255, 0.12) 49%, rgba(255, 255, 255, 0.12) 50%, transparent 51%, transparent 100%),
        linear-gradient(87deg, transparent 0%, transparent 49%, rgba(0, 0, 0, 0.04) 49.5%, rgba(0, 0, 0, 0.04) 50.5%, transparent 51%, transparent 100%),
        linear-gradient(45deg, transparent 0%, transparent 48%, rgba(255, 255, 255, 0.08) 49%, rgba(255, 255, 255, 0.08) 51%, transparent 52%, transparent 100%),
        linear-gradient(135deg, transparent 0%, transparent 48%, rgba(0, 0, 0, 0.03) 49%, rgba(0, 0, 0, 0.03) 51%, transparent 52%, transparent 100%),
        linear-gradient(23deg, transparent 0%, transparent 48%, rgba(255, 255, 255, 0.06) 49%, rgba(255, 255, 255, 0.06) 51%, transparent 52%, transparent 100%),
        linear-gradient(167deg, transparent 0%, transparent 49%, rgba(0, 0, 0, 0.02) 49.5%, rgba(0, 0, 0, 0.02) 50.5%, transparent 51%, transparent 100%),
        /* Overall yellow tint */
        linear-gradient(180deg, rgba(255, 248, 220, 0.08) 0%, rgba(255, 245, 200, 0.12) 100%);
    background-size: 37px 37px, 53px 53px, 67px 67px, 89px 89px, 103px 103px, 127px 127px, 100% 100%;
    background-position: 0 0, 5px 5px, 11px 11px, 17px 17px, 23px 23px, 29px 29px, 0 0;
    
    /* Subtle vignette effect for aging */
    box-shadow: inset 0 0 40px rgba(139, 115, 85, 0.04);
}

.country-flag-fallback {
    font-size: 1.68em; /* Same size as the main flag */
    margin-left: 0.75rem;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.8; /* Slightly more subtle than the main flag */
}

.content h2 {
    color: #0B5D33;
    margin: 2rem 0 1rem 0;
    font-size: 2rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

/* Softly dashed HR for persona sections */
.content hr {
    border: none;
    border-top: 1px dashed #c0c0c0;
    margin: 1.5rem 0;
    opacity: 0.7;
}

.content h3 {
    color: #0B5D33;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.content p {
    margin-bottom: 1rem;
    color: #047857;
    font-size: 1.05rem;
}

.content ul {
    list-style: none;
    margin: 1rem 0;
    padding-left: 0;
}

.content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content ul li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: #0B5D33;
}

.content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0E6F50;
    font-weight: bold;
}

.content ol li {
    margin-bottom: 0.5rem;
    color: #0B5D33;
}

.content a {
    color: #047857;
    text-decoration: underline;
    font-weight: 700;
}

.content a:hover {
    text-decoration: underline;
    color: #1C3F2E;
}

/* External links - keep always underlined with no hover effects */
.content a[href*="//"] {
    text-decoration: underline !important;
    color: #047857 !important;
    transition: none !important;
}

.content a[href*="//"]:hover {
    color: #047857 !important;
    text-decoration: underline !important;
    transition: none !important;
    outline: none;
    border: none;
}

.content blockquote {
    border-left: 4px solid #047857;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #FFF8F0;
    font-style: italic;
    color: #0B5D33;
}

.content code {
    background-color: #FFF8F0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: #1C3F2E;
    border: 1px solid #E8E0D0;
}

.content pre {
    background-color: #FFF8F0;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #E8E0D0;
}

.content pre code {
    background: none;
    padding: 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: start;
}

.ad-space {
    background: #FFF8F0; /* Warm cream */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px; /* All corners rounded */
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.ad-space::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) rotate(-5deg);
    width: 60px;
    height: 60px;
    background-image: url('/static/images/pushpin-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
}

.ad-placeholder {
    color: #7f8c8d;
    font-style: italic;
    padding: 2rem 0;
    background: transparent;
    margin-top: 40px;
    min-height: 200px; /* Minimum height while ads load */
    max-height: calc(100vh - 200px); /* Cap height to prevent excessive sidebar height */
    overflow-y: auto;
}

.quick-links, .featured-destinations {
    background: #FFF8F0; /* Warm cream */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.quick-links::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 60px;
    height: 60px;
    background-image: url('/static/images/pushpin-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateX(-50%) rotate(25deg);
    z-index: 10;
}

.featured-destinations::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    margin-left: 30px;
    width: 60px;
    height: 60px;
    background-image: url('/static/images/pushpin-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateX(-50%) rotate(-12deg);
    z-index: 10;
}

.quick-links h3, .featured-destinations h3 {
    color: #1C3F2E;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
}

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

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: #047857;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.3rem 0;
    display: block;
    border-radius: 6px;
    padding-left: 0.5rem;
    font-weight: 500;
}

.quick-links a:hover {
    background: rgba(4, 120, 87, 0.15);
    transform: translateX(5px);
    color: #1C3F2E;
}

.destination-card {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFF4E6 100%);
    border-radius: 3px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(4, 120, 87, 0.2);
    transition: all 0.3s ease;
    position: relative;
    transform: rotate(0.5deg);
}

.destination-card:hover {
    transform: translateY(-2px) rotate(0.5deg);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.destination-card h4 {
    color: #1C3F2E;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
}

.destination-card h4 a {
    color: #1C3F2E;
    text-decoration: none;
}

.destination-card h4 a:hover {
    color: #0B5D33;
    text-decoration: underline;
}

.destination-card p {
    color: #0B5D33;
    font-size: 0.85rem;
    margin: 0;
}

/* Directory Listing */
.search-container {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#countrySearch {
    flex: 1;
    max-width: 500px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    background: #FFF8F0;
    color: #1C3F2E;
    transition: all 0.3s ease;
}

#countrySearch:focus {
    outline: none;
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
}

#countrySearch::placeholder {
    color: #8B7355;
    opacity: 0.6;
}

.search-results-count {
    color: #8B7355;
    font-size: 0.9rem;
    font-style: italic;
}

.directory-listing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.continent-header {
    grid-column: 1 / -1;
    color: #1C3F2E;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #D4AF37;
}

.directory-item {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.1) 0%, rgba(11, 93, 51, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid #E8E0D0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.directory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 93, 51, 0.1);
    border-color: #047857;
}

.directory-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none !important;
    color: #1C3F2E;
}

.directory-link:hover {
    text-decoration: none !important;
    color: #1C3F2E;
}

.directory-link *,
.directory-link:hover *,
.directory-link:focus *,
.directory-link:active * {
    text-decoration: none !important;
}

.directory-icon, .file-icon {
    font-size: 2rem;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.75rem;
    vertical-align: middle;
    position: relative;
    top: 3px;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    text-decoration: none !important;
}

.directory-link:hover .directory-icon,
.directory-link:hover .file-icon,
.directory-link:hover .item-name {
    text-decoration: none !important;
}

.directory-item.file {
    background: linear-gradient(135deg, rgba(11, 93, 51, 0.05) 0%, rgba(4, 120, 87, 0.02) 100%);
}

.empty-directory {
    text-align: center;
    color: #0B5D33;
    font-style: italic;
    padding: 3rem;
    font-size: 1.1rem;
}

/* Article Signature */
.article-signature {
    margin-top: 0.5rem;
    margin-left: 0;
    text-align: left;
}

.signature-text {
    font-family: 'Dancing Script', cursive !important;
    font-size: 3em !important;
    color: #1C3F2E !important;
    margin: 0 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* Community Page */
.community-intro {
    margin-bottom: 2rem;
}

.community-articles {
    margin-top: 2rem;
}

.country-section {
    margin-bottom: 3rem;
}

.country-header {
    color: #1C3F2E;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #D4AF37;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.article-card {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.1) 0%, rgba(11, 93, 51, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid #E8E0D0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(11, 93, 51, 0.1);
    transform: translateY(-2px);
    border-color: #047857;
}

.article-card-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none !important;
    color: inherit;
}

.article-card-link:hover {
    text-decoration: none !important;
}

.article-card-link *,
.article-card-link:hover *,
.article-card-link:focus *,
.article-card-link:active * {
    text-decoration: none !important;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1C3F2E;
    text-decoration: none !important;
}

.article-title span {
    text-decoration: none !important;
}

.article-icon {
    text-decoration: none;
    display: inline-block;
    margin-right: 0.75rem;
}

.country-flag-icon {
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1.5em;
    vertical-align: middle;
    position: relative;
    top: 2px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #0B5D33;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.article-author {
    font-weight: 500;
}

.article-date {
    font-style: italic;
    opacity: 0.8;
}

.article-description {
    color: #1C3F2E;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-read-more {
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.article-read-more:hover {
    color: #0B5D33;
}

.no-articles {
    text-align: center;
    color: #0B5D33;
    font-style: italic;
    padding: 3rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    margin-top: calc(1rem + 5px);
    padding: 0 2rem 1rem 2rem; /* Padding on sides and bottom, margin for bottom spacing */
}

.footer-content {
    max-width: calc(1400px - 4rem); /* Match content width */
    margin: 0 auto;
    padding: 2rem 2.5rem;
    background: #FFF8F0; /* Same as content area */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.2);
    color: #1C3F2E;
    text-align: center;
}

.footer-links-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-copyright {
    margin: 0;
    color: #047857; /* Match site's green text color */
}

.footer-link-left {
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: 100px;
}

.footer-link-right {
    font-size: 0.9rem;
    white-space: nowrap;
    margin-right: 100px;
}

/* Responsive design */
@media (max-width: 1200px) {
    /* Mobile-friendly header reorganization */
    .header-breadcrumb-wrapper {
        margin: 0.5rem auto 0 auto;
        padding: 0 1rem;
        /* Dynamic top value set by JavaScript based on header height */
    }

    .header-breadcrumb-wrapper::after {
        display: none; /* Disable background on mobile to prevent height issues */
    }

    .header,
    .breadcrumb {
        max-width: 100%; /* Full width on mobile */
        padding: 0 0.5rem; /* Match main-container padding on mobile */
        background: #FFF8F0; /* Apply background directly on mobile */
        background-image:
            linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
            linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
            linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
        background-size: 8px 8px;
        background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.2);
    }

    .header {
        border-radius: 8px 8px 0 0; /* Rounded top corners */
    }

    .breadcrumb {
        background: #FFF8F0 !important; /* Force background on mobile */
        background-image:
            linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
            linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
            linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%) !important;
        background-size: 8px 8px !important;
        background-position: 0 0, 0 4px, 4px -4px, -4px 0px !important;
        border-radius: 0 0 8px 8px !important; /* Rounded bottom corners */
        padding: 0.5rem 0.5rem !important; /* Proper padding on mobile */
    }

    .nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .nav-brand a {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        text-align: center;
        padding-left: 0; /* Remove left padding on mobile */
    }

    .logo {
        height: 80px; /* Smaller logo on mobile */
    }

    .brand-text-wrapper {
        align-items: center;
    }

    .brand-text {
        font-size: 1.4rem;
    }

    .brand-tagline {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin-right: 0; /* Remove spacing on mobile */
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Smaller bookmark ribbon on mobile */
    .bookmark-ribbon {
        width: 40px;
        height: 65px;
        right: 1rem;
    }

    .breadcrumb {
        padding: 0.5rem 0;
    }

    .breadcrumb-container {
        padding: 0 0.5rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .breadcrumb-links {
        padding-left: 0; /* Remove extra padding on mobile */
    }

    .breadcrumb-tools {
        margin-top: 0.25rem;
        margin-right: 0; /* Remove extra margin on mobile */
    }

    /* Content ordering: content first, then ads, then footer */
    .main-container {
        padding: 0 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
    }

    /* Content comes first */
    .content-area {
        order: 1;
        padding: 1.5rem 1rem;
        border-radius: 12px;
        width: calc(100% - 1rem);
        max-width: calc(100% - 1rem);
        margin-left: 0.5rem;
    }

    /* Sidebar (ads) comes after content */
    .sidebar {
        order: 2;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        max-width: 600px;
        margin: 0 auto;
    }

    .sidebar > div {
        min-width: auto;
        width: 100%;
    }

    /* Remove polaroid pushpins on mobile (too cramped) */
    .content-area::before,
    .content-area::after,
    .ad-space::before,
    .quick-links::before,
    .featured-destinations::before {
        display: none;
    }

    /* Adjust polaroid photo positioning for mobile */
    .country-title-container {
        flex-direction: column;
        align-items: center;
    }

    .map-link {
        top: 60px;
    }

    .country-landmark {
        position: static;
        display: block;
        margin: 1rem auto;
        margin-top: calc(1rem - 20px) !important;
        max-width: 100%;
        height: auto;
    }

    /* Community polaroid layout adjustment */
    .community-header-layout {
        flex-direction: column;
        gap: 1rem;
    }

    .community-title-section {
        flex: 1;
    }

    .community-polaroid-section {
        flex: 1;
        padding-top: 0;
    }

    .community-polaroid {
        width: 100%;
        max-width: 280px;
        height: auto;
        margin: 0 auto;
    }

    /* Typography adjustments */
    .content h1 {
        font-size: 1.75rem;
    }

    .content h2 {
        font-size: 1.35rem;
    }

    .content h3 {
        font-size: 1.15rem;
    }

    .content p {
        font-size: 1rem;
    }

    .country-title {
        font-size: 1.5rem;
        margin-left: 0;
    }

    /* Directory and lists */
    .directory-listing {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .directory-link {
        padding: 1rem;
    }

    .directory-icon, .file-icon {
        font-size: 1.5rem;
    }

    .item-name {
        font-size: 1rem;
    }

    /* Footer adjustments */
    .footer {
        padding: 0 1rem 1rem 1rem;
    }

    .footer-content {
        padding: 1.5rem 1rem;
    }

    .footer-links-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-link-left,
    .footer-link-right {
        margin: 0;
    }

    /* Reorder footer items on narrow screens */
    .footer-copyright {
        order: 1;
    }

    .footer-link-left {
        order: 2;
    }

    .footer-link-right {
        order: 3;
    }

    /* Articles grid on mobile */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-tools {
        width: 95%;
        padding: 1.5rem 1rem;
    }
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 50%;
    max-width: 800px;
    max-height: 90vh; /* Limit total height to 90% of viewport */
    text-align: center;
    display: flex;
    flex-direction: column;
}

.modal-content img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(90vh - 8rem); /* Reserve space for margins and caption */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    margin: 0 auto; /* Center the image */
}

/* Map iframe - no rounded corners or shadows */
#mapIframe {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.modal-caption {
    color: #ffffff;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    text-align: center;
    font-style: italic;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    background: rgba(0, 0, 0, 0.8);
    text-decoration: none;
}

/* Random rotation for polaroid effect */
.country-title-container:nth-child(6n+1) .country-landmark {
    transform: rotate(-3deg);
}

.country-title-container:nth-child(6n+2) .country-landmark {
    transform: rotate(2deg);
}

.country-title-container:nth-child(6n+3) .country-landmark {
    transform: rotate(-5deg);
}

.country-title-container:nth-child(6n+4) .country-landmark {
    transform: rotate(4deg);
}

.country-title-container:nth-child(6n+5) .country-landmark {
    transform: rotate(-2deg);
}

.country-title-container:nth-child(6n+6) .country-landmark {
    transform: rotate(3deg);
}

.country-landmark:hover {
    transform: rotate(0deg) scale(1.05) !important;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 16px 40px rgba(0, 0, 0, 0.2),
        0 24px 60px rgba(0, 0, 0, 0.25);
}

/* Community page header layout - two column */
.community-header-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.community-title-section {
    flex: 2; /* Takes 2/3 of the width */
}

.community-polaroid-section {
    flex: 1; /* Takes 1/3 of the width */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2rem;
}

/* Community page polaroid adjustments */
.community-polaroid {
    position: relative;
    top: auto;
    right: auto;
    transform: rotate(-4deg);
}

.community-polaroid:hover {
    transform: rotate(0deg) scale(1.05) !important;
}

/* Move signature down on community pages, then pull publication date up to shorten overall page */
.content:has(.community-polaroid) .article-signature {
    margin-top: 1rem;
}

.content:has(.community-polaroid) .publication-date {
    margin-top: 20px;
    margin-bottom: 1rem;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .modal-close {
        top: -35px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
}

/* Tools Modal specific styling */
.modal-tools {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    min-height: 300px;
    max-height: 85vh;
    overflow-y: auto;
    background: #FFF8F0; /* Warm cream - ecru */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px;
    padding: 2.5rem;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tools-content {
    color: #1C3F2E;
    position: relative;
}

.tools-content h1 {
    font-size: 2.2rem;
    color: #0B5D33;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tools-content h2 {
    font-size: 1.3rem;
    color: #0E6F50;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    border-bottom: 2px solid #0E6F50;
    padding-bottom: 0.25rem;
}

.tools-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.tools-content li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tools-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0E6F50;
    font-weight: bold;
}

.tools-content a {
    color: #047857;
    text-decoration: underline;
    font-weight: 700;
}

.tools-content a:hover {
    color: #1C3F2E;
    text-decoration: underline;
}

.tools-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tools-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px dashed rgba(11, 93, 51, 0.3);
    opacity: 0.7;
}

.tools-content strong {
    color: #1C3F2E;
}

/* Publication date styling */
.publication-date {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(14, 111, 80, 0.3);
    text-align: left;
}

.publication-date p {
    font-size: 0.9rem;
    color: #0E6F50;
    font-style: italic;
    margin: 0;
}

/* Footer link styling */
.footer a {
    color: #0B5D33; /* Dark green */
    text-decoration: none;
    border-bottom: 1px dotted #0B5D33;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #D4AF37; /* Gold on hover */
    border-bottom-color: #D4AF37;
}

/* Cookie Consent Modal Styles */
.cookie-consent-modal {
    z-index: 10000;
}

.modal-cookie-consent {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #FFF8F0; /* Warm cream - ecru */
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.02) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.02) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-cookie-consent h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #0B5D33;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.modal-cookie-consent > p {
    color: #1C3F2E;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cookie-categories {
    margin-bottom: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(11, 93, 51, 0.2);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cookie-category-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #047857;
}

.cookie-category-header input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-category-header label {
    cursor: pointer;
    color: #0B5D33;
    margin: 0;
    font-size: 1.1rem;
}

.cookie-category-header input[type="checkbox"]:disabled + label {
    cursor: not-allowed;
}

.cookie-category-description {
    margin: 0;
    padding-left: 2rem;
    color: #1C3F2E;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cookie-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.cookie-btn-primary,
.cookie-btn-secondary,
.cookie-btn-tertiary {
    background: rgba(28, 63, 46, 0.1);
    color: #1C3F2E;
    border: 2px solid #1C3F2E;
}

.cookie-btn-primary:hover,
.cookie-btn-secondary:hover,
.cookie-btn-tertiary:hover {
    background: rgba(28, 63, 46, 0.2);
    transform: translateY(-2px);
}

.cookie-consent-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #1C3F2E;
    margin: 0;
}

.cookie-consent-footer a {
    color: #047857;
    text-decoration: none;
    border-bottom: 1px solid #047857;
    transition: all 0.3s ease;
}

.cookie-consent-footer a:hover {
    color: #0E6F50;
    border-bottom-color: #0E6F50;
}

/* Responsive cookie consent modal */
@media (max-width: 768px) {
    .modal-cookie-consent {
        margin: 5% auto;
        padding: 1.5rem;
    }

    .modal-cookie-consent h2 {
        font-size: 1.5rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        min-width: auto;
    }
}