/* ========================================
   JATRAPATH MARKETPLACE - DESIGN SYSTEM
   ======================================== */

/* === VARIABLES & THEME === */
:root {
    /* Primary Colors */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-dark: #4338ca;
    /* Indigo 700 */
    --primary-light: #818CF8;
    /* Indigo 400 */
    --secondary: #10B981;
    /* Emerald 500 */
    --accent: #F59E0B;
    /* Amber 500 */

    /* Neutrals */
    --dark: #111827;
    /* Gray 900 */
    --light: #F3F4F6;
    /* Gray 100 */
    --white: #FFFFFF;
    --gray: #6B7280;
    /* Gray 500 */
    --gray-light: #E5E7EB;
    /* Gray 200 */
    --gray-dark: #374151;
    /* Gray 700 */

    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Typography */
    --font-main: 'Inter', sans-serif;

    /* 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.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

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

/* === LAYOUT === */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.section-sm {
    padding: 3rem 0;
}

/* === GRID SYSTEM === */
.grid {
    display: grid;
    gap: 2rem;
}

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

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

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

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === FLEX UTILITIES === */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: #059669;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--gray-light);
    color: var(--gray-dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === CARDS === */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem 0;
}

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
    margin-top: 1rem;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.form-control.error {
    border-color: var(--error);
}

.form-control.success {
    border-color: var(--success);
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group,
.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input,
.radio-group input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--primary);
    color: var(--white);
}

.badge-success {
    background-color: var(--success);
    color: var(--white);
}

.badge-warning {
    background-color: var(--warning);
    color: var(--white);
}

.badge-error {
    background-color: var(--error);
    color: var(--white);
}

.badge-info {
    background-color: var(--info);
    color: var(--white);
}

/* === ALERTS === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #D1FAE5;
    border-color: var(--success);
    color: #065F46;
}

.alert-error {
    background-color: #FEE2E2;
    border-color: var(--error);
    color: #991B1B;
}

.alert-warning {
    background-color: #FEF3C7;
    border-color: var(--warning);
    color: #92400E;
}

.alert-info {
    background-color: #DBEAFE;
    border-color: var(--info);
    color: #1E40AF;
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--dark);
}

/* === TABLES === */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.table tr:hover {
    background-color: var(--light);
}

.table tr:last-child td {
    border-bottom: none;
}

/* === HEADER === */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--dark);
}

/* === HERO SECTION === */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* === SERVICE TILES === */
.services {
    padding: 5rem 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.service-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* === FEATURES === */
.features {
    padding: 5rem 0;
    background-color: var(--light);
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature-icon {
    background-color: var(--primary);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* === CTA SECTION === */
.cta {
    padding: 5rem 0;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--white);
}

/* === FOOTER - MODERN === */
.footer-modern {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    padding: 4rem 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.875rem;
}

.footer-links a {
    color: #94a3b8;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-contact li {
    color: #94a3b8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact i {
    color: var(--primary);
    font-size: 1.125rem;
}

.footer-bottom {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.875rem;
}

.footer-badges {
    display: flex;
    gap: 1.5rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.badge-item i {
    color: var(--success);
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

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

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

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

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

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

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

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

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

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

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

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

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

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

.slide-up {
    animation: slideUp 0.6s ease-out;
}

/* === LOADING SPINNER === */
.spinner {
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    .section {
        padding: 3rem 0;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* === PRINT STYLES === */
@media print {

    .header,
    .footer,
    .btn,
    .mobile-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}