/* Global Styles */
:root {
    /* Modern Color Palette */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #7c3aed;
    --secondary-hover: #6d28d9;
    --secondary-light: #ede9fe;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --text-color: #000000;
    --text-light: #1a1a1a;
    --text-lighter: #333333;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Modern Typography - Increased Sizes */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Font Sizes - Increased Scale */
    --text-xs: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);      /* 14-16px */
    --text-sm: clamp(1rem, 0.9rem + 0.25vw, 1.125rem);     /* 16-18px */
    --text-base: clamp(1.125rem, 1rem + 0.25vw, 1.25rem);  /* 18-20px */
    --text-lg: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);     /* 20-24px */
    --text-xl: clamp(1.5rem, 1.3rem + 0.5vw, 1.75rem);     /* 24-28px */
    --text-2xl: clamp(1.75rem, 1.5rem + 0.75vw, 2.25rem);  /* 28-36px */
    --text-3xl: clamp(2.25rem, 1.8rem + 1vw, 3rem);        /* 36-48px */
    --text-4xl: clamp(2.75rem, 2.2rem + 1.5vw, 3.5rem);    /* 44-56px */
    --text-5xl: clamp(3.5rem, 2.8rem + 2vw, 4.5rem);       /* 56-72px */
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Modern Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Modern Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Modern Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

/* Base Typography */
body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-color);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-color);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-6);
    letter-spacing: var(--tracking-tighter);
}

h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-5);
    position: relative;
    padding-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-3);
}

h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
    max-width: 65ch; /* Optimal line length for readability */
}

/* Modern Text Styles */
.text-xs {
    font-size: var(--text-xs);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-wide);
}

.text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
}

.text-base {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
}

.text-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
}

.text-xl {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-tight);
}

/* Font Weights */
.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

/* Navigation Typography */
.nav-link {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--text-color);
}

.navbar-brand {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-tight);
}

/* Button Typography */
.btn {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.btn-lg {
    font-size: var(--text-lg);
    letter-spacing: var(--tracking-tight);
}

.btn-sm {
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wide);
}

/* Form Typography */
.form-label {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--text-color);
}

.form-control {
    font-size: var(--text-base);
    font-family: var(--font-sans);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
}

/* Card Typography */
.card-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-3);
}

.card-subtitle {
    font-size: var(--text-base);
    color: var(--text-color);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-4);
}

/* Alert Typography */
.alert {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    color: var(--text-color);
}

.alert-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

/* Badge Typography */
.badge {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-tight);
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.btn:hover:before {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--bg-light);
    border-color: var(--text-color);
    color: var(--text-color);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Modern Card Styles */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* Modern Form Styles */
.form-control {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: white;
    transition: var(--transition-normal);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-label {
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

/* Modern Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
}

.bg-primary-soft {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

.navbar-brand:hover {
    color: var(--primary-color);
}

.nav-link:hover {
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* Mobile Menu */
.navbar-toggler {
    display: none;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
}

@media (max-width: 992px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: white;
        padding: 2rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }

    .navbar-nav.active {
        right: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    cursor: pointer;
}

.language-selector:hover {
    background-color: var(--bg-light);
}

.language-selector svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

.language-selector span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(249, 250, 251, 0.5), rgba(255, 255, 255, 0));
}

.hero-section:before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 45%;
    height: 70%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: -1;
    animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-image {
    position: relative;
    animation: float 6s ease-in-out infinite;
    z-index: 1;
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.1));
    max-width: 90%;
    margin: 0 auto;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Features Section */
.feature-card {
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
    overflow: hidden;
    padding: var(--space-6);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
    opacity: 0;
    transition: var(--transition-normal);
}

.feature-card:hover:before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    transition: var(--transition-normal);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
    background: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
}

.feature-card:hover .feature-icon svg {
    color: white;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
    color: var(--text-color);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Converter Section */
.converter-section {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(249, 250, 251, 0.5));
    padding: var(--space-16) 0;
    position: relative;
}

.converter-section:before {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 45%;
    height: 70%;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(37, 99, 235, 0.05));
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    z-index: -1;
    animation: gradientShift 15s ease-in-out infinite reverse;
}

.converter-form {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.converter-form:before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.converter-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-8);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.converter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: white;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* File Input Styling */
.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-light);
    transition: var(--transition-normal);
    cursor: pointer;
}

