/* Custom styles for Garáže Brno */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Selection colors */
::selection {
    background-color: #3b82f6;
    color: white;
}

/* Accordion animations */
.accordion-content,
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.accordion-content.show,
.faq-content.show {
    max-height: 1000px;
}

.accordion-icon.rotate,
.faq-icon.rotate {
    transform: rotate(180deg);
}

/* Table hover effect */
table tbody tr {
    transition: background-color 0.2s ease;
}

/* Card hover effects */
.hover\:shadow-xl {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover\:shadow-xl:hover {
    transform: translateY(-2px);
}

/* Link transitions */
a {
    transition: color 0.2s ease;
}

/* Button focus states */
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

button:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Navbar shadow on scroll */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 300px;
}

/* Timeline connector */
.relative > .absolute.w-0\.5 {
    background: linear-gradient(to bottom, #3b82f6, #93c5fd);
}

/* Statistics cards animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero .grid > div {
    animation: fadeInUp 0.6s ease-out forwards;
}

#hero .grid > div:nth-child(1) { animation-delay: 0.1s; }
#hero .grid > div:nth-child(2) { animation-delay: 0.2s; }
#hero .grid > div:nth-child(3) { animation-delay: 0.3s; }
#hero .grid > div:nth-child(4) { animation-delay: 0.4s; }

/* Checklist visual checkbox */
.space-y-2 li span:first-child {
    position: relative;
}

.space-y-2 li span:first-child::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: transparent;
    transition: background-color 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .text-3xl {
        font-size: 1.5rem;
    }

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

/* Print styles */
@media print {
    /* Reset colors for print */
    * {
        color: black !important;
        background: white !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Hide navigation and interactive elements */
    #navbar,
    #mobile-menu,
    #theme-toggle,
    #theme-toggle-mobile,
    #mobile-menu-btn,
    button[onclick="window.print()"],
    .accordion-icon,
    .faq-icon {
        display: none !important;
    }

    /* Show all accordion content */
    .accordion-content,
    .faq-content {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Adjust hero section */
    #hero {
        padding-top: 2rem !important;
        background: white !important;
    }

    #hero h1,
    #hero p,
    #hero .text-primary-200 {
        color: black !important;
    }

    #hero .bg-white\/10 {
        border: 1px solid #ccc !important;
    }

    /* Hide CTA buttons in hero */
    #hero a {
        display: none !important;
    }

    /* Page breaks */
    section {
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    /* Cards */
    .rounded-xl {
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }

    /* Tables */
    table {
        border-collapse: collapse !important;
    }

    table th,
    table td {
        border: 1px solid #ccc !important;
        padding: 8px !important;
    }

    /* Links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666 !important;
    }

    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }

    /* Footer */
    footer {
        background: white !important;
        border-top: 1px solid #ccc !important;
    }

    footer .bg-gray-800 {
        border: 1px solid #ccc !important;
    }

    /* Grid adjustments */
    .grid {
        display: block !important;
    }

    .grid > * {
        margin-bottom: 1rem !important;
    }

    /* Timeline */
    .relative > .absolute.w-0\.5 {
        display: none !important;
    }

    .pl-12,
    .pl-20 {
        padding-left: 0 !important;
    }

    .absolute.w-8.h-8 {
        position: static !important;
        display: inline-block !important;
        margin-bottom: 0.5rem !important;
    }

    /* Remove external link icons in print */
    a svg {
        display: none !important;
    }

    /* Ensure text is readable */
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }

    /* Add URL to page header */
    @page {
        margin: 2cm;
    }

    /* Compact spacing */
    .py-16,
    .py-24 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .mb-12 {
        margin-bottom: 1rem !important;
    }

    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
}

/* Dark mode transitions */
.dark {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure proper dark mode colors */
.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-900 {
    color: #f3f4f6;
}

/* Badge/tag styles */
.px-3.py-1 {
    white-space: nowrap;
}

/* Responsive table */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link for accessibility (hidden visually but available for screen readers) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
