/* Main Styles for Owlview Market Research Page */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Pacifico&display=swap');

:root {
    --primary: #1A6CAD;
    --primary-light: #2E8BC0;
    --primary-dark: #0B3D66;
    --accent: #F5A623;
    --gray-100: #f8fafc;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
}

.logo-text {
    font-family: 'Pacifico', cursive;
    color: var(--primary);
}

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--gray-200);
}

.content-section:last-child {
    border-bottom: none;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo-mascot {
    position: relative;
    width: 50px;
    height: 50px;
}

nav a {
    text-decoration: none;
    transition: all 0.3s ease;
}

#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 300px;
}

/* Effects & Animations */
.gradient-bg {
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
}

.accent-bg {
    background-color: var(--accent);
}

.owl-icon {
    position: relative;
}

.owl-icon::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(26, 108, 173, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.transition-all {
    transition: all 0.3s ease;
}

.bevel-effect {
    box-shadow: 
        2px 2px 4px rgba(0,0,0,0.1),
        -1px -1px 3px rgba(255,255,255,0.5),
        inset 1px 1px 2px rgba(255,255,255,0.2),
        inset -1px -1px 2px rgba(0,0,0,0.1);
}

/* Chart Containers */
.chart-container {
    position: relative;
    margin: 20px auto 30px auto;
    min-height: 300px;
    height: auto;
    width: 100%;
    max-width: 900px;
    background-color: white;
    padding: 15px 15px 40px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: visible;
}

.chart-container:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.chart-title {
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.chart-description {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 12px;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

/* Table of Contents */
.toc {
    background: #f0f0f0;
    padding: 1.2em;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.toc:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toc a {
    display: inline-block;
    margin-bottom: 0.3em;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.toc a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Citations & References */
.citation {
    font-size: 0.85em;
    color: var(--gray-600);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dotted var(--primary);
    transition: all 0.2s ease;
}

.citation:hover {
    color: var(--primary);
    border-bottom: 1px solid var(--primary);
}

.references {
    background: #f9f9f9;
    padding: 1em;
    margin-top: 1.5em;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.references h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.references ol {
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.references li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    padding-left: 0.5rem;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    margin: 0 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Tooltip styling */
.tippy-box {
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 300px !important;
}

.tippy-arrow {
    color: var(--primary);
}

/* Animation for charts */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Footer */
footer {
    background-color: var(--gray-800);
    color: white;
    padding: 2rem 0;
}

footer a {
    transition: all 0.3s ease;
}

footer .border-t {
    border-top: 1px solid var(--gray-700);
    margin-top: 2rem;
    padding-top: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 280px;
        padding: 12px;
        margin: 12px auto 20px auto;
    }
    
    .chart-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .chart-description {
        font-size: 0.8rem;
        margin-bottom: 8px;
        max-width: 95%;
    }
    
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.2rem !important;
    }
    
    .content-section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .toc {
        padding: 0.75rem;
    }
    
    .references {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 220px;
        padding: 10px 8px;
        margin: 10px auto 15px auto;
    }
    
    .toggle-container {
        flex-direction: column;
    }
    
    .toggle-label {
        margin: 5px 0;
    }
    
    h1 {
        font-size: 1.6rem !important;
    }
    
    h2 {
        font-size: 1.4rem !important;
    }
}

/* Print Styles */
@media print {
    header, footer, .toc {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .content-section {
        padding: 0.5rem 0;
        border: none;
    }
    
    .chart-container {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}

/* Section headers styling - improve distinction between levels */
main h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary-light);
    clear: both;
    position: relative;
    z-index: 2;
}

main h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

main h3.subsection {
    font-size: 1.15rem;
    margin-left: 0.5rem;
    color: var(--gray-700);
    border-left: 3px solid var(--primary-light);
    padding-left: 0.75rem;
    margin-top: 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-right: 0.5rem;
    display: inline-block;
}

/* Chart annotations and subtitles */
.chart-annotation {
    text-align: center;
    font-style: italic;
    font-size: 0.82rem;
    color: var(--gray-600);
    margin-top: 0.4rem;
    margin-bottom: 0;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--gray-300);
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Section separator */
hr.section-separator {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(26, 108, 173, 0.2), rgba(0, 0, 0, 0));
    margin: 1.5rem auto;
    width: 100%;
    max-width: 900px;
}