.file-input-wrapper:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    color: var(--primary-color);
}

.file-input-text {
    flex: 1;
}

.file-input-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: var(--space-1);
}

.file-input-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Alert Styles */
.alert {
    position: relative;
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-color);
    color: var(--success-dark);
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-dark);
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-color);
    color: var(--warning-dark);
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info-color);
    color: var(--info-dark);
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-content {
    flex: 1;
}

.alert-message {
    margin: 0;
    line-height: 1.5;
}

.alert-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-1);
    background: transparent;
    border: none;
    color: currentColor;
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition-normal);
}

.alert-close:hover {
    opacity: 1;
}

/* How It Works */
.how-it-works-step {
    position: relative;
    transition: var(--transition-normal);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.how-it-works-step:hover {
    transform: translateY(-5px);
    background-color: white;
    box-shadow: var(--shadow-md);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.step-number:after {
    content: '';
    position: absolute;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2px dashed rgba(67, 97, 238, 0.3);
    z-index: -1;
    animation: spin 15s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    background-color: #2b2d42 !important;
    color: white;
    padding: 2rem 0 !important;
}

/* Flipbook Viewer Styles */
.flipbook-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: auto;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-light);
}

@supports not (aspect-ratio: 16/9) {
    /* Fallback for browsers that don't support aspect-ratio */
    .flipbook-wrapper {
        height: 0;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
    }
}

.flipbook-wrapper iframe,
.flipbook-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 992px) {
    .flipbook-wrapper {
        aspect-ratio: 4/3;
    }
    
    @supports not (aspect-ratio: 4/3) {
        .flipbook-wrapper {
            padding-bottom: 75%; /* 4:3 aspect ratio */
        }
    }
}

@media (max-width: 768px) {
    .flipbook-wrapper {
        aspect-ratio: 1/1;
    }
    
    @supports not (aspect-ratio: 1/1) {
        .flipbook-wrapper {
            padding-bottom: 100%; /* 1:1 aspect ratio for smaller screens */
        }
    }
}

@media (max-width: 576px) {
    .flipbook-wrapper {
        box-shadow: var(--shadow-md);
        border-radius: calc(var(--radius-lg) / 2);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section {
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-image {
        animation: none;
        margin-top: 2rem;
    }
    
    .how-it-works-step {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
}

/* Flipbook Viewer Page Styles */
.flipbook-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Viewer Header */
.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.viewer-header .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.viewer-header .brand svg,
.viewer-header .brand img {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.hamburger-menu {
    border: none;
    background: transparent;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-normal);
}

.hamburger-menu:hover {
    background-color: var(--bg-light);
}

/* Document Info Section */
.document-info {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
}

.document-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.document-title svg,
.document-title img {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.document-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    color: white;
}

.action-button.primary {
    background-color: var(--primary-color);
}

.action-button.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-button svg,
.action-button img {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

/* Viewer Controls */
.viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin: 0 2rem 1.5rem;
}

.page-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button,
.view-button {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.nav-button:hover,
.view-button:hover {
    background-color: var(--bg-light);
}

.page-indicator {
    font-size: 0.875rem;
    color: var(--text-color);
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Flipbook Content */
.flipbook-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
    position: relative;
    height: auto;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-light);
}

@supports not (aspect-ratio: 16/9) {
    /* Fallback for browsers that don't support aspect-ratio */
    .flipbook-wrapper {
        height: 0;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
    }
}

.flipbook-wrapper iframe,
.flipbook-wrapper canvas,
.flipbook-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.page-display {
    display: flex;
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.page-left,
.page-right {
    flex: 1;
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    overflow: hidden;
}

/* Viewer Footer */
.viewer-footer {
    margin-top: auto;
    background-color: var(--dark-bg);
    color: white;
    padding: 3rem 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.footer-brand svg,
.footer-brand img {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    max-width: 400px;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.875rem;
}

.newsletter-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition-normal);
}

.newsletter-button:hover {
    background-color: var(--primary-hover);
}

/* Modern Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-0.25rem) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.back-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform var(--transition-normal);
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .document-info {
        padding: 1.25rem;
    }
    
    .viewer-controls {
        margin: 0 1.25rem 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .flipbook-wrapper {
        aspect-ratio: 4/3;
        margin: 0 1.25rem 1.5rem;
        max-width: calc(100% - 2.5rem);
    }
    
    @supports not (aspect-ratio: 4/3) {
        .flipbook-wrapper {
            padding-bottom: 75%; /* 4:3 aspect ratio */
        }
    }
}

