/* 
 * Title Attributes SEO & Accessibility Enhancement
 * Serdar Spot - Link Title Optimization
 */

/* Enhanced hover states for links with title attributes */
a[title]:hover {
    position: relative;
}

/* Better focus states for keyboard navigation */
a[title]:focus {
    outline: 2px solid #dc2626 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}

/* Enhanced navigation link styles */
nav a[title]:hover {
    text-decoration: none;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Button links with title attributes */
.btn[title]:hover,
button[title]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Phone and email links styling */
a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    color: #dc2626 !important;
    text-decoration: underline;
}

/* Social media links */
a[href*="wa.me"]:hover,
a[href*="whatsapp"]:hover {
    color: #25d366 !important;
    transform: scale(1.05);
}

/* Card and service links */
.service-card a[title]:hover,
.product-card a[title]:hover {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Footer links enhancement */
footer a[title]:hover {
    color: #dc2626 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Mobile menu improvements */
@media (max-width: 768px) {
    nav a[title] {
        padding: 12px 16px;
        display: block;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    nav a[title]:hover,
    nav a[title]:focus {
        background-color: rgba(220, 38, 38, 0.1);
        color: #dc2626 !important;
    }
}

/* Tooltip-like enhancement for better UX */
a[title] {
    position: relative;
    cursor: pointer;
}

/* Loading state for async content */
a[title].loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}

/* Active state for navigation */
nav a[title].active,
nav a[title][class*="text-red-600"] {
    color: #dc2626 !important;
    font-weight: 700;
    position: relative;
}

nav a[title].active::after,
nav a[title][class*="text-red-600"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #dc2626, #b91c1c);
    border-radius: 1px;
}

/* Breadcrumb links */
.breadcrumb a[title]:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* Card action buttons */
.card a[title],
.product-card a[title],
.service-card a[title] {
    transition: all 0.2s ease;
}

.card a[title]:hover,
.product-card a[title]:hover,
.service-card a[title]:hover {
    transform: translateX(4px);
}

/* Icon links */
a[title] i {
    transition: transform 0.2s ease;
}

a[title]:hover i {
    transform: scale(1.1);
}

/* Admin and special links */
a[title][href*="admin"]:hover {
    opacity: 1 !important;
    color: #4f46e5 !important;
}

/* Print styles */
@media print {
    a[title]::after {
        content: " [" attr(title) "]";
        font-size: 0.8em;
        color: #666;
    }
    
    /* Hide decorative elements in print */
    a[title]:hover,
    a[title]:focus {
        box-shadow: none !important;
        transform: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    a[title] {
        text-decoration: underline !important;
    }
    
    a[title]:hover,
    a[title]:focus {
        background-color: #000 !important;
        color: #fff !important;
        outline: 3px solid #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    a[title]:hover,
    a[title]:focus,
    .btn[title]:hover,
    button[title]:hover {
        transform: none !important;
        transition: color 0.1s ease !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    a[title]:hover {
        color: #f87171 !important;
    }
    
    a[title]:focus {
        outline-color: #f87171 !important;
        box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1) !important;
    }
}
