/**
 * Directory Enhanced Styles
 * Premium UI improvements for the business directory
 */

/* ========================================
   Brand Color Palette
   ======================================== */
:root {
    --navy: #0B2C4D;
    --deep-navy: #0A355C;
    --gold: #FFD45A;
    --sky-blue: #DCEAF7;
    --primary-blue: #0077b6;
}

/* Brand Color Classes */
.text-navy { color: var(--navy) !important; }
.text-gold { color: var(--gold) !important; }
.bg-navy { background-color: var(--navy) !important; }
.bg-gold { background-color: var(--gold) !important; }
.bg-sky-blue { background-color: var(--sky-blue) !important; }

/* Brand Buttons */
.btn-navy {
    background-color: var(--navy);
    border-color: var(--navy);
    color: white;
}

.btn-navy:hover {
    background-color: var(--deep-navy);
    border-color: var(--deep-navy);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 44, 77, 0.3);
}

.btn-outline-navy {
    border-color: var(--navy);
    color: var(--navy);
}

.btn-outline-navy:hover {
    background-color: var(--navy);
    border-color: var(--navy);
    color: white;
    transform: translateY(-2px);
}

/* Soft Shadow Utility */
.shadow-soft {
    box-shadow: 0px 4px 16px rgba(0,0,0,0.06) !important;
    transition: all 0.3s ease;
}

.shadow-soft:hover {
    box-shadow: 0px 6px 24px rgba(0,0,0,0.1) !important;
}

/* ========================================
   Hero Section with Background
   ======================================== */

.directory-hero-section {
    position: relative;
    background: white;
    overflow: hidden;
}

.hero-background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0.4;
}

.directory-hero {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

.directory-hero h1 {
    color: #212529;
    line-height: 1.2;
}

.directory-hero .lead {
    color: #6c757d;
    font-size: 1.125rem;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid rgba(0, 119, 190, 0.15);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.trust-badge i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--navy);
}

.trust-badge:hover i {
    transform: scale(1.15);
}

/* Pulse Button Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(11, 44, 77, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(11, 44, 77, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(11, 44, 77, 0);
    }
}

.pulse-button {
    animation: pulse 2s infinite;
}

/* ========================================
   Category Pills Enhancement
   ======================================== */

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.directory-category-pill.active .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.directory-category-pill:hover .category-count {
    background: rgba(0, 119, 190, 0.2);
}

/* ========================================
   Service Highlights Section
   ======================================== */

.service-highlights-section {
    padding: 0;
}

.service-highlights-section h5 {
    color: var(--navy);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.service-highlights-section h5 i {
    color: var(--gold);
}

.service-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.service-highlight-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: white;
    border: 2px solid rgba(11, 44, 77, 0.1);
    border-radius: 18px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.service-highlight-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    transition: all 0.4s ease;
}

.service-highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(11, 44, 77, 0.15);
    border-color: var(--gold);
    color: var(--navy);
    background: linear-gradient(135deg, white 0%, var(--sky-blue) 100%);
}

.service-highlight-card:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--gold);
}

/* Fade-in animation for service cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-highlight-card {
    animation: fadeInUp 0.6s ease-out;
}

.service-highlight-card:nth-child(1) { animation-delay: 0.1s; }
.service-highlight-card:nth-child(2) { animation-delay: 0.2s; }
.service-highlight-card:nth-child(3) { animation-delay: 0.3s; }
.service-highlight-card:nth-child(4) { animation-delay: 0.4s; }
.service-highlight-card:nth-child(5) { animation-delay: 0.5s; }
.service-highlight-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Enhanced Business Cards
   ======================================== */

