/* Enhanced Responsive CSS for Quotation Generator */

:root {
    --primary: #274c77;
    --primary-dark: #2563eb;
    --secondary: #6096ba;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gradient-primary: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

* {
    box-sizing: border-box;
}

/* Mobile-First Responsive Base Styles */
body {
    background: url('/theme/image/background.svg') no-repeat center center fixed;
    background-size: cover;
    padding-top: 80px; /* For fixed header */
    padding: 15px 10px;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    width: 100%;
    overflow-x: hidden;
}

/* Ensure container uses full width on mobile */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}

/* Responsive padding for body */
@media (min-width: 480px) {
    body {
        padding: 20px 15px;
    }
}

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

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

@media (min-width: 1200px) {
    body {
        padding: 50px;
    }
    
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Fix header spacing for mobile */
header .container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Glass effect with mobile optimization */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: -5px;
    margin-right: -5px;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .glass-effect {
        margin-left: 0;
        margin-right: 0;
    }
}

.gradient-bg {
    background: var(--gradient-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tooltip with mobile consideration */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: 400;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Step Indicator - Mobile Responsive */
.step-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary) 0%, #e2e8f0 100%);
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 3px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.step.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.step.completed {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    white-space: nowrap;
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 500;
    display: none; /* Hide on mobile */
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

@media (min-width: 768px) {
    .step {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .step-label {
        display: block;
        font-size: 0.8rem;
    }
}

/* Quote Preview - Mobile Responsive */
.quote-preview {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .quote-preview {
        min-height: 500px;
        padding: 2rem;
    }
}

/* Template Cards - Mobile Responsive */
.template-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 0 5px;
}

.template-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.template-card.selected {
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.template-card.selected::before {
    opacity: 1;
}

/* Item Rows */
.item-row {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.item-row:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}

/* Color Options - Mobile Responsive */
.color-option {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 0 auto;
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #1f2937;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Dashboard Cards */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.floating-btn {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Logo Preview */
.logo-preview {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

@media (min-width: 768px) {
    .logo-preview {
        max-width: 180px;
        max-height: 100px;
    }
}

/* Template Preview */
.template-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .template-preview {
        height: 140px;
    }
}

.template-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.template-card:hover .template-preview::after {
    opacity: 1;
}

.freelancer-template { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.contractor-template { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.plumber-template { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.designer-template { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

/* Input Fields - Mobile Responsive */
.input-modern {
    transition: all 0.3s;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
}

.input-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

@media (max-width: 480px) {
    .input-modern {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Buttons - Mobile Responsive */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    font-size: 1rem;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

@media (min-width: 480px) {
    .btn-primary,
    .btn-secondary {
        width: auto;
        padding: 12px 24px;
    }
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-quote, #printable-quote * {
        visibility: visible;
    }
    #printable-quote {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        background: white;
    }
    .no-print {
        display: none !important;
    }
}

/* Navigation Links */
.nav-link {
    cursor: pointer;
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
}

.nav-link:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .nav-link {
        padding: 8px 16px;
        font-size: 1rem;
    }
}

/* Section Title */
.section-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* Feature Cards - Mobile Responsive */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    height: 100%;
    margin: 0 5px 15px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .feature-card {
        margin: 0;
    }
}

/* Stats Cards */
.stats-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .stats-card {
        margin-bottom: 0;
    }
}

/* Testimonial Cards - Mobile Responsive */
.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    margin: 0 5px 15px;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 60px;
    color: rgba(59, 130, 246, 0.2);
    font-family: Georgia, serif;
}

@media (min-width: 768px) {
    .testimonial-card {
        margin: 0;
        padding: 25px;
    }
}

/* Pricing Cards - Mobile Responsive */
.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin: 0 5px 15px;
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--gradient-primary);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: 600;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .pricing-card {
        margin: 0;
        padding: 30px;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 80px; /* Account for header */
    right: 10px;
    left: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(150%);
    transition: transform 0.3s;
    max-width: 400px;
    margin: 0 auto;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.info {
    background: var(--primary);
}

@media (min-width: 768px) {
    .notification {
        right: 20px;
        left: auto;
        margin: 0;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Dark Mode */
.dark-mode {
    background: #1a202c;
    color: #e2e8f0;
}

.dark-mode .glass-effect {
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(74, 85, 104, 0.2);
}

.dark-mode .input-modern {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .feature-card,
.dark-mode .testimonial-card,
.dark-mode .pricing-card {
    background: #2d3748;
    color: #e2e8f0;
}

.dark-mode .quote-preview {
    background: #2d3748;
    color: #e2e8f0;
}

.dark-mode-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #cbd5e0;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.dark-mode-toggle.active {
    background: var(--primary);
}

.dark-mode-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.dark-mode-toggle.active::after {
    transform: translateX(30px);
}

/* Enhanced Layout Styles with Proper Styling */
.layout-simple {
    font-family: Arial, sans-serif;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.layout-modern {
    font-family: 'Inter', sans-serif;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.layout-formal {
    font-family: Georgia, 'Times New Roman', Times, serif;
    background: #fefefe;
    border: 2px solid #e8e6e1;
    border-radius: 4px;
    color: #333;
}

.layout-minimal {
    font-family: 'Inter', sans-serif;
    background: white;
    border: 3px solid #f1f5f9;
    border-radius: 12px;
}

.layout-professional {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 8px;
}

.layout-elegant {
    font-family: 'Playfair Display', Georgia, serif;
    background: #fefefe;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    color: #444;
}

.layout-bold {
    font-family: 'Inter', sans-serif;
    background: #1a202c;
    color: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.layout-clean {
    font-family: 'Inter', sans-serif;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

/* Quote Preview Container Styles */
.quote-preview-container {
    transition: all 0.3s ease;
}

.layout-modern .quote-preview-container {
    background: linear-gradient(135deg, var(--primary-color, #3b82f6) 0%, var(--secondary-color, #8b5cf6) 100%);
    color: white;
    padding: 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

.layout-formal .quote-preview-container {
    text-align: center;
    padding: 1.5rem;
    border-bottom: 3px double #8b7355;
    margin-bottom: 1.5rem;
    background: #f9f7f3;
}

.layout-minimal .quote-preview-container {
    padding: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.layout-clean .quote-preview-container {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    background: #f8fafc;
}

.layout-bold .quote-preview-container {
    background: #2d3748;
    padding: 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 8px 8px 0 0;
}

.layout-elegant .quote-preview-container {
    padding: 1.5rem;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .layout-modern .quote-preview-container,
    .layout-bold .quote-preview-container {
        margin: -2rem -2rem 2rem -2rem;
        padding: 2.5rem;
    }
    
    .layout-formal .quote-preview-container,
    .layout-elegant .quote-preview-container {
        padding: 2.5rem;
    }
}

/* Table Enhancements for Each Layout */
.layout-simple table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    font-size: 0.9rem;
}

.layout-simple table th {
    background: #f8fafc;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    padding: 8px;
}

.layout-modern table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.layout-modern table th {
    background: #f1f5f9;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    padding: 8px;
}

.layout-formal table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border: 1px solid #d4c9b8;
    font-size: 0.9rem;
}

.layout-formal table th {
    background: #f5f2ed;
    font-weight: 600;
    border: 1px solid #d4c9b8;
    font-family: Georgia, serif;
    padding: 8px;
}

.layout-minimal table {
    border-collapse: collapse;
    width: 100%;
    background: #f8fafc;
    border: none;
    font-size: 0.9rem;
}

.layout-minimal table th {
    background: #e2e8f0;
    font-weight: 500;
    border: none;
    padding: 8px;
}

.layout-minimal table td {
    border: none;
    background: white;
    padding: 8px;
}

.layout-professional table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.layout-professional table th {
    background: #f8fafc;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    padding: 8px;
}

.layout-elegant table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border: 1px solid #e8e8e8;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
}

.layout-elegant table th {
    background: #f9f9f9;
    font-weight: 600;
    border: 1px solid #e8e8e8;
    padding: 8px;
}

.layout-bold table {
    border-collapse: collapse;
    width: 100%;
    background: #2d3748;
    border: 1px solid #4a5568;
    font-size: 0.9rem;
}

.layout-bold table th {
    background: #4a5568;
    font-weight: 600;
    border: 1px solid #4a5568;
    color: white;
    padding: 8px;
}

.layout-bold table td {
    border: 1px solid #4a5568;
    color: #e2e8f0;
    padding: 8px;
}

.layout-clean table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.layout-clean table th {
    background: #f1f5f9;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    padding: 8px;
}

.layout-clean table td {
    font-size: 0.85rem;
    padding: 8px;
}

@media (min-width: 768px) {
    .layout-simple table,
    .layout-modern table,
    .layout-formal table,
    .layout-minimal table,
    .layout-professional table,
    .layout-elegant table,
    .layout-bold table,
    .layout-clean table {
        font-size: 1rem;
    }
    
    .layout-simple table th,
    .layout-modern table th,
    .layout-formal table th,
    .layout-minimal table th,
    .layout-professional table th,
    .layout-elegant table th,
    .layout-bold table th,
    .layout-clean table th,
    .layout-simple table td,
    .layout-modern table td,
    .layout-formal table td,
    .layout-minimal table td,
    .layout-professional table td,
    .layout-elegant table td,
    .layout-bold table td,
    .layout-clean table td {
        padding: 12px;
    }
}

/* Color Scheme System */
.color-scheme-blue { 
    --primary-color: #3b82f6; 
    --secondary-color: #60a5fa;
    --light-color: #dbeafe;
    --dark-color: #1e40af;
}

.color-scheme-green { 
    --primary-color: #10b981; 
    --secondary-color: #34d399;
    --light-color: #d1fae5;
    --dark-color: #047857;
}

.color-scheme-purple { 
    --primary-color: #8b5cf6; 
    --secondary-color: #a78bfa;
    --light-color: #ede9fe;
    --dark-color: #6d28d9;
}

.color-scheme-red { 
    --primary-color: #ef4444; 
    --secondary-color: #f87171;
    --light-color: #fee2e2;
    --dark-color: #dc2626;
}

.color-scheme-dark { 
    --primary-color: #1e293b; 
    --secondary-color: #475569;
    --light-color: #f1f5f9;
    --dark-color: #0f172a;
}

/* Dynamic Color Application Classes */
.dynamic-color {
    color: var(--primary-color) !important;
}

.dynamic-bg {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.dynamic-border {
    border-color: var(--primary-color) !important;
}

/* Font Classes */
.font-serif {
    font-family: Georgia, 'Times New Roman', Times, serif !important;
}

.font-sans {
    font-family: 'Inter', sans-serif !important;
}

/* Layout Option Styling */
.layout-option {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background: white;
    text-align: center;
}

.layout-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.layout-option.active {
    border-color: #3b82f6;
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

@media (min-width: 768px) {
    .layout-option {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

/* Enhanced Color Scheme System with Toggle - Fixed Container */
.color-schemes-container {
    position: relative;
    width: 100%;
}

.color-schemes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.color-schemes-expanded {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
    width: 100%;
}

/* For larger screens, show more columns */
@media (min-width: 768px) {
    .color-schemes-expanded {
        grid-template-columns: repeat(10, 1fr);
    }
}

/* Scrollable container for mobile */
@media (max-width: 767px) {
    .color-schemes-expanded {
        grid-template-columns: repeat(5, 1fr);
        overflow-y: auto;
        max-height: 150px;
    }
}

.color-schemes-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
    width: 100%;
    justify-content: center;
    margin-top: 5px;
}

.color-schemes-toggle:hover {
    color: #3b82f6;
}

.color-schemes-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

/* Toggle state */
#colorSchemesToggle:checked ~ .color-schemes-expanded {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
    padding: 5px 0;
}

#colorSchemesToggle:checked ~ .color-schemes-toggle i {
    transform: rotate(180deg);
}

#colorSchemesToggle:checked ~ .color-schemes-toggle span {
    color: #3b82f6;
}

/* Hide the checkbox */
#colorSchemesToggle {
    display: none;
}

/* New Color Schemes */
.color-scheme-orange { 
    --primary-color: #f97316; 
    --secondary-color: #fb923c;
    --light-color: #ffedd5;
    --dark-color: #c2410c;
}

.color-scheme-pink { 
    --primary-color: #ec4899; 
    --secondary-color: #f472b6;
    --light-color: #fce7f3;
    --dark-color: #be185d;
}

.color-scheme-teal { 
    --primary-color: #14b8a6; 
    --secondary-color: #2dd4bf;
    --light-color: #ccfbf1;
    --dark-color: #0f766e;
}

.color-scheme-amber { 
    --primary-color: #f59e0b; 
    --secondary-color: #fbbf24;
    --light-color: #fef3c7;
    --dark-color: #d97706;
}

.color-scheme-indigo { 
    --primary-color: #6366f1; 
    --secondary-color: #818cf8;
    --light-color: #e0e7ff;
    --dark-color: #4338ca;
}

.color-scheme-rose { 
    --primary-color: #f43f5e; 
    --secondary-color: #fb7185;
    --light-color: #ffe4e6;
    --dark-color: #be123c;
}

.color-scheme-cyan { 
    --primary-color: #06b6d4; 
    --secondary-color: #22d3ee;
    --light-color: #cffafe;
    --dark-color: #0e7490;
}

.color-scheme-lime { 
    --primary-color: #84cc16; 
    --secondary-color: #a3e635;
    --light-color: #ecfccb;
    --dark-color: #65a30d;
}

.color-scheme-violet { 
    --primary-color: #8b5cf6; 
    --secondary-color: #a78bfa;
    --light-color: #ede9fe;
    --dark-color: #6d28d9;
}

.color-scheme-emerald { 
    --primary-color: #10b981; 
    --secondary-color: #34d399;
    --light-color: #d1fae5;
    --dark-color: #047857;
}

.color-scheme-fuchsia { 
    --primary-color: #d946ef; 
    --secondary-color: #e879f9;
    --light-color: #fae8ff;
    --dark-color: #a21caf;
}

.color-scheme-sky { 
    --primary-color: #0ea5e9; 
    --secondary-color: #38bdf8;
    --light-color: #e0f2fe;
    --dark-color: #0369a1;
}

.color-scheme-stone { 
    --primary-color: #78716c; 
    --secondary-color: #a8a29e;
    --light-color: #fafaf9;
    --dark-color: #44403c;
}

.color-scheme-slate { 
    --primary-color: #64748b; 
    --secondary-color: #94a3b8;
    --light-color: #f1f5f9;
    --dark-color: #334155;
}

.color-scheme-neutral { 
    --primary-color: #737373; 
    --secondary-color: #a3a3a3;
    --light-color: #fafafa;
    --dark-color: #404040;
}

.color-scheme-zinc { 
    --primary-color: #71717a; 
    --secondary-color: #a1a1aa;
    --light-color: #fafafa;
    --dark-color: #3f3f46;
}

.color-scheme-gray { 
    --primary-color: #6b7280; 
    --secondary-color: #9ca3af;
    --light-color: #f9fafb;
    --dark-color: #374151;
}

.color-scheme-gold { 
    --primary-color: #f59e0b; 
    --secondary-color: #fbbf24;
    --light-color: #fef3c7;
    --dark-color: #d97706;
}

.color-scheme-bronze { 
    --primary-color: #cd7f32; 
    --secondary-color: #da9a5d;
    --light-color: #f5e6d3;
    --dark-color: #a5672e;
}

/* Fix Badge Colors */
.bg-blue-100 { background-color: #dbeafe !important; }
.text-blue-600 { color: #2563eb !important; }

.bg-amber-100 { background-color: #fef3c7 !important; }
.text-amber-600 { color: #d97706 !important; }

.bg-purple-100 { background-color: #ede9fe !important; }
.text-purple-600 { color: #7c3aed !important; }

.bg-green-100 { background-color: #dcfce7 !important; }
.text-green-600 { color: #16a34a !important; }

.bg-cyan-100 { background-color: #cffafe !important; }
.text-cyan-600 { color: #0891b2 !important; }

.bg-rose-100 { background-color: #ffe4e6 !important; }
.text-rose-600 { color: #e11d48 !important; }

.bg-emerald-100 { background-color: #d1fae5 !important; }
.text-emerald-600 { color: #059669 !important; }

.bg-violet-100 { background-color: #ede9fe !important; }
.text-violet-600 { color: #7c3aed !important; }

/* Fix Border Colors */
.border-blue-200 { border-color: #bfdbfe !important; }
.border-amber-200 { border-color: #fed7aa !important; }
.border-purple-200 { border-color: #e9d5ff !important; }
.border-green-200 { border-color: #bbf7d0 !important; }
.border-cyan-200 { border-color: #a5f3fc !important; }
.border-rose-200 { border-color: #fecdd3 !important; }
.border-emerald-200 { border-color: #a7f3d0 !important; }
.border-violet-200 { border-color: #ddd6fe !important; }

/* Fix Industry Example Card Gradients */
.bg-gradient-to-br.from-blue-50.to-indigo-100 {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%) !important;
}

.bg-gradient-to-br.from-amber-50.to-orange-100 {
    background: linear-gradient(135deg, #fffbeb 0%, #ffedd5 100%) !important;
}

.bg-gradient-to-br.from-purple-50.to-pink-100 {
    background: linear-gradient(135deg, #faf5ff 0%, #fce7f3 100%) !important;
}

.bg-gradient-to-br.from-green-50.to-emerald-100 {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
}

.bg-gradient-to-br.from-cyan-50.to-blue-100 {
    background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%) !important;
}

.bg-gradient-to-br.from-rose-50.to-pink-100 {
    background: linear-gradient(135deg, #fff1f2 0%, #fce7f3 100%) !important;
}

.bg-gradient-to-br.from-emerald-50.to-green-100 {
    background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%) !important;
}

.bg-gradient-to-br.from-violet-50.to-purple-100 {
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%) !important;
}

/* Fix Industry Example Button Colors */
.bg-blue-500 { background-color: #3b82f6 !important; }
.bg-blue-500:hover { background-color: #2563eb !important; }

.bg-amber-500 { background-color: #f59e0b !important; }
.bg-amber-500:hover { background-color: #d97706 !important; }

.bg-purple-500 { background-color: #8b5cf6 !important; }
.bg-purple-500:hover { background-color: #7c3aed !important; }

.bg-green-500 { background-color: #10b981 !important; }
.bg-green-500:hover { background-color: #059669 !important; }

.bg-cyan-500 { background-color: #06b6d4 !important; }
.bg-cyan-500:hover { background-color: #0891b2 !important; }

.bg-rose-500 { background-color: #f43f5e !important; }
.bg-rose-500:hover { background-color: #e11d48 !important; }

.bg-emerald-500 { background-color: #10b981 !important; }
.bg-emerald-500:hover { background-color: #059669 !important; }

.bg-violet-500 { background-color: #8b5cf6 !important; }
.bg-violet-500:hover { background-color: #7c3aed !important; }

/* Ensure button text stays white */
.bg-blue-500, .bg-amber-500, .bg-purple-500, 
.bg-green-500, .bg-cyan-500, .bg-rose-500,
.bg-emerald-500, .bg-violet-500 {
    color: white !important;
}

/* Grid System - Mobile First */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

/* Spacing Utilities */
.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* Margin and Padding Utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.ml-4 {
    margin-left: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Color Utilities */
.text-white {
    color: white;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-900 {
    color: #111827;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-green-500 {
    color: #10b981;
}

.text-purple-500 {
    color: #8b5cf6;
}

.text-red-500 {
    color: #ef4444;
}

.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #ecfdf5;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-amber-50 {
    background-color: #fffbeb;
}

.bg-teal-50 {
    background-color: #f0fdfa;
}

.bg-cyan-50 {
    background-color: #ecfeff;
}

.bg-rose-50 {
    background-color: #fff1f2;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.bg-violet-50 {
    background-color: #f5f3ff;
}

/* Border Utilities */
.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-t {
    border-top-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hidden/Visible Utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }
    
    .sm\:hidden {
        display: none;
    }
    
    .sm\:flex-row {
        flex-direction: row;
    }
    
    .sm\:space-x-4 > * + * {
        margin-left: 1rem;
    }
    
    .sm\:space-y-0 > * + * {
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

/* Z-index */
.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.z-1000 {
    z-index: 1000;
}

/* Width and Height */
.w-full {
    width: 100%;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Additional Mobile Optimizations */
@media (max-width: 767px) {
    /* Reduce section padding */
    section.py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    section.py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Adjust hero section */
    #hero {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Fix card padding */
    .feature-card, .testimonial-card, .pricing-card {
        margin-left: 5px;
        margin-right: 5px;
    }
    
    /* Reduce quote preview padding */
    .quote-preview {
        padding: 1rem;
        margin: 0 -5px;
    }
    
    /* Adjust template cards spacing */
    .template-card {
        margin: 0 5px;
    }
    
    /* Stack buttons vertically on small screens */
    .flex-col-mobile {
        flex-direction: column;
    }
    
    .space-y-mobile > * + * {
        margin-top: 0.75rem;
        margin-left: 0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding: 15px 8px;
    }
    
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Even tighter spacing for very small screens */
    .glass-effect {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    /* Reduce font sizes for very small screens */
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .text-5xl {
        font-size: 2rem;
    }
    
    /* Adjust grid gaps */
    .grid {
        gap: 0.75rem;
    }
}