/* Custom styles for Inbox Marketing KFT
 * Tailwind CSS is the primary framework, this file only contains necessary additions
 */

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

/* Custom focus styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Hero section background gradient enhancement */
.hero-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* Image containers for consistent aspect ratios */
.hero-image-container {
    aspect-ratio: 16/10;
    max-width: 500px;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Gallery image containers */
.gallery-image-container {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-image-container:hover img {
    transform: scale(1.05);
}

/* Logo containers for consistent sizing */
.logo-container {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

/* FAQ Accordion animations */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.active {
    max-height: 200px;
    transition: max-height 0.3s ease-in;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

/* Form validation styles */
.form-field-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
}

.form-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success message styles */
.form-success {
    background-color: #dcfce7;
    border: 1px solid #16a34a;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Loading spinner for form submission */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1e40af;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

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

#mobile-menu.active {
    max-height: 400px;
    transition: max-height 0.3s ease-in;
}

/* Improved button hover states */
.btn-primary {
    background-color: #f59e0b;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    border: 2px solid #1e40af;
    color: #1e40af;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #1e40af;
    color: white;
    transform: translateY(-1px);
}

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

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Analytics dashboard styling */
.analytics-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.analytics-card:hover {
    transform: scale(1.02);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    /* Ensure proper page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    /* Force print backgrounds */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-gradient {
        background: #000;
        color: #fff;
    }
    
    .btn-primary {
        border: 2px solid #fff;
    }
    
    img {
        filter: contrast(1.2);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (if implemented later) */
@media (prefers-color-scheme: dark) {
    /* Future dark mode styles would go here */
}

/* Utility classes for component consistency */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bg-overlay {
    background: rgba(30, 64, 175, 0.9);
}

/* Ensure minimum touch target sizes on mobile */
@media (max-width: 768px) {
    button, 
    .btn, 
    a[role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Container for better responsive images */
.responsive-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Skip link accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1e40af;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus indicators for better accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Image loading placeholder */
.image-placeholder {
    background-color: #f3f4f6;
    background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), 
                      linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #e5e7eb 75%), 
                      linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    animation: placeholder-loading 2s infinite linear;
}

@keyframes placeholder-loading {
    0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
    100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}