/* ==========================================
   MOBILE-FIRST CSS - ELECTRICIANS DIRECTORY
   ========================================== */

/* ==========================================
   RESET AND BASE STYLES
   ========================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* Never below 16px or iOS zooms on input focus */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #1a4d7a;
    /* Professional grid background */
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding-bottom: 40px;
    /* Optimize image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile optimization - much more zoomed out and different positioning */
@media (max-width: 768px) {
    body {
        /* Extreme zoom out and top positioning for better visibility */
        background-size: 300%; /* Massive zoom out */
        background-position: center 20%; /* Show more from top */
        background-attachment: scroll; /* Better performance on mobile */
    }

    .hero {
        background: rgba(245, 245, 245, 0.95) !important;
        padding: 20px 16px;
    }
}

/* Small phones - extreme zoom out with specific positioning */
@media (max-width: 480px) {
    body {
        background-size: 400%; /* Maximum zoom out for visibility */
        background-position: 30% 20%; /* Offset positioning */
    }
}

/* ==========================================
   TOUCH OPTIMIZATION
   ========================================== */

button, a, input, select {
    min-height: 44px;
    min-width: 44px;
}

* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:active, a:active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.1s ease;
}

/* GPU acceleration for smooth animations */
.animated {
    transform: translateZ(0);
    will-change: transform;
}

/* ==========================================
   MAIN BLUE HEADER
   ========================================== */

