/* Ultra Compact Mobile-First App Design */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --accent: #10b981;
    --dark: #0f172a;
    --card: #ffffff;
    --bg: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding-bottom: 70px;
}

/* Mobile Header - Compact */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 12px 16px;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

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

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.container {
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

/* Hero - Ultra Compact */
.hero {
    margin-top: 60px;
    position: relative;
    height: 240px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
}

.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Stats - Compact Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.stat-card p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Services Grid - Ultra Compact */
section {
    padding: 20px 0;
}

.section-title {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 4px;
}

.section-title p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s;
}

.service-card:active {
    transform: scale(0.96);
}

.service-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.service-card h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 4px;
}

.service-card p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.service-price {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 700;
}

/* Buttons - App Style */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

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

.btn:active {
    transform: scale(0.95);
}

/* Bottom Navigation - App Style */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.7rem;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item span {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 2px;
}

/* Forms - Compact */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Tables - Mobile Optimized */
.table-container {
    overflow-x: auto;
    margin: 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

table {
    width: 100%;
    font-size: 0.8rem;
}

th, td {
    padding: 10px 8px;
    text-align: left;
}

thead {
    background: var(--bg);
}

/* Alerts - Compact */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 12px 16px;
    font-size: 0.85rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Badges - Compact */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: #10b981; color: white; }
.badge-warning { background: #f59e0b; color: white; }
.badge-danger { background: #ef4444; color: white; }
.badge-info { background: #3b82f6; color: white; }
.badge-primary { background: #2563eb; color: white; }

/* Gallery - Compact Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 16px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer - Compact */
.footer {
    background: var(--dark);
    color: white;
    padding: 24px 16px;
    text-align: center;
    font-size: 0.8rem;
}

.footer a {
    color: var(--secondary);
    text-decoration: none;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #ea580c);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
    z-index: 999;
}

/* Desktop Adjustments */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .hero {
        height: 320px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

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

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