.directory-business-card {
    position: relative;
    background: linear-gradient(135deg, white 0%, #fcfdfe 100%);
    border-top: 3px solid var(--navy);
    border-left: 1px solid rgba(11, 44, 77, 0.1);
    border-right: 1px solid rgba(11, 44, 77, 0.1);
    border-bottom: 1px solid rgba(11, 44, 77, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.directory-business-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(11, 44, 77, 0.15);
    border-top-color: var(--gold);
}

/* Featured Business Styling */
.directory-business-card.featured-business {
    border-top: 4px solid var(--gold);
    background: linear-gradient(135deg, #fffcf0 0%, #ffffff 100%);
    box-shadow: 0 6px 24px rgba(255, 212, 90, 0.25);
}

.directory-business-card.featured-business:hover {
    box-shadow: 0 12px 40px rgba(255, 212, 90, 0.35);
    transform: translateY(-4px) scale(1.01);
}

/* Featured Ribbon */
.featured-ribbon {
    position: absolute;
    top: -2px;
    right: 20px;
    background: linear-gradient(135deg, var(--gold) 0%, #ffc107 100%);
    color: var(--navy);
    padding: 0.6rem 1.5rem;
    border-radius: 0 0 14px 14px;
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 6px 16px rgba(255, 212, 90, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: shimmer 3s infinite;
}

.featured-ribbon i {
    font-size: 1rem;
    animation: spin 4s linear infinite;
}

/* Shimmer effect for featured ribbon */
@keyframes shimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.15);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Business Card Layout */
.business-card-content {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

/* Logo Section */
.business-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.business-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.logo-placeholder i {
    font-size: 3rem;
    color: #adb5bd;
}

/* Business Info Section */
.business-info {
    flex: 1;
    min-width: 0;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, #ffc107 100%);
    color: var(--navy);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(255, 212, 90, 0.3);
}

.category-badge i {
    font-size: 0.875rem;
    color: var(--navy);
}

.business-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.business-name a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.business-name a:hover {
    color: #0077be;
}

.verified-badge {
    font-size: 1.125rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.business-location {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.business-location i {
    color: #0077be;
}

.business-tagline {
    color: #495057;
    font-style: italic;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.business-description {
    color: #6c757d;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.business-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.business-actions .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Rating and CTA Section */
.business-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    min-width: 180px;
}

.rating-display {
    text-align: right;
}

.stars {
    font-size: 1.125rem;
    letter-spacing: 2px;
}

.stars i.bi-star-fill {
    color: #ffc107;
}

.stars i.bi-star {
    color: #dee2e6;
}

.stars-empty i {
    color: #e9ecef;
}

.btn-view-details {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 119, 190, 0.2);
}

.btn-view-details:hover {
    box-shadow: 0 4px 12px rgba(0, 119, 190, 0.3);
    transform: translateY(-1px);
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-blue);
}

.breadcrumb-item.active {
    color: #6c757d;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* ========================================
   Marine Divider
   ======================================== */

.marine-divider {
    background: transparent;
}

/* ========================================
   Join Directory Promo Section
   ======================================== */

.join-directory-promo {
    padding: 0;
}

.promo-card {
    text-align: center;
    color: white;
}

.promo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.promo-icon i {
    font-size: 2.5rem;
    color: white;
}

.promo-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.promo-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.promo-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem auto;
    max-width: 900px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.benefit-item i {
    font-size: 1.5rem;
    color: #ffc107;
    flex-shrink: 0;
}

.promo-cta {
    background: white;
    color: #0077be;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.promo-cta:hover {
    background: #f8f9fa;
    color: #0077be;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    .directory-hero {
        padding: 2rem 1.5rem;
    }

    .trust-badges {
        gap: 0.75rem;
    }

    .trust-badge {
        padding: 0.6rem 1rem;
        font-size: 0.8125rem;
    }

    .service-highlights-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .business-card-content {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .business-cta {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 1rem;
    }

    .rating-display {
        text-align: left;
    }

    .btn-view-details {
        width: auto;
    }

    .promo-benefits {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .directory-hero {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .directory-hero h1 {
        font-size: 1.75rem;
    }

    .directory-hero .lead {
        font-size: 1rem;
    }

    .trust-badges {
        justify-content: center;
        gap: 0.5rem;
    }

    .trust-badge {
        padding: 0.5rem 0.85rem;
        font-size: 0.75rem;
    }

    .trust-badge i {
        font-size: 1rem;
    }

    .service-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .service-highlight-card {
        padding: 1rem 0.75rem;
        font-size: 0.8125rem;
    }

    .service-highlight-card i {
        font-size: 1.5rem;
    }

    .directory-business-card {
        padding: 1rem;
    }

    .business-card-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .business-logo {
        width: 100%;
        height: 150px;
    }

    .category-badge {
        font-size: 0.6875rem;
    }

    .business-name {
        font-size: 1.125rem;
    }

    .business-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-view-details {
        width: 100%;
    }

    .featured-ribbon {
        right: 10px;
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .join-directory-promo {
        margin: 3rem 0 2rem;
        padding: 2rem 1rem;
    }

    .promo-title {
        font-size: 1.5rem;
    }

    .promo-subtitle {
        font-size: 1rem;
    }

    .promo-benefits {
        gap: 0.75rem;
    }

    .benefit-item {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .promo-cta {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .directory-hero,
    .service-highlights-section,
    .join-directory-promo,
    .featured-ribbon,
    .business-actions,
    .btn-view-details {
        display: none;
    }

    .directory-business-card {
        border: 1px solid #dee2e6;
        box-shadow: none;
        page-break-inside: avoid;
    }
}
