/* ==========================================================================
   Schengen Visa Support - Main Stylesheet
   Professional, clean design for trust and credibility
   ========================================================================== */

/* Import Poppins Font with font-display swap for better performance */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Skip to Main Content - Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 4px 0;
    transition: top 0.3s;
}

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

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --max-width: 1200px;
    --spacing: 1rem;
    --border-radius: 6px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
}

h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--secondary-color);
}

h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

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

/* Header */
header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s;
    line-height: 1;
}

.logo a:hover {
    opacity: 0.85;
}

.logo strong {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: inline-block;
    line-height: 1.2;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav li {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1;
    display: inline-block;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--bg-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb li::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: var(--text-light);
}

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

/* Main Content Layout */
main {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

/* Article Content */
article.main-content {
    max-width: 800px;
    width: 100%;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.sidebar .widget,
.sidebar-section {
    background-color: var(--bg-light);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar .widget h3,
.sidebar-section h3 {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .widget ul,
.sidebar-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar .widget li,
.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar .widget a,
.sidebar-section a {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-light);
    transition: color 0.2s;
}

.sidebar .widget a:hover,
.sidebar-section a:hover {
    color: var(--primary-color);
}

/* Responsive - Hide sidebar on mobile */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
}

.meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.intro {
    font-size: 1rem;
    color: var(--text-color);
    padding: 1rem 1.25rem;
    background-color: var(--bg-light);
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    line-height: 1.6;
}

/* Table of Contents */
.toc {
    background-color: var(--bg-light);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.toc h2 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 600;
    border-bottom: none;
    padding-bottom: 0;
}

.toc ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out, margin-top 0.3s ease-out;
    opacity: 1;
}

.toc.collapsed ul {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.toc.collapsed .toc-toggle {
    transform: rotate(0deg);
}

.toc:not(.collapsed) .toc-toggle {
    transform: rotate(90deg);
}

.toc .toc-toggle {
    transition: transform 0.3s ease;
    display: inline-block;
}

.toc li {
    margin-bottom: 0.35rem;
}

.toc a {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Content Sections */
section {
    margin-bottom: 3rem;
}

section:last-child {
    margin-bottom: 0;
}

/* Callout Boxes */
.tip-box,
.important-box,
.note-box,
.warning-box {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    line-height: 1.6;
}

.tip-box {
    background-color: #eff6ff;
    border-color: var(--info-color);
}

.important-box {
    background-color: #fee2e2;
    border-color: var(--danger-color);
}

.note-box {
    background-color: #fffbeb;
    border-color: var(--warning-color);
}

.warning-box {
    background-color: #fef2f2;
    border-color: var(--danger-color);
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

@media (min-width: 768px) {
    table {
        display: table;
    }
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

tbody tr:hover {
    background-color: #f0f0f0;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

/* Related Pages Grid */
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.related-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background-color: var(--bg-color);
}

.related-card:hover {
    box-shadow: var(--box-shadow-md);
    border-color: var(--primary-color);
}

.related-card h3 {
    margin-top: 0;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.related-card a {
    color: var(--primary-color);
    font-weight: 600;
}

.related-card p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Sidebar */
aside.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget h3 {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

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

/* Ad Slots */
.ad-slot {
    margin-bottom: 1.5rem;
    text-align: center;
    /* HIDDEN - Remove display:none below to show ads */
    display: none;
}

.ad-slot.sticky {
    position: sticky;
    top: 100px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom small {
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: var(--box-shadow-md);
}

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

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

/* Responsive Design */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr 300px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        gap: 0;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: 1rem;
    }
    
    aside.sidebar {
        position: static;
    }
}

/* Print Styles */
@media print {
    header, footer, .breadcrumb, aside, .ad-slot, .mobile-menu-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
/* Compact Country List */
.country-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.country-list-compact span {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-lighter);
    border-radius: 4px;
    white-space: nowrap;
}

/* Compact Grid for Country Cards */
.country-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.country-card-compact {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.country-card-compact strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.country-card-compact p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (max-width: 767px) {
    .country-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .country-card-compact {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}
/* Forms */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    background-color: var(--bg-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

/* Reduced Motion - Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #333;
    }
    
    h1, h2, h3 {
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Improved Link Visibility for Accessibility */
article a:not(.btn) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

article a:not(.btn):hover {
    text-decoration-thickness: 2px;
}

/* Focus-visible for keyboard users only */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure minimum touch target size - 44x44px for mobile */
@media (max-width: 767px) {
    nav a,
    .btn,
    .sidebar a,
    .toc a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
