/* 
 * Mirko Tile and Stone — Custom Styles
 * Complementary to Tailwind CSS
 */

/* Base styles already defined in index.html inline styles */
/* This file provides additional utility and edge-case styles */

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth focus states for accessibility */
*:focus-visible {
    outline: 2px solid #7dd3c0;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(125, 211, 192, 0.3);
    color: #102a43;
}

/* Print styles */
@media print {
    nav, .cta-section, #contact {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .service-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary {
        border: 2px solid ButtonText;
    }
    
    .service-card {
        border: 1px solid ButtonText;
    }
}

/* Reduced motion preferences are handled inline in index.html */

/* Ensure proper rendering on all devices */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent tap highlight on mobile */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Better form styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237dd3c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Improve text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Focus for keyboard navigation */
.nav-link:focus,
.btn-primary:focus,
.btn-secondary:focus,
.footer-link:focus {
    outline: 2px solid #7dd3c0;
    outline-offset: 2px;
}

/* Mobile menu overlay fix */
#mobile-menu-overlay {
    backdrop-filter: blur(4px);
}

/* Ensure gallery items stack properly */
.gallery-item {
    position: relative;
}

/* Custom select styling for form */
.form-input option {
    background: #102a43;
    color: #ffffff;
}

/* Ensure proper spacing on small screens */
@media (max-width: 640px) {
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Ensure proper rendering of serif fonts */
.font-serif {
    font-feature-settings: 'liga' 1, 'calt' 1;
}

/* Smooth transitions for all interactive elements */
a, button, .service-card, .gallery-item {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
