/* Custom styles for 247credit.ro */

/* Romanian flag color utilities (already in Tailwind config, but for fallback) */
:root {
    --ro-blue: #002B7F;
    --ro-yellow: #FCD116;
    --ro-red: #CE1126;
}

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

/* Base body styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Ensure minimum touch target size for mobile (48x48px) */
@media (max-width: 768px) {
    button,
    a.inline-block,
    .mobile-menu-button {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* IFN Card animations and hover effects */
.ifn-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.ifn-card:hover {
    transform: translateY(-4px);
}

/* Description toggle animations */
.description-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.description-content.max-h-0 {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.description-content.max-h-full {
    max-height: 2000px; /* Large enough for any description */
    opacity: 1;
}

/* Toggle button arrow animation */
.toggle-arrow {
    transition: transform 0.3s ease-in-out;
}

.toggle-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Toggle button styling */
.toggle-details-btn {
    cursor: pointer;
    user-select: none;
}

.toggle-details-btn:active {
    transform: scale(0.98);
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* Smooth transitions for all links */
a {
    transition: color 0.2s ease-in-out;
}

/* Loading spinner animation (for redirect page) */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Skip to main content (accessibility) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2563EB;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* Print styles */
@media print {
    nav,
    footer,
    .mobile-menu-button {
        display: none;
    }

    body {
        background: white;
    }

    .ifn-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