.main-header {
    /* Solid background - rgba(26, 77, 122, 1) matches body color #1a4d7a */
    background: rgba(26, 77, 122, 1) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
    .main-header {
        background: rgba(26, 77, 122, 1) !important;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Back button - left side */
.back-button {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.back-button:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide back button on homepage but keep space */
.homepage .back-button {
    visibility: hidden;
}

/* Logo link - center */
.logo-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 0;
}

.site-logo {
   height: 90px;
    width: auto;
    max-width: 600px;
    display: block;
    transition: opacity 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    object-fit: contain;
}

.site-logo:hover {
    opacity: 0.85;
}

.site-logo:active {
    transform: scale(0.98);
}

/* Tablet optimization */
@media (max-width: 768px) {
    .site-logo {
        height: 70px;  /* Increased from 40px */
        max-width: 400px;  /* Increased from 200px */
    }
}

/* Mobile optimization */
@media (max-width: 480px) {
    .site-logo {
        height: 70px;  /* Increased from 35px */
        max-width: 400px;  /* Increased from 160px */
    }
}

/* Emergency 112 button - right side */
.emergency-btn {
    height: 44px;
    padding: 0 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.emergency-btn:active {
    background: #dc2626;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .header-title {
        font-size: 24px;
    }

    .back-button {
        width: auto;
        padding: 0 16px;
        font-size: 16px;
    }

    .back-button::after {
        content: " Πίσω";
        margin-left: 4px;
    }

    .emergency-btn {
        font-size: 18px;
    }

    .emergency-header-btn {
        width: auto;
        padding: 8px 16px;
        font-size: 14px;
    }

    .emergency-header-btn::after {
        content: " Έκτακτη Ανάγκη";
        margin-left: 4px;
    }
}

/* Breadcrumb - Hide on mobile, show on desktop */
.breadcrumb {
    display: none;
}

@media (min-width: 768px) {
    .breadcrumb {
        display: inline-block;
        padding: 10px 20px;
        font-size: 14px;
        /* Dark blur background for light text readability */
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 6px;
        margin-bottom: 16px;
    }

    .breadcrumb a {
        color: #ffffff !important;
        text-decoration: none;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }

    .breadcrumb a:hover {
        text-decoration: underline;
        color: #64b5f6 !important;
    }

    .breadcrumb .separator {
        margin: 0 8px;
        color: rgba(255, 255, 255, 0.6);
    }

    .breadcrumb span:not(.separator) {
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }
}

/* Old header styles - REMOVED (now using .main-header) */

/* ==========================================
   CONTAINER
   ========================================== */

.container {
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
    background: transparent !important;
}

/* ==========================================
   HERO SECTION (Search)
   ========================================== */

.hero {
    /* Light gray background for search section */
    background: rgba(245, 245, 245, 0.92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@supports not (backdrop-filter: blur(10px)) {
    .hero {
        background: rgba(245, 245, 245, 0.95) !important;
    }
}

.hero h2 {
    font-size: 20px;
    color: #1a237e;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
    /* Blur background for search heading */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.search-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#searchInput {
    width: 100%;
    height: 56px;
    padding: 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    border-color: #2563eb;
}

#searchInput::placeholder {
    color: #9ca3af;
}

.btn-primary {
    width: 100%;
    height: 56px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ==========================================
   SECTION HEADERS
   ========================================== */

.featured, .rotating-spotlight {
    padding: 24px 0;
    background: transparent !important;
}

.featured h2, .rotating-title {
    font-size: 22px;
    color: #1a237e;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
    /* Prominent blur background for section headings */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 32px;
    border-radius: 10px;
    display: block;  /* Changed from inline-block */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

@supports not (backdrop-filter: blur(10px)) {
    .featured h2, .rotating-title {
        background: rgba(255, 255, 255, 0.95);
    }
}

.rotating-title {
    margin-bottom: 4px;
}

.rotating-subtitle {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.rotating-spotlight {
    background: transparent !important;
    border-top: none;
    border-bottom: none;
}

/* ==========================================
   GRID LAYOUT
   ========================================== */

.electricians-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ==========================================
   SEARCH RESULTS
   ========================================== */

.search-results-count {
    text-align: center;
    color: #1e40af;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #eff6ff;
    border-radius: 8px;
}

.placeholder-text {
    text-align: center;
    color: #6b7280;
    padding: 40px 16px;
    background-color: white;
    border-radius: 12px;
    font-size: 16px;
}

/* ==========================================
   ELECTRICIAN CARDS - BASE
   ========================================== */

.electrician-card {
    /* White-to-light-gray gradient for cards */
    background: #ffffff;
    background: -webkit-linear-gradient(71deg, rgba(255, 255, 255, 1) 0%, rgba(213, 213, 219, 1) 43%, rgba(255, 255, 255, 1) 100%);
    background: -moz-linear-gradient(71deg, rgba(255, 255, 255, 1) 0%, rgba(213, 213, 219, 1) 43%, rgba(255, 255, 255, 1) 100%);
    background: linear-gradient(71deg, rgba(255, 255, 255, 1) 0%, rgba(213, 213, 219, 1) 43%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

@supports not (backdrop-filter: blur(10px)) {
    .electrician-card {
        background: linear-gradient(71deg, rgba(255, 255, 255, 1) 0%, rgba(213, 213, 219, 1) 43%, rgba(255, 255, 255, 1) 100%);
    }
}

.electrician-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Card link wrapper - makes entire card clickable */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover .electrician-card {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   TIER-BASED CARD STYLES
   ========================================== */

/* PREMIUM tier (€100/month) - Most prominent */
.electrician-card-premium {
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, #8b5cf6, #6366f1) 1;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    padding: 20px;
    position: relative;
}

.electrician-card-premium:active {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3);
}

/* FEATURED tier (€80/month) - Highlighted */
.electrician-card-featured {
    background: linear-gradient(to bottom, #fffbeb 0%, #ffffff 100%);
    border: 3px solid #fbbf24;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
    padding: 18px;
}

.electrician-card-featured:active {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* ROTATING spotlight (free but promoted) */
.electrician-card-rotating {
    /* Subtle teal gradient for spotlight cards */
    background: #e0f2f1;
    background: -webkit-linear-gradient(71deg, rgba(224, 242, 241, 1) 0%, rgba(178, 223, 219, 1) 43%, rgba(224, 242, 241, 1) 100%);
    background: -moz-linear-gradient(71deg, rgba(224, 242, 241, 1) 0%, rgba(178, 223, 219, 1) 43%, rgba(224, 242, 241, 1) 100%);
    background: linear-gradient(71deg, rgba(224, 242, 241, 1) 0%, rgba(178, 223, 219, 1) 43%, rgba(224, 242, 241, 1) 100%);
    border-left: 4px solid #0ea5e9;
    border-top: 1px solid #b2dfdb;
    border-right: 1px solid #b2dfdb;
    border-bottom: 1px solid #b2dfdb;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    padding: 16px;
}

.electrician-card-rotating:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Regular free listings */
.electrician-card-free {
    background-color: white;
    border: 1px solid #e5e7eb;
}

/* ==========================================
   CARD CONTENT
   ========================================== */

.electrician-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 12px;
    line-height: 1.3;
}

.electrician-neighborhood {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.electrician-neighborhood::before {
    content: "📍";
    margin-right: 6px;
    font-size: 16px;
}

/* ==========================================
   PHONE BUTTON (MOST IMPORTANT)
   ========================================== */

.electrician-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    gap: 8px;
    position: relative;
    z-index: 10;
}

.electrician-phone:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Premium cards get even bigger phone buttons */
.electrician-card-premium .electrician-phone {
    height: 64px;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* ==========================================
   BADGES AND TAGS
   ========================================== */

.tier-badges, .rotating-badge-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.tier-badge, .rotating-badge, .verified-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tier-badge.tier-premium {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tier-badge.tier-featured {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rotating-badge {
    background-color: #0ea5e9;
    color: white;
}

.rotating-countdown {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.verified-badge {
    background-color: #10b981;
    color: white;
}

/* ==========================================
   SERVICE BADGES
   ========================================== */

.services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.service-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #eff6ff;
    color: #1e40af;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* ==========================================
   PREMIUM STATS
   ========================================== */

.premium-stats {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #5b21b6;
    text-align: center;
    border-left: 4px solid #7c3aed;
}

/* ==========================================
   FOOTER
   ========================================== */

/* Simple footer (for pages with basic footer) */
footer {
    background: rgba(30, 64, 175, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 24px 16px;
    margin-top: 40px;
    text-align: center;
}

@supports not (backdrop-filter: blur(10px)) {
    footer {
        background: rgba(30, 64, 175, 0.95);
    }
}

footer p {
    font-size: 14px;
}

/* Comprehensive site footer */
.site-footer {
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #f3f4f6;
    padding: 40px 16px 20px;
    margin-top: 60px;
}

@supports not (backdrop-filter: blur(10px)) {
    .site-footer {
        background: rgba(31, 41, 55, 0.95);
    }
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-links a:active {
    color: #3b82f6;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Footer services links */
.footer-services a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-services a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-services a:active {
    opacity: 0.7;
}

.footer-section p {
    color: #9ca3af;
    font-size: 14px;
    margin: 4px 0;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 14px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   CALL CONFIRMATION TOAST
   ========================================== */

.call-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #059669;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    transition: bottom 0.3s ease;
    max-width: 90%;
}

.call-toast.show {
    bottom: 24px;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    white-space: nowrap;
}

/* ==========================================
   FOCUS STATES (ACCESSIBILITY)
   ========================================== */

button:focus, a:focus, input:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 120px;
    margin-bottom: 16px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ==========================================
   RESPONSIVE: SMALL PHONES (375px+)
   ========================================== */

@media (min-width: 375px) {
    header h1 {
        font-size: 28px;
    }

    .hero h2 {
        font-size: 22px;
    }

    .electrician-name {
        font-size: 19px;
    }
}

/* ==========================================
   RESPONSIVE: TABLETS (768px+)
   ========================================== */

@media (min-width: 768px) {
    .container {
        max-width: 1200px;
        padding: 0 24px;
    }

    header {
        padding: 20px 24px;
    }

    header h1 {
        font-size: 32px;
    }

    .tagline {
        font-size: 16px;
    }

    .hero {
        padding: 32px 24px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .search-bar {
        flex-direction: row;
        max-width: 600px;
        margin: 0 auto;
    }

    #searchInput {
        flex: 1;
    }

    .btn-primary {
        width: auto;
        min-width: 140px;
    }

    .electricians-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .featured, .rotating-spotlight {
        padding: 32px 0;
    }

    .featured h2, .rotating-title {
        font-size: 26px;
    }

    .rotating-subtitle {
        font-size: 15px;
    }

    .electrician-card {
        padding: 20px;
    }

    .electrician-card-premium {
        padding: 24px;
    }

    .electrician-card-featured {
        padding: 22px;
    }

    .electrician-phone {
        height: 60px;
        font-size: 19px;
    }

    .electrician-card-premium .electrician-phone {
        height: 68px;
        font-size: 21px;
    }

    footer {
        padding: 32px 24px;
    }
}

/* ==========================================
   RESPONSIVE: DESKTOP (1024px+)
   ========================================== */

@media (min-width: 1024px) {
    header h1 {
        font-size: 36px;
    }

    .hero {
        padding: 48px 24px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .electricians-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .featured, .rotating-spotlight {
        padding: 40px 0;
    }

    .featured h2, .rotating-title {
        font-size: 28px;
    }

    .electrician-card {
        padding: 24px;
    }

    .electrician-card-premium {
        padding: 28px;
    }

    .electrician-card-featured {
        padding: 26px;
    }

    /* Hover effects for desktop only */
    .electrician-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .electrician-card-premium:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(139, 92, 246, 0.3);
    }

    .electrician-card-featured:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
    }

    .electrician-card-rotating:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    }

    .electrician-phone:hover {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .btn-primary:hover {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .electrician-card {
        border: 2px solid #000;
    }

    .electrician-phone {
        border: 2px solid #000;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Keep light mode for now - directory sites work better in light mode */
}

/* ==========================================
   DETAIL PAGE STYLES
   ========================================== */

/* Detail Header */
.detail-header {
    background: white;
    padding: 24px 0;
    border-bottom: 2px solid #e5e7eb;
}

.detail-header-content {
    text-align: center;
}

.detail-title {
    font-size: 26px;
    color: #1e40af;
    margin: 16px 0 8px 0;
    line-height: 1.2;
}

.detail-location {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Large Call Button - HUGE and Prominent */
.btn-call-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: translateZ(0);
}

.btn-call-large:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.phone-icon {
    font-size: 32px;
}

.call-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.call-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 600;
}

.call-number {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Quick Info Section */
.quick-info-section {
    padding: 24px 0;
    background: #f9fafb;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-info-card {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

/* Detail Services */
.detail-services {
    padding: 32px 0;
    background: white;
}

.section-title {
    font-size: 24px;
    color: #1a237e;
    margin-bottom: 24px;
    text-align: center;
    /* Prominent blur background for section titles */
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 32px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

@supports not (backdrop-filter: blur(10px)) {
    .section-title {
        background: rgba(255, 255, 255, 0.95);
    }
}

.services-badges-large {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.service-badge-large {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #2563eb;
    color: #1e40af;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    display: inline-block;
}

/* Public Stats Section (Premium Only) */
.public-stats-section {
    padding: 32px 0;
    background: #f9fafb;
}

.public-stats-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 3px solid #8b5cf6;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.stats-title {
    font-size: 22px;
    color: #6b21a8;
    margin-bottom: 8px;
}

.stats-subtitle {
    font-size: 14px;
    color: #7c3aed;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #a78bfa;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #6b21a8;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #7c3aed;
    font-weight: 600;
}

/* Detail FAQ */
.detail-faq {
    padding: 32px 0;
    background: white;
}

/* Contact Form Section */
.contact-form-section {
    padding: 32px 0;
    background: #f9fafb;
}

.contact-form-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #e5e7eb;
    max-width: 600px;
    margin: 0 auto;
}

.contact-subtitle {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    height: 56px;
    transition: all 0.2s;
}

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

.form-message {
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

/* Contact form success message animation */
.form-success-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Similar Section */
.similar-section {
    padding: 32px 0;
    background: white;
}

/* View Profile Button */
.btn-view-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    margin: 12px 0;
    border: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.btn-view-profile:active {
    transform: scale(0.98);
}

/* Bottom CTA Bar (Mobile Only) */
.bottom-cta-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    z-index: 1000;
    transition: bottom 0.3s ease;
    display: block;
}

.bottom-cta-bar.visible {
    bottom: 0;
}

.bottom-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.bottom-cta-info {
    flex: 1;
    min-width: 0;
}

.bottom-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-phone {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-call-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bottom-call-btn:active {
    transform: scale(0.98);
}

/* ==========================================
   DETAIL PAGE - RESPONSIVE: TABLETS (768px+)
   ========================================== */

@media (min-width: 768px) {
    .detail-title {
        font-size: 32px;
    }

    .detail-location {
        font-size: 18px;
    }

    .btn-call-large {
        height: 88px;
        font-size: 20px;
    }

    .call-number {
        font-size: 26px;
    }

    .quick-info-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .quick-info-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .info-icon {
        font-size: 32px;
    }

    .service-badge-large {
        font-size: 18px;
        padding: 16px 28px;
    }

    .stats-title {
        font-size: 26px;
    }

    .stats-subtitle {
        font-size: 16px;
    }

    .stat-number {
        font-size: 42px;
    }

    .stat-label {
        font-size: 16px;
    }

    .contact-form-card {
        padding: 32px;
    }

    /* Hide bottom CTA bar on tablets and desktop */
    .bottom-cta-bar {
        display: none;
    }
}

/* ==========================================
   DETAIL PAGE - RESPONSIVE: DESKTOP (1024px+)
   ========================================== */

@media (min-width: 1024px) {
    .detail-title {
        font-size: 36px;
    }

    .btn-call-large {
        height: 96px;
    }

    .btn-call-large:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
    }

    .btn-call-large:active {
        transform: translateY(0);
    }

    .quick-info-card:hover {
        border-color: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.2s;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }

    .btn-submit:active {
        transform: translateY(0);
    }

    .btn-view-profile:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    }

    .btn-view-profile:active {
        transform: translateY(0);
    }
}