@media (max-width: 768px) {
    .viewer-header {
        padding: 0.75rem 1.25rem;
    }
    
    .document-title {
        font-size: 1.25rem;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .action-button {
        width: 100%;
    }
    
    .page-nav,
    .view-controls {
        margin: 0.25rem 0;
    }
    
    .viewer-controls {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        gap: 0.5rem;
        border-radius: 6px;
    }
    
    .flipbook-wrapper {
        aspect-ratio: 3/4; /* Portrait orientation for mobile */
        margin: 0 1rem 1.5rem;
        max-width: calc(100% - 2rem);
    }
    
    @supports not (aspect-ratio: 3/4) {
        .flipbook-wrapper {
            padding-bottom: 133.33%; /* 3:4 aspect ratio */
        }
    }
    
    .page-display {
        flex-direction: column;
    }
    
    .viewer-footer {
        padding: 2rem 1.25rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .newsletter-input,
    .newsletter-button {
        border-radius: 4px;
        width: 100%;
    }
    
    .footer {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .list-inline-item:not(:last-child) {
        margin-right: 1rem;
    }
}

@media (max-width: 576px) {
    .viewer-header .brand {
        font-size: 1rem;
    }
    
    .viewer-header .brand svg,
    .viewer-header .brand img {
        width: 24px;
        height: 24px;
    }
    
    .document-title {
        font-size: 1.1rem;
    }
    
    .page-indicator {
        font-size: 0.75rem;
    }
    
    .nav-button,
    .view-button {
        width: 32px;
        height: 32px;
    }
    
    .flipbook-wrapper {
        border-radius: calc(var(--radius-lg) / 2);
        box-shadow: var(--shadow-md);
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Footer Styles */
.footer {
    background: linear-gradient(to bottom, rgba(249, 250, 251, 0.5), rgba(255, 255, 255, 0));
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
}

.footer-brand {
    color: var(--text-color);
}

.footer-brand svg {
    transition: var(--transition-normal);
}

.footer-brand:hover svg {
    transform: rotate(-10deg);
}

.social-icons {
    margin-top: 1.5rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: var(--transition-normal);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.newsletter-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.75rem 1.25rem;
}

.newsletter-button:hover {
    transform: none;
}

hr {
    border-color: var(--border-color);
    opacity: 0.5;
}

.list-inline-item:not(:last-child) {
    margin-right: 1.5rem;
}

.list-inline-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.list-inline-item a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .list-inline-item:not(:last-child) {
        margin-right: 1rem;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Go Top Button */
.go-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transform: translateY(20px);
}

.go-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
}

.go-top-btn:active {
    transform: translateY(-2px);
}

.go-top-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.go-top-btn:hover i {
    transform: translateY(-2px);
}

/* Mobile responsive adjustments for Go Top button */
@media (max-width: 768px) {
    .go-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .go-top-btn i {
        font-size: 1.1rem;
    }
}

/* Viewer Controls Typography */
.page-info {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-color);
}

.page-indicator {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-color);
}

.toolbar-btn {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
}

/* Document Info Typography */
.document-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
}

.document-subtitle {
    font-size: var(--text-base);
    color: var(--text-color);
}

/* Footer Typography */
.footer-brand {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
}

.footer-links a {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
}

/* Responsive Typography Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: var(--text-3xl);
    }
    
    h2 {
        font-size: var(--text-2xl);
    }
    
    h3 {
        font-size: var(--text-xl);
    }
    
    .document-title {
        font-size: var(--text-2xl);
    }
    
    .page-info, .page-indicator {
        font-size: var(--text-sm);
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: var(--text-2xl);
    }
    
    h2 {
        font-size: var(--text-xl);
    }
    
    h3 {
        font-size: var(--text-lg);
    }
    
    .document-title {
        font-size: var(--text-xl);
    }
    
    .btn {
        font-size: var(--text-sm);
    }
} 