/* ===== PROFESSIONAL TAX SOFTWARE DESIGN ===== */
/* Modern CSS Variables for Professional Tax Software UI */
:root {
    /* Primary Colors - Professional Blue Palette */
    --primary-900: #1e3a8a;
    --primary-800: #1e40af;
    --primary-700: #1d4ed8;
    --primary-600: #2563eb;
    --primary-500: #3b82f6;
    --primary-400: #60a5fa;
    --primary-300: #93c5fd;
    --primary-200: #bfdbfe;
    --primary-100: #dbeafe;
    --primary-50: #eff6ff;

    /* Success/Trust Colors */
    --success-600: #059669;
    --success-500: #10b981;
    --success-400: #34d399;
    --success-100: #d1fae5;

    /* Neutral Colors */
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;

    /* Semantic Colors */
    --white: #ffffff;
    --black: #000000;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* 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);

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

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

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; }

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

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

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

/* ===== TOPBAR STYLES ===== */
.topbar {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--primary-700);
}

.topbar a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity var(--transition-fast);
}

.topbar a:hover {
    opacity: 0.8;
    color: var(--white);
}

/* ===== NAVIGATION STYLES ===== */
.navbar {
    background: var(--white) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-900) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    border-radius: var(--radius-md);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-600) !important;
    background-color: var(--primary-50);
}

.navbar-nav .nav-link.active {
    color: var(--primary-600) !important;
    background-color: var(--primary-100);
}

/* ===== BUTTON STYLES ===== */
.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
}

.btn-outline-primary:hover {
    background: var(--primary-600);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: var(--white);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-600) 100%);
    transform: translateY(-1px);
    color: var(--white);
}

/* ===== HERO SECTION STYLES ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 50%, var(--primary-700) 100%);
    color: var(--white);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.1;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--primary-100);
    font-weight: 400;
}

.hero .btn {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    margin: 0.5rem;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    background: var(--white);
    overflow: hidden;
}

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

.card-feature {
    padding: 2rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-feature .icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.card-feature h5 {
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 700;
}

.card-feature p {
    color: var(--gray-600);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-feature .btn {
    margin-top: auto;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 80px 0;
}

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

.section-header h2 {
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.section-light {
    background: var(--gray-50);
}

.section-primary {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
    color: var(--white);
}

.section-primary h2,
.section-primary h3,
.section-primary h4,
.section-primary h5,
.section-primary h6 {
    color: var(--white);
}

.section-primary p {
    color: var(--primary-100);
}

/* ===== FEATURE GRID ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-item .icon {
    width: 3rem;
    height: 3rem;
    background: var(--success-100);
    color: var(--success-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.feature-item h6 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.feature-item p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ===== CTA BAR STYLES ===== */
.cta-bar {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 2rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.cta-bar h5 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.cta-bar .text-muted {
    color: var(--gray-600) !important;
}

/* ===== FOOTER STYLES ===== */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

footer h5, footer h6 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer .list-unstyled {
    margin: 0;
    padding: 0;
}

footer .list-unstyled li {
    margin-bottom: 0.75rem;
}

footer .list-unstyled a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
    text-decoration: none;
}

footer .list-unstyled a:hover {
    color: var(--white);
}

footer .footer-bottom {
    border-top: 1px solid var(--gray-700);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
}

footer .footer-bottom p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===== PRICING STYLES ===== */
.pricing .card {
    border: 2px solid var(--gray-200);
    transition: all var(--transition-normal);
    position: relative;
}

.pricing .card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-lg);
}

.pricing .card.featured {
    border-color: var(--primary-500);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pricing .card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-600);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing .price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
}

.pricing .price-period {
    color: var(--gray-500);
    font-size: 1rem;
    font-weight: 400;
}

/* ===== TESTIMONIAL STYLES ===== */
.testimonial {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    height: 100%;
}

.testimonial .quote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial .author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial .author img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial .author-info h6 {
    margin: 0;
    color: var(--gray-900);
    font-weight: 600;
}

