/**
 * WW BP Manager — Home Cards & Insurance Nav Styles
 *
 * Alpine.js-style cards with white backgrounds and rounded corners.
 *
 * @since 0.4.0
 */

/* =======================================================================
   Base Home Card Style (Alpine.js style)
   ======================================================================= */
.ww-home-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ww-home-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Card image */
.ww-card-image {
    display: block;
    width: 100%;
    height: auto;
}

.ww-card-link {
    display: block;
}

.ww-card-link:hover {
    opacity: 0.95;
}

/* =======================================================================
   Featured Card [ww_featured_card]
   ======================================================================= */
/* Featured card is just the base .ww-home-card with an image inside */

/* =======================================================================
   YouTube Card [ww_youtube_card]
   ======================================================================= */
.ww-youtube-card {
    padding: 0;
}

.ww-youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.ww-youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ww-youtube-placeholder {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* =======================================================================
   Hours Card [ww_hours_card]
   ======================================================================= */
.ww-hours-card {
    padding: 20px;
}

.ww-hours-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.ww-hours-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--ww-color-a, #014c8f);
}

.ww-hours-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ww-status-open {
    background: #d4edda;
    color: #155724;
}

.ww-status-closed {
    background: #f8d7da;
    color: #721c24;
}

.ww-hours-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ww-hours-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.ww-hours-row.ww-today {
    background: #f0f6fc;
    font-weight: 600;
}

.ww-hours-day {
    color: #333;
}

.ww-hours-time {
    color: #666;
}

.ww-hours-time.ww-closed {
    color: #999;
    font-style: italic;
}

/* =======================================================================
   Video Embed [ww_video]
   ======================================================================= */
.ww-video-container {
    margin: 24px 0;
}

.ww-video-title {
    margin: 0 0 12px;
    font-size: 1.1em;
    color: var(--ww-color-a, #014c8f);
}

.ww-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.ww-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =======================================================================
   Guides Footer [ww_guides_footer]
   ======================================================================= */
.ww-guides-footer {
    padding: 0;
}

.ww-guides-footer-title {
    display: block;
    margin: 0 0 16px;
    font-family: var(--ww-font-menu, inherit);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

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

.ww-guides-footer-list li {
    margin: 0 0 8px 0;
    padding: 0;
}

.ww-guides-footer-list li:last-child {
    margin-bottom: 0;
}

.ww-guides-footer-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

.ww-guides-footer-list a:hover {
    color: #fff;
}

/* =======================================================================
   Post Cards [ww_post_cards]
   Alpine.js style cards for blog archive pages
   ======================================================================= */
.ww-post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ww-post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ww-post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ww-post-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f4f8;
}

.ww-post-card-content {
    padding: 24px;
}

.ww-post-card-title {
    margin: 0 0 12px;
    font-size: 1.35em;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ww-color-a, #014c8f);
}

.ww-post-card:hover .ww-post-card-title {
    color: var(--ww-color-c, #c75b12);
}

.ww-post-card-excerpt {
    margin: 0 0 16px;
    font-size: 1em;
    line-height: 1.6;
    color: #4a5568;
}

.ww-post-card-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--ww-color-c, #c75b12);
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.ww-post-card:hover .ww-post-card-button {
    background: var(--ww-color-a, #014c8f);
}

/* Default: cards wrap naturally based on available space */
.ww-post-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .ww-post-cards {
        grid-template-columns: 1fr;
    }
}

/* =======================================================================
   Quick Links [ww_quick_links]
   ======================================================================= */
.ww-quick-links {
    padding: 20px 0;
}

.ww-quick-links-title {
    margin: 0 0 12px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ww-quick-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--link-columns, 1), 1fr);
    gap: 6px 20px;
}

.ww-quick-links-list li {
    margin: 0;
    padding: 4px 0;
}

.ww-quick-links-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.ww-quick-links-list a:hover {
    color: #fff;
    text-decoration: underline;
}

/* =======================================================================
   Insurance Line Navigation [ww_insurance_nav]
   ======================================================================= */
.ww-insurance-nav {
    margin: 20px 0;
}

.ww-insurance-nav-title {
    margin: 0 0 12px;
    font-size: 1em;
    font-weight: 600;
    color: var(--ww-color-a, #014c8f);
}

/* Pills Style */
.ww-insurance-nav-pills {
    display: grid;
    grid-template-columns: repeat(var(--nav-columns, 3), 1fr);
    gap: 8px;
}

.ww-insurance-nav-pill {
    display: block;
    padding: 10px 12px;
    background: #f0f4f8;
    color: var(--ww-color-a, #014c8f) !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ww-insurance-nav-pill:hover {
    background: var(--ww-color-a, #014c8f) !important;
    color: #fff !important;
}

.ww-insurance-nav-pill.ww-insurance-nav-current {
    background: var(--ww-color-a, #014c8f);
    color: #fff !important;
    border-color: var(--ww-color-c, #fd5401);
}

/* List Style */
.ww-insurance-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ww-insurance-nav-list li {
    margin: 0;
    padding: 0;
}

.ww-insurance-nav-list a {
    display: block;
    padding: 10px 12px;
    color: var(--ww-color-a, #014c8f);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.ww-insurance-nav-list a:hover {
    background: #f8f9fa;
    padding-left: 16px;
}

.ww-insurance-nav-item.ww-insurance-nav-current a {
    background: var(--ww-color-a, #014c8f);
    color: #fff;
    font-weight: 600;
}

/* Dropdown Style */
.ww-insurance-nav-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.ww-insurance-nav-select:focus {
    outline: none;
    border-color: var(--ww-color-a, #014c8f);
}

/* Insurance Sidebar */
.ww-insurance-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ww-insurance-sidebar-section {
    margin-bottom: 20px;
}

.ww-insurance-sidebar-section:last-child {
    margin-bottom: 0;
}

.ww-insurance-sidebar-heading {
    margin: 0 0 10px;
    font-size: 1em;
    color: var(--ww-color-a, #014c8f);
    border-bottom: 2px solid var(--ww-color-c, #fd5401);
    padding-bottom: 6px;
}

.ww-insurance-sidebar-back {
    margin: 0 0 12px;
}

.ww-insurance-sidebar-back a {
    color: var(--ww-color-c, #fd5401);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.ww-insurance-sidebar-back a:hover {
    text-decoration: underline;
}

.ww-insurance-sidebar-subheading {
    margin: 14px 0 6px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.ww-insurance-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ww-insurance-sidebar-list li {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid #e2e4e7;
    font-size: 0.9em;
}

.ww-insurance-sidebar-list li:last-child {
    border-bottom: none;
}

.ww-insurance-sidebar-list a {
    color: var(--ww-color-a, #014c8f);
    text-decoration: none;
}

.ww-insurance-sidebar-list a:hover {
    text-decoration: underline;
}

/* =======================================================================
   Responsive
   ======================================================================= */
@media (max-width: 768px) {
    .ww-insurance-nav-pills {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ww-hours-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .ww-insurance-nav-pills {
        grid-template-columns: 1fr;
    }
    
    .ww-quick-links-list {
        grid-template-columns: 1fr !important;
    }
}
