/* Global Styles */
:root {
    --primary-color: #DC143C;
    --secondary-color: #B22222;
    --pdf-red: #DC143C;
    --pdf-dark-red: #8B0000;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-radius: 12px;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0;
}

/* Header */
.header-main {
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand i {
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.15);
    border-radius: var(--border-radius);
    border-top: 3px solid var(--primary-color);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #FFF5F5;
    padding-left: 2rem;
    color: var(--primary-color);
}

.dropdown-item i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
    margin-top: 0;
}

.main-content > .container:first-child {
    padding-top: 0;
}

.main-content .hero-section:first-child {
    margin-top: 0;
    padding-top: calc(4rem + 76px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 4rem 0;
    margin-top: 0;
    margin-bottom: 3rem;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-section .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    padding-top: 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Upload Box */
.upload-box {
    background: white;
    border: 3px dashed #FFB6C1;
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #FFF5F5;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.1);
}

.upload-box i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Tool Card */
.tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.15);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Content Box */
.content-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.content-box:first-of-type {
    margin-top: 0;
}

/* Container spacing after hero */
.hero-section + .content-box,
.hero-section + .alert,
.hero-section + form {
    margin-top: 0;
}

/* File List */
.file-list-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2.5rem;
    color: #ef4444;
}

.file-info {
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: #64748b;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(220, 20, 60, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B22222 0%, #8B0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.3);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    color: white;
}

.loading-overlay.active {
    display: flex;
}

.spinner-border {
    width: 4rem;
    height: 4rem;
}

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

.footer-main h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-main a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-main ul {
    padding: 0;
}

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

/* FAQ Section */
.faq-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.faq-question {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.faq-answer {
    color: #64748b;
    line-height: 1.7;
}

/* Article Content */
.article-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #475569;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }

    .upload-box {
        padding: 2rem 1rem;
    }

    .tool-card {
        margin-bottom: 1rem;
    }

    .main-content {
        padding: 2rem 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Progress Bar */
.progress {
    height: 2rem;
    border-radius: var(--border-radius);
    background: #FFE4E1;
}

.progress-bar {
    background: linear-gradient(90deg, #DC143C, #B22222);
    font-weight: 600;
}

/* Toast */
.toast {
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* PDF Theme Enhancements */
.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dropdown-toggle::after {
    border-top-color: rgba(255, 255, 255, 0.9);
}

/* File Icon PDF Red */
.file-icon {
    font-size: 2.5rem;
    color: #DC143C;
}

/* Alert Variants */
.alert-info {
    background-color: #FFF5F5;
    border-color: #FFB6C1;
    color: #8B0000;
}

.alert-warning {
    background-color: #FFF8DC;
    border-color: #FFD700;
}

/* Link Colors */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

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

/* Badge */
.badge {
    border-radius: 6px;
    padding: 0.35em 0.65em;
}

.badge.bg-success {
    background-color: #10b981 !important;
}

.badge.bg-danger {
    background-color: #DC143C !important;
}

/* Card Enhancements */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border-bottom: none;
}

.card.border-success {
    border: 2px solid #10b981 !important;
}

.card.border-danger {
    border: 2px solid #DC143C !important;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.15);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* R
esponsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1rem;
        margin-top: 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .upload-box {
        padding: 2rem 1rem;
    }

    .tool-card {
        margin-bottom: 1rem;
    }

    .main-content {
        padding: 0;
    }
    
    .content-box {
        padding: 1.5rem;
    }
}

/* Privacy & Terms Pages */
.content-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.content-wrapper h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.last-updated {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.policy-section {
    margin-bottom: 2.5rem;
}

.policy-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FFE4E1;
}

.policy-section p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.policy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-section li {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.policy-section a {
    color: var(--primary-color);
    font-weight: 500;
}

.policy-section a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.back-link {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.btn-secondary {
    background: #64748b;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 2rem 1.5rem;
    }

    .content-wrapper h1 {
        font-size: 1.75rem;
    }

    .policy-section h2 {
        font-size: 1.25rem;
    }
}