.testimonial .author-info p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===== STATS STYLES ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-600);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
}

/* ===== UTILITY CLASSES ===== */
.text-primary { color: var(--primary-600) !important; }
.text-success { color: var(--success-600) !important; }
.text-muted { color: var(--gray-500) !important; }
.bg-light { background-color: var(--gray-50) !important; }
.bg-primary { background-color: var(--primary-600) !important; }
.bg-success { background-color: var(--success-600) !important; }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ===== CONTAINER WIDTHS ===== */
.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1320px; /* Wider than default Bootstrap */
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1480px; /* Even wider for extra large screens */
    }
}

/* ===== RESPONSIVE DESIGN ===== */
/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .hero h1 {
        font-size: 4rem;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199.98px) {
    .hero h1 {
        font-size: 3rem;
    }

    .section {
        padding: 60px 0;
    }

    .pricing .card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
}

/* Small screens (576px to 767px) */
@media (max-width: 767.98px) {
    .hero {
        padding: 80px 0 60px;
        text-align: center;
    }

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

    .hero .lead {
        font-size: 1.125rem;
    }

    .section {
        padding: 50px 0;
    }

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

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

    .card-feature {
        padding: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .cta-bar {
        text-align: center;
    }

    .cta-bar .d-flex {
        flex-direction: column !important;
        gap: 1rem;
    }

    footer .row > div {
        margin-bottom: 2rem;
    }

    footer .text-end {
        text-align: center !important;
    }
}

/* Extra small screens (575px and below) */
@media (max-width: 575.98px) {
    .hero {
        padding: 60px 0 40px;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    .hero .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero .hero-actions .btn {
        width: 100%;
        margin: 0;
    }

    .section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .card-feature {
        padding: 1.25rem;
    }

    .feature-item {
        padding: 1.25rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .pricing .price {
        font-size: 2.5rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        width: 60px !important;
        height: 60px !important;
    }

    .topbar {
        text-align: center;
        padding: 12px 0;
    }

    .topbar .d-flex {
        flex-direction: column !important;
        gap: 0.5rem;
    }

    /* Mobile-specific improvements */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Better mobile spacing */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1.5rem;
    }

    /* Mobile testimonials */
    .testimonial {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Mobile floating stats */
    .floating-stat {
        position: static !important;
        margin: 1rem 0 !important;
        transform: none !important;
    }

    .hero-image .floating-stat:first-of-type {
        margin-top: 2rem !important;
    }

    /* Mobile dashboard preview */
    .dashboard-preview {
        margin-top: 2rem;
    }

    /* Mobile step numbers */
    .step-number {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
    }

    /* Mobile accordion */
    .accordion-button {
        font-size: 0.95rem;
        padding: 1rem 0.75rem;
    }

    /* Mobile form controls */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Mobile trust logos */
    .trust-logos img {
        max-width: 100px;
        height: auto;
    }
}

/* ===== ACCESSIBILITY & FOCUS STYLES ===== */
.btn:focus,
.nav-link:focus,
a:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ===== ANIMATION CLASSES ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */
/* Reduce animations on mobile for better performance */
@media (max-width: 767.98px) {
    * {
        animation-duration: 0.1s !important;
        animation-delay: 0s !important;
        transition-duration: 0.1s !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .floating-stat {
        animation: none;
    }
}

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item,
    .accordion-button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Larger tap targets */
    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }

    /* Remove hover effects on touch devices */
    .card:hover,
    .feature-item:hover,
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 767.98px) {
    body {
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Better mobile table handling */
    .table-responsive {
        font-size: 0.875rem;
    }

    /* Mobile-friendly form elements */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }

    /* Better mobile spacing */
    .mb-4 {
        margin-bottom: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2.5rem !important;
    }

    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .topbar,
    .navbar,
    .cta-bar,
    footer {
        display: none !important;
    }

    .hero {
        background: none !important;
        color: var(--black) !important;
        padding: 2rem 0 !important;
    }

    .section {
        padding: 1rem 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-300) !important;
    }
}