/* ============================================
   Q2G Documentation - Professional Pastel Theme
   GeoServer Connector for QGIS
   ============================================ */

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

:root {
    /* Pastel Color Palette */
    --pastel-blue: #B8D4E3;
    --pastel-blue-dark: #7EB5D6;
    --pastel-green: #C8E6C9;
    --pastel-green-dark: #A5D6A7;
    --pastel-lavender: #E1D5E7;
    --pastel-lavender-dark: #C9B8D4;
    --pastel-peach: #FFDAB9;
    --pastel-peach-dark: #FFCBA4;
    --pastel-mint: #B2DFDB;
    --pastel-mint-dark: #80CBC4;
    --pastel-cream: #FFF8E7;
    --pastel-rose: #F8D7DA;
    --pastel-yellow: #FFF9C4;
    
    /* Text Colors */
    --text-primary: #2C3E50;
    --text-secondary: #5D6D7E;
    --text-muted: #7F8C8D;
    
    /* Accent Colors */
    --accent-primary: #5B8FB9;
    --accent-secondary: #7EB5D6;
    --accent-success: #81C784;
    --accent-warning: #FFB74D;
    --accent-error: #E57373;
    --accent-info: #64B5F6;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(145deg, var(--pastel-cream) 0%, var(--pastel-blue) 50%, var(--pastel-lavender) 100%);
    min-height: 100vh;
    padding: 20px 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent-secondary);
    text-decoration: none;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
    padding: 45px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pastel-blue-dark), var(--pastel-lavender-dark), var(--pastel-mint-dark));
}

.page-header h1 {
    color: var(--text-primary);
    font-size: clamp(1.6em, 4vw, 2.4em);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: clamp(1em, 2vw, 1.15em);
    margin: 0;
}

/* Main Content Area */
.content {
    background: rgba(255, 255, 255, 0.97);
    padding: clamp(25px, 4vw, 50px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.9);
}

section {
    margin-bottom: 45px;
}

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

/* Headings */
h2 {
    color: var(--text-primary);
    font-size: clamp(1.35em, 3vw, 1.75em);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--pastel-blue-dark);
    font-weight: 600;
    letter-spacing: -0.3px;
}

h3 {
    color: var(--accent-primary);
    font-size: clamp(1.1em, 2.5vw, 1.3em);
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

h4 {
    color: var(--text-primary);
    font-size: clamp(1em, 2vw, 1.1em);
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Text Elements */
p {
    margin-bottom: 16px;
    text-align: justify;
    color: var(--text-secondary);
}

ul, ol {
    margin-left: 28px;
    margin-bottom: 18px;
}

li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

li strong {
    color: var(--text-primary);
}

/* Links */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Code Styling */
code {
    background: var(--pastel-lavender);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #6B4C7A;
    font-size: 0.9em;
}

pre {
    background: linear-gradient(135deg, #F8F9FA 0%, #F1F3F4 100%);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 18px;
    border-left: 4px solid var(--pastel-blue-dark);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 0.88em;
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.feature-card {
    background: linear-gradient(145deg, #FFFFFF 0%, var(--pastel-cream) 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--pastel-blue-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--accent-primary);
    font-size: 1.1em;
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95em;
}

/* Tables */
.format-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.format-table th {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    padding: 15px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
}

.format-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #E8EEF2;
    color: var(--text-secondary);
}

.format-table tr:last-child td {
    border-bottom: none;
}

.format-table tr:hover {
    background: var(--pastel-cream);
}

.format-table tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

/* Alert Boxes */
.note {
    background: linear-gradient(135deg, #E3F2FD 0%, var(--pastel-blue) 100%);
    border-left: 4px solid var(--accent-info);
    padding: 18px 22px;
    margin: 22px 0;
    border-radius: 8px;
    color: #1565C0;
}

.warning {
    background: linear-gradient(135deg, #FFF8E1 0%, var(--pastel-yellow) 100%);
    border-left: 4px solid var(--accent-warning);
    padding: 18px 22px;
    margin: 22px 0;
    border-radius: 8px;
    color: #E65100;
}

.error {
    background: linear-gradient(135deg, #FFEBEE 0%, var(--pastel-rose) 100%);
    border-left: 4px solid var(--accent-error);
    padding: 18px 22px;
    margin: 22px 0;
    border-radius: 8px;
    color: #C62828;
}

.success {
    background: linear-gradient(135deg, #E8F5E9 0%, var(--pastel-green) 100%);
    border-left: 4px solid var(--accent-success);
    padding: 18px 22px;
    margin: 22px 0;
    border-radius: 8px;
    color: #2E7D32;
}

/* Step Box */
.step-box {
    background: linear-gradient(145deg, #FFFFFF 0%, var(--pastel-mint) 100%);
    padding: 22px;
    margin: 18px 0;
    border-radius: 10px;
    border-left: 4px solid var(--pastel-mint-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.step-box strong {
    color: var(--accent-primary);
}

/* Image Container */
.image-container {
    text-align: center;
    margin: 25px 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.image-caption {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: var(--text-muted);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
    font-size: 0.9em;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
    gap: 20px;
}

.nav-button {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(91, 143, 185, 0.3);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 143, 185, 0.4);
    text-decoration: none;
    color: white;
}

.nav-button.prev {
    text-align: left;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 30px 25px;
    }
    
    .page-header h1 {
        font-size: 1.6em;
    }
    
    .content {
        padding: 25px;
    }
    
    h2 {
        font-size: 1.35em;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .format-table {
        font-size: 0.9em;
    }
    
    .format-table th,
    .format-table td {
        padding: 10px 12px;
    }
}

/* Table of Contents */
.toc {
    background: linear-gradient(145deg, #FFFFFF 0%, var(--pastel-lavender) 100%);
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 35px;
    border: 1px solid rgba(201, 184, 212, 0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.toc h3 {
    color: var(--text-primary);
    margin: 0 0 18px 0;
    font-size: 1.15em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc h3::before {
    content: '📑';
    font-size: 1.2em;
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 30px;
}

.toc li {
    margin-bottom: 10px;
    padding-left: 0;
    break-inside: avoid;
}

.toc a {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.1s ease;
    background: rgba(255, 255, 255, 0.6);
}

.toc a:hover {
    color: var(--text-primary);
    background: var(--pastel-lavender);
    text-decoration: none;
}


@media (max-width: 768px) {
    .toc ul {
        columns: 1;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--pastel-mint-dark) 0%, var(--pastel-blue-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--pastel-lavender-dark) 100%);
    text-decoration: none;
    color: white;
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Section anchors for smooth scrolling */
section[id] {
    scroll-margin-top: 20px;
}

html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
    
    .page-header,
    .content,
    footer {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .nav-buttons {
        display: none;
    }
}
