/**
 * Modern Premium Theme for Construction Cost Estimation Application
 * Fonts: 'Outfit' (Headings), 'Inter' (Body)
 */

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
    padding-top: 80px;
    /* Space for fixed navbar */
    padding-bottom: 60px;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.025em;
}

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

/* Navbar Customization */
.navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary) !important;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.card-body {
    padding: 1.5rem;
}

/* Hero Section (Jumbotron replacement) */
.hero-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Feature Cards (How it works) */
.feature-card {
    height: 100%;
    padding: 2rem;
    text-align: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    background: var(--gradient-primary);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.file-upload-area .upload-icon {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.file-upload-area:hover .upload-icon {
    transform: scale(1.1);
    color: var(--primary);
}

/* File Icons */
.file-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.document-card:hover .file-icon {
    transform: scale(1.1);
}

.file-icon.pdf {
    color: #ef4444;
}

.file-icon.image {
    color: #10b981;
}

.file-icon.excel {
    color: #10b981;
}

.file-icon.word {
    color: #3b82f6;
}

.file-icon.powerpoint {
    color: #f97316;
}

.file-icon.autocad {
    color: #ef4444;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.rtl .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.rtl .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

.rtl .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}

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

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

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

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}


/* Mobile & Outdoor Optimization */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        /* Larger base font */
    }

    .btn {
        padding: 0.8rem 1.5rem;
        /* Larger touch target */
        font-size: 1.1rem;
        width: 100%;
        /* Full width buttons on mobile */
        margin-bottom: 0.5rem;
    }

    .form-control,
    .form-select {
        font-size: 1.1rem;
        padding: 0.8rem;
        /* Larger input areas */
        border-width: 2px;
        /* Thicker borders for visibility */
        border-color: #cbd5e1;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    }

    .card {
        border-radius: 0;
        /* Maximize space on small screens */
        box-shadow: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Improve table readability on mobile */
    .table-responsive {
        border: 1px solid #e2e8f0;
        border-radius: var(--radius-md);
    }

    /* Stack form labels for better readability */
    .col-form-label {
        padding-bottom: 0;
        font-weight: 600;
    }
}

/* High Contrast / Outdoor Visibility Tweaks */
.form-label {
    font-weight: 700;
    color: #0f172a;
    /* Darker for sun visibility */
}

.text-muted {
    color: #64748b !important;
    /* Darker gray, not too faint */
}

/* Ensure icons are visible */
.fas,
.far,
.fab {
    font-size: 1.1em;
}