/**
 * EasyPdfViewer - Main Styles
 */

:root {
    /* Colors */
    --primary-color: #4285f4;
    --primary-dark: #1967d2;
    --secondary-color: #34a853;
    --accent-color: #fbbc05;
    --danger-color: #ea4335;
    
    --text-color: #202124;
    --text-light: #5f6368;
    --light-color: #f8f9fa;
    --dark-color: #202124;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-speed: 0.3s;
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-color: #e8eaed;
    --text-light: #9aa0a6;
    --light-color: #303134;
    --dark-color: #202124;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] body {
    background-color: var(--dark-color);
}

main {
    flex: 1;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: var(--font-size-xxl);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-secondary:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: #d93025;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Header */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

[data-theme="dark"] .site-header {
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

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

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.25rem;
}

.logo img {
    height: 40px;
    margin-right: 0.5rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Footer */
.site-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: #9aa0a6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

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

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #9aa0a6;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9aa0a6;
    font-size: 0.9rem;
}

/* Hero section */
.hero {
    padding: 5rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .hero {
    background-color: #303134;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features section */
.features {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .feature-card {
    background-color: var(--light-color);
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(66, 133, 244, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
}

/* How it works section */
.how-it-works {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

[data-theme="dark"] .how-it-works {
    background-color: #303134;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    counter-reset: step;
}

.step {
    position: relative;
    padding-left: 3rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step h3 {
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-light);
}

/* CTA section */
.cta {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Blog section */
.blog-header {
    padding: 3rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .blog-header {
    background-color: #303134;
}

.blog-listing {
    padding: 3rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .blog-card {
    background-color: var(--light-color);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Guides section */
.guides-header {
    padding: 3rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .guides-header {
    background-color: #303134;
}

.guides-listing {
    padding: 3rem 0;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .guide-card {
    background-color: var(--light-color);
}

.guide-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.guide-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(66, 133, 244, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.guide-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.guide-content {
    flex: 1;
}

.guide-content h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.guide-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* About section */
.about-header {
    padding: 3rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .about-header {
    background-color: #303134;
}

.about-content {
    padding: 3rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.about-text h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.feature-list, .tech-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li, .tech-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}

.feature-list i, .tech-list i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

[data-theme="dark"] .about-card {
    background-color: var(--light-color);
}

.about-card h3 {
    margin-bottom: 1rem;
}

.about-card ul {
    list-style: none;
}

.about-card li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}

.about-card i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

/* Legal pages */
.legal-header {
    padding: 3rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .legal-header {
    background-color: #303134;
}

/* Contact section */
.contact-header {
    padding: 3rem 0;
    background-color: #f8f9fa;
    text-align: center;
}

[data-theme="dark"] .contact-header {
    background-color: #303134;
}

.contact-section {
    padding: 3rem 0;
}

/* Toast notification */
#toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .modal-content {
    background-color: var(--light-color);
}

.modal h3 {
    margin-bottom: 1.5rem;
}

.modal textarea {
    width: 100%;
    height: 150px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

[data-theme="dark"] .modal textarea {
    background-color: var(--dark-color);
    color: var(--text-color);
    border-color: #444;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Loading spinner */
#loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

[data-theme="dark"] #loading-indicator {
    background-color: rgba(32, 33, 36, 0.8);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(66, 133, 244, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

#loading-indicator p {
    color: var(--text-color);
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 99;
    display: none;
}

[data-theme="dark"] .cookie-banner {
    background-color: var(--light-color);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

.cookie-content {
    padding: 1.5rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.cookie-content h3 {
    margin-bottom: 0.5rem;
}

.cookie-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

/* Dark mode toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--light-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.moon-icon {
    display: block;
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

/* Responsive styles */
@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .about-card {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        display: none;
    }
    
    [data-theme="dark"] .main-nav {
        background-color: var(--dark-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 0;
        margin-bottom: 1rem;
    }
    
    .main-nav li:last-child {
        margin-bottom: 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features, .how-it-works, .cta {
        padding: 3rem 0;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .cta h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 575px) {
    .features-grid, .steps, .blog-grid, .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .about-sidebar {
        flex-direction: column;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}