/* PaperVista Custom Styles */

/* CSS Custom Properties (Design Tokens) */
:root {
    --primary-blue: #2563EB;
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #1E3A8A;
    --dark-blue: #1E3A8A;
    --navy-blue: #1a3a7d;
    --success-green: #10B981;
    --warning-yellow: #FDB022;
    --error-red: #EF4444;
    --info-blue: #3DDAD7;

    --white: #FFFFFF;
    --light-gray: #E8E8E8;
    --medium-gray: #64748B;
    --dark-gray: #333333;
    --charcoal: #0F172A;

    --font-family-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.main-content {
    /* Removed min-height to prevent footer overlap */
}

.container {
    max-width: 1200px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

.text-primary { color: var(--primary-blue) !important; }
.text-muted { color: var(--medium-gray) !important; }
.bg-primary { background-color: var(--primary-blue) !important; }
.bg-light { background-color: var(--light-gray) !important; }

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* Navigation */
.navbar {
    background-color: var(--light-gray) !important;
    border-bottom: none;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-gray) !important;
    transition: all 0.3s ease;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue) !important;
}

.navbar .btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 600;
    padding: 0.5rem 2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.navbar .btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Hero Section */
.hero {
    background: #E8E8E8;
    color: var(--dark-gray);
    position: relative;
    overflow: visible;
    padding: 1rem 0 2rem 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    color: white;
}

.hero .lead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Search Card */
.search-card {
    background: #1e3a8a;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 2rem 2.5rem;
    margin: 1rem 0 0 0;
    position: relative;
    z-index: 3;
    max-width: 440px;
}

.search-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input-wrapper .form-control {
    border: 2px solid white;
    border-radius: 4px;
    padding: 0.9rem 2.5rem 0.9rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    background: transparent;
    color: white;
}

.search-input-wrapper .form-control:focus {
    border-color: white;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.search-input-wrapper .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    pointer-events: none;
    font-size: 1rem;
}

.search-card .btn-light {
    background: white;
    color: #1e3a8a;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    width: 100%;
}

.search-card .btn-light:hover {
    background: #f9fafb;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Hero Illustration */
.hero-illustration-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

.hero-illustration-image {
    max-width: 100%;
    height: auto;
    width: 600px;
    object-fit: contain;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-15px);
    }
}

/* Cards */
.card {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: #d1d5db;
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-weight: 600;
    color: var(--dark-gray);
}

.card-text {
    color: var(--medium-gray);
    line-height: 1.6;
}

/* Forms */
.form-control {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #999;
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-red);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-yellow);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info-blue);
}

/* Footer */
footer {
    background-color: var(--charcoal) !important;
    margin-top: auto;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-blue-light) !important;
}

.footer-note-section {
    background: #E8E8E8;
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
}

.footer-note-text {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    font-weight: 400;
}

/* Feature Icons Styling */
.hero .col-md-4 h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero .col-md-4 p {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-illustration-wrapper {
        display: none !important;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero {
        padding: 3rem 0 4rem 0;
    }
    
    .search-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .search-card {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        margin: 1.5rem 0 2rem 0;
        max-width: 100%;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .footer-note-section {
        padding: 1.5rem 0;
    }
    
    .footer-note-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 2rem 0 3rem 0;
    }

    .hero h1 {
        font-size: 1.9rem;
    }
    
    .hero .lead {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem !important;
    }

    .search-card {
        padding: 1.8rem 1.2rem 1.5rem 1.2rem;
        max-width: 100%;
    }
    
    .search-card h3 {
        font-size: 0.85rem;
    }
    
    .search-card .btn-light {
        font-size: 0.9rem;
        padding: 0.9rem 1.5rem;
    }
    
    .navbar .btn-outline-primary {
        padding: 0.4rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .footer-note-text {
        font-size: 0.7rem;
        padding: 0 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

/* Dropdown Menus */
.dropdown-menu {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
    color: var(--dark-gray);
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: var(--primary-blue);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
