/* Apple-style Modern Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Custom scrollbar - dark theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Hero Section Animations */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #000 0%, #111 100%);
    position: relative;
}

.hero-title {
    animation: fadeInUp 1s ease-out;
    letter-spacing: -0.02em;
}

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

/* Service Cards */
.service-card {
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card {
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    transition: transform 0.5s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

/* Gradient backgrounds */
.bg-gradient-to-b {
    background: linear-gradient(to bottom, var(--tw-gradient-stops));
}

/* Button hover effects */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active, a:active {
    transform: scale(0.98);
}

/* Backdrop blur for navigation */
.backdrop-blur-xl {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Modal animations */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 300ms, transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms, transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success message animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#successMessage {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Parallax effect for sections */
section {
    position: relative;
}

/* Text selection */
::selection {
    background-color: #3b82f6;
    color: #ffffff;
}

::-moz-selection {
    background-color: #3b82f6;
    color: #ffffff;
}

/* Focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #666 !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Responsive typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem !important;
        line-height: 1.1;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Prevent transition on page load */
.preload * {
    transition: none !important;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Fade in on scroll */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Dashboard Light Theme Styles */
.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dashboard-nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.dashboard-nav-item.active {
    background-color: #111827;
    color: #ffffff;
}

.dashboard-nav-item svg {
    flex-shrink: 0;
}

/* Light theme card styles */
.dashboard-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #111827;
    color: #f3f4f6;
}

body.dark-mode nav {
    background-color: rgba(17, 24, 39, 0.8);
    border-bottom-color: #374151;
}

body.dark-mode aside {
    background-color: #1f2937;
    border-right-color: #374151;
}

body.dark-mode .dashboard-nav-item {
    color: #9ca3af;
}

body.dark-mode .dashboard-nav-item:hover {
    background-color: #374151;
    color: #f3f4f6;
}

body.dark-mode .dashboard-nav-item.active {
    background-color: #3b82f6;
    color: #ffffff;
}

body.dark-mode .bg-white {
    background-color: #1f2937 !important;
}

body.dark-mode .bg-gray-50 {
    background-color: #111827 !important;
}

body.dark-mode .text-gray-900 {
    color: #f3f4f6 !important;
}

body.dark-mode .text-gray-600 {
    color: #9ca3af !important;
}

body.dark-mode .text-gray-500 {
    color: #6b7280 !important;
}

body.dark-mode .border-gray-200 {
    border-color: #374151 !important;
}

body.dark-mode .border-gray-300 {
    border-color: #4b5563 !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

body.dark-mode #darkModeToggle {
    color: #9ca3af;
}

body.dark-mode #darkModeToggle:hover {
    color: #f3f4f6;
}

/* Fix white text on gray backgrounds in dark mode */
body.dark-mode .text-white {
    color: #f3f4f6 !important;
}

body.dark-mode .text-gray-700 {
    color: #d1d5db !important;
}

body.dark-mode .text-gray-800 {
    color: #e5e7eb !important;
}

body.dark-mode .text-blue-900,
body.dark-mode .text-green-900,
body.dark-mode .text-purple-900,
body.dark-mode .text-red-900,
body.dark-mode .text-yellow-900,
body.dark-mode .text-indigo-900 {
    color: #f3f4f6 !important;
}

body.dark-mode .text-blue-700,
body.dark-mode .text-green-700,
body.dark-mode .text-purple-700,
body.dark-mode .text-red-700,
body.dark-mode .text-yellow-700,
body.dark-mode .text-indigo-700 {
    color: #e5e7eb !important;
}

body.dark-mode .text-blue-800,
body.dark-mode .text-green-800,
body.dark-mode .text-purple-800,
body.dark-mode .text-red-800,
body.dark-mode .text-yellow-800,
body.dark-mode .text-indigo-800 {
    color: #f3f4f6 !important;
}

body.dark-mode .bg-gradient-to-r,
body.dark-mode .bg-gradient-to-br {
    background: #1f2937 !important;
}

body.dark-mode .from-blue-50,
body.dark-mode .from-green-50,
body.dark-mode .from-purple-50,
body.dark-mode .from-red-50,
body.dark-mode .from-yellow-50,
body.dark-mode .from-indigo-50 {
    background: #1f2937 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f3f4f6 !important;
}

body.dark-mode p {
    color: #d1d5db;
}

body.dark-mode .font-bold,
body.dark-mode .font-semibold {
    color: #f3f4f6;
}

/* Status badges in dark mode */
body.dark-mode .bg-yellow-500 {
    background-color: #eab308 !important;
}

body.dark-mode .text-yellow-700 {
    color: #1f2937 !important;
}

body.dark-mode .bg-blue-600 {
    background-color: #2563eb !important;
}

body.dark-mode .bg-red-600 {
    background-color: #dc2626 !important;
}

body.dark-mode .bg-green-600 {
    background-color: #16a34a !important;
}

/* Colored backgrounds need dark text */
body.dark-mode .bg-yellow-100,
body.dark-mode .bg-blue-100,
body.dark-mode .bg-green-100,
body.dark-mode .bg-red-100,
body.dark-mode .bg-purple-100,
body.dark-mode .bg-indigo-100 {
    background-color: #374151 !important;
}

body.dark-mode .text-yellow-600,
body.dark-mode .text-blue-600,
body.dark-mode .text-green-600,
body.dark-mode .text-red-600,
body.dark-mode .text-purple-600,
body.dark-mode .text-indigo-600 {
    color: #60a5fa !important;
}

/* Links */
body.dark-mode a {
    color: #60a5fa;
}

body.dark-mode a:hover {
    color: #93c5fd;
}

/* Buttons */
body.dark-mode button {
    color: inherit;
}

body.dark-mode .bg-gray-900 {
    background-color: #1f2937 !important;
    border: 1px solid #374151;
}

/* Cards with colored backgrounds */
body.dark-mode .bg-blue-50 {
    background-color: #1e3a5f !important;
}

body.dark-mode .bg-green-50 {
    background-color: #1e4d3a !important;
}

body.dark-mode .bg-purple-50 {
    background-color: #3d2d5f !important;
}

body.dark-mode .bg-red-50 {
    background-color: #5f1e1e !important;
}

body.dark-mode .bg-yellow-50 {
    background-color: #5f4d1e !important;
}

body.dark-mode .bg-indigo-50 {
    background-color: #2d3d5f !important;
}

/* Timeline in dark mode */
body.dark-mode .timeline-content {
    background: #374151;
    color: #e5e7eb;
}

body.dark-mode .timeline-content:hover {
    background: #4b5563;
}

/* Notification badge */
body.dark-mode #notificationBadge,
body.dark-mode #messagesBadge,
body.dark-mode #paymentsBadge {
    color: #ffffff !important;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 16px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 20px;
    bottom: -8px;
    width: 2px;
    background: linear-gradient(to bottom, #3b82f6, #e5e7eb);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-dot.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-dot.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-dot.pending {
    background: #e5e7eb;
    border: 2px solid #9ca3af;
}

.timeline-content {
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(4px);
}

body.dark-mode .timeline-content {
    background: #374151;
}

body.dark-mode .timeline-content:hover {
    background: #4b5563;
}

body.dark-mode .timeline-dot.pending {
    background: #4b5563;
    border-color: #6b7280;
}

/* Light theme input styles */
.light-input {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #111827;
    transition: all 0.2s ease;
}

.light-input:focus {
    background-color: white;
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Light theme scrollbar */
body.light-theme::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.light-theme::-webkit-scrollbar-track {
    background: #f3f4f6;
}

body.light-theme::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 5px;
}

body.light-theme::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Admin Dashboard Styles */
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.admin-nav-item.active {
    background-color: #111827;
    color: #ffffff;
}

.admin-nav-item svg {
    flex-shrink: 0;
}

/* Admin section visibility */
.admin-section {
    display: block;
}

.admin-section.hidden {
    display: none;
}

/* Admin gradient backgrounds */
.admin-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Admin card hover effects */
.admin-card {
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile First - Base styles for mobile */
@media (max-width: 767px) {
    /* Typography adjustments */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
        overflow-x: hidden; /* Blokuj scroll poziomy */
    }
    
    html {
        overflow-x: hidden; /* Blokuj scroll poziomy */
    }
    
    /* Wszystkie elementy mieszczą się w ekranie */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .container,
    .max-w-7xl,
    section {
        max-width: 100% !important;
        overflow-x: hidden;
    }
    
    /* Formularze - nie ukrywaj overflow */
    form,
    form div,
    form label {
        overflow: visible !important;
    }
    
    /* Logo - nie skaluj na mobile, stały rozmiar (index i dashboard) */
    nav img[alt*="Border Force"],
    nav img[src*="topolski"],
    nav img,
    nav a img {
        height: 32px !important;
        width: auto !important;
        max-height: 32px !important;
        object-fit: contain;
    }
    
    /* MOBILE DASHBOARD - Uproszczona wersja */
    
    /* Ukryj sidebar i nawigację na mobile dashboard */
    body.bg-gray-50 aside,
    body.bg-gray-50 nav .flex.items-center.space-x-4 {
        display: none !important;
    }
    
    /* Komunikat o pełnej wersji - nad stroną */
    .mobile-desktop-notice {
        display: block !important;
        position: relative; /* Nie fixed, żeby był nad stroną */
        top: 0;
        left: 0;
        right: 0;
        background: #fbbf24;
        color: #000;
        padding: 10px 16px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        z-index: 9999;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin: 0;
    }
    
    /* Nawigacja na mobile dashboard - tylko logo, mniejsza */
    body.bg-gray-50 nav {
        background: white !important;
        border-bottom: 1px solid #e5e7eb;
        position: relative !important; /* Nie fixed */
    }
    
    body.bg-gray-50 nav .max-w-7xl {
        justify-content: center !important;
        padding: 8px 16px !important; /* Mniejszy padding */
    }
    
    body.bg-gray-50 nav .h-16 {
        height: 48px !important; /* Mniejsza wysokość */
    }
    
    /* Content dashboard - pełna szerokość, bez dużej przestrzeni */
    body.bg-gray-50 .dashboard-content,
    body.bg-gray-50 main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px !important; /* Mały padding, bez dużej przestrzeni */
        max-width: 100% !important;
        padding-top: 16px !important; /* Mała przestrzeń od góry */
    }
    
    /* Ukryj wszystkie sekcje oprócz nowej sprawy */
    body.bg-gray-50 .dashboard-section {
        display: none !important;
    }
    
    body.bg-gray-50 .dashboard-section[data-section="nowa-sprawa"],
    body.bg-gray-50 #nowa-sprawa {
        display: block !important;
    }
    
    /* Ukryj przycisk toggle menu */
    body.bg-gray-50 .mobile-sidebar-toggle {
        display: none !important;
    }
    
    /* Formularz nowej sprawy - uproszczony */
    body.bg-gray-50 #newCaseForm .file-upload-section,
    body.bg-gray-50 #newCaseForm input[type="file"],
    body.bg-gray-50 #newCaseForm label[for*="file"],
    body.bg-gray-50 .file-upload-area {
        display: none !important;
    }
    
    /* Większe pola formularza */
    body.bg-gray-50 input,
    body.bg-gray-50 select,
    body.bg-gray-50 textarea {
        padding: 14px 16px !important;
        font-size: 16px !important;
    }
    
    /* Większy przycisk submit */
    body.bg-gray-50 button[type="submit"] {
        padding: 16px 24px !important;
        font-size: 16px !important;
        width: 100% !important;
    }
    
    /* Dashboard sidebar - nachodzi na content (overlay style) */
    aside {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000; /* Nad wszystkim */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    aside.mobile-sidebar-open {
        left: 0;
    }
    
    /* Overlay gdy sidebar otwarty */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999; /* Pod sidearem */
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Przycisk toggle sidebar - w lewym górnym rogu */
    .mobile-sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 70px; /* Pod nawigacją */
        left: 16px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        background: #1f2937;
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 50;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        text-align: center;
    }
    
    .mobile-sidebar-toggle:active {
        transform: scale(0.95);
    }
    
    .mobile-sidebar-toggle svg {
        width: 24px;
        height: 24px;
    }
    
    /* Main content - pełna szerokość, przesuwany gdy sidebar otwarty */
    .dashboard-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 80px 16px 20px !important;
        transition: transform 0.3s ease;
        position: relative;
    }
    
    /* Przesuń content w prawo gdy sidebar otwarty */
    body.sidebar-open .dashboard-content {
        transform: translateX(280px);
    }
    
    body.sidebar-open {
        overflow: hidden; /* Blokuj scroll gdy sidebar otwarty */
    }
    
    /* Navigation - mniejszy padding */
    nav .max-w-7xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Ukryj niektóre elementy na mobile */
    nav .space-x-4 > span {
        display: none; /* Ukryj "Witaj, [nazwa]" */
    }
    
    /* Wszystkie przyciski - wycentrowany tekst */
    button,
    .btn,
    #loginBtn,
    #registerBtn,
    #logoutBtn,
    a[href*="login"],
    a[href*="register"],
    button[id*="login"],
    button[id*="register"],
    .mobile-sidebar-toggle {
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Skróć długie teksty */
    .dashboard-nav-item {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Tabele - zmniejsz aby się mieściły */
    table {
        font-size: 12px;
        width: 100%;
    }
    
    table th,
    table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* Kontenery tabel */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Karty i sekcje */
    .bg-white,
    .card,
    section {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Formularze */
    input,
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px !important;
    }
    
    /* Hero section */
    .hero-section {
        min-height: 100vh;
        padding: 80px 20px 40px;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2;
        letter-spacing: -0.03em;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
        line-height: 1.6;
    }
    
    /* Buttons */
    .btn-mobile {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
        text-align: center;
        display: block;
    }
    
    /* Cards */
    .service-card,
    .admin-card {
        margin-bottom: 20px;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    /* Tables - make them scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Navigation spacing */
    nav {
        padding: 0 16px;
    }
    
    /* Section padding */
    section {
        padding: 60px 20px;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Touch targets - minimum 44x44px */
    button,
    a,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Spacing */
    .space-y-mobile > * + * {
        margin-top: 16px;
    }
    
    /* Grid adjustments */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Small phones (320px - 374px) */
@media (max-width: 374px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    section {
        padding: 40px 16px;
    }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .grid-cols-2-tablet {
        grid-template-columns: repeat(2, 1fr);
    }
    
    section {
        padding: 80px 40px;
    }
}

/* Landscape mode on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 60px 20px 40px;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .admin-card:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    button,
    a {
        padding: 12px 20px;
    }
    
    /* Better tap highlighting */
    * {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
}

/* High DPI screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can add overrides if needed */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    nav,
    .mobile-menu,
    button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
