/**
 * Component Styles
 * Consolidated styles moved from inline template CSS for better caching and maintainability
 * 
 * @package PreferredUrgentCareV2
 * @since 2.1.0
 */

/* ==========================================================================
   ACCESSIBILITY - SKIP LINK
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 10000;
    background: var(--primary, #045798);
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.screen-reader-text:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    margin: 0;
    overflow: visible;
}

/* ==========================================================================
   ANNOUNCEMENT BAR
   ========================================================================== */

#pu-announcement-bar {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    transform: translateY(-100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    text-align: center;
    z-index: 9999;
}

#pu-announcement-bar.show {
    transform: translateY(0);
    opacity: 1;
}

#close-announcement {
    position: absolute;
    right: 15px;
    top: 12px;
    background: none;
    border: none;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
}

/* Announcement Types */
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-bottom: 1px solid #ffeeba;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-bottom: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-bottom: 1px solid #bee5eb;
}

@media (max-width: 600px) {
    #pu-announcement-bar {
        font-size: 14px;
        padding: 12px 40px 12px 15px;
    }

    #close-announcement {
        font-size: 20px;
        top: 8px;
    }
}

/* ==========================================================================
   FOOTER CTA SECTION
   ========================================================================== */

.footer-cta-section {
    background: linear-gradient(135deg, #045798 0%, #0070c9 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.footer-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.cta-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
}

/* Icon colors by CTA type */
.dripzone-cta .cta-icon {
    background: linear-gradient(135deg, #00b4db, #0083b0);
}

.services-cta .cta-icon {
    background: linear-gradient(135deg, #045798, #0070c9);
}

.location-cta .cta-icon {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.telemedicine-cta .cta-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.default-cta .cta-icon {
    background: linear-gradient(135deg, #D30B35, #ff4757);
}

.cta-content {
    flex: 1;
}

.cta-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 1rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.footer-cta .btn {
    white-space: nowrap;
}

/* Footer CTA Responsive */
@media (max-width: 991.98px) {
    .footer-cta {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .footer-cta-section {
        padding: 2rem 0;
    }

    .cta-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .cta-content h3 {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   ARCHIVE PAGE
   ========================================================================== */

/* Archive Hero */
.archive-hero {
    background: linear-gradient(135deg, #045798 0%, #0070c9 50%, #00a3e0 100%);
    min-height: 35vh;
}

.archive-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="8"/></svg>') repeat;
    background-size: 100px;
}

.archive-hero .hero-pattern {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.archive-hero .hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}

.archive-hero .hero-wave svg {
    width: calc(100% + 1.3px);
    height: 50px;
}

.archive-hero .hero-wave path {
    fill: #f8f9fa;
}

.min-vh-25 {
    min-height: 25vh;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

/* Archive Cards */
.archive-card {
    transition: all 0.3s ease;
}

.archive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

/* Category Items */
.category-item {
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.category-item:hover {
    background: #e9ecef;
}

.category-item.active {
    background: linear-gradient(135deg, #045798, #0070c9);
}

/* Popular Numbers */
.popular-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #045798, #0070c9);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #045798, #0070c9);
}

.cta-widget .cta-pattern {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><path d="M0 0h80v80H0z" fill="none"/><path d="M0 80L80 0" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>') repeat;
    background-size: 20px;
}

/* Pagination */
.pagination .page-link {
    border: none;
    margin: 0 4px;
    border-radius: 50px !important;
    padding: 10px 16px;
    color: #333;
    background: #f8f9fa;
    transition: all 0.3s;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
    background: linear-gradient(135deg, #045798, #0070c9);
    color: white;
}

/* Featured Post */
.featured-archive-post {
    transition: all 0.3s ease;
}

.featured-archive-post:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

@media (max-width: 767.98px) {
    .archive-hero h1 {
        font-size: 1.75rem;
    }

    .min-vh-25 {
        min-height: 30vh;
    }
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */

.post-body p {
    margin-bottom: 1.25rem;
}

.post-body h2,
.post-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.post-body ul,
.post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

/* Contact Section */
.contact-form-wrapper,
.contact-info-wrapper {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Info Cards */
.info-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.info-card .icon-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.info-card .info-content h4 {
    color: #007bff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.info-card .info-content p {
    margin: 0;
    color: #555;
    font-size: 1rem;
}

.info-card .info-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-card .info-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Contact Form Styles (for plugin) */
.pucf-form-wrapper .form-control,
.pucf-form-wrapper .form-select {
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pucf-form-wrapper .form-control:focus,
.pucf-form-wrapper .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.pucf-form-wrapper .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.pucf-form-wrapper .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pucf-form-wrapper .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Contact Page Responsive */
@media (max-width: 991px) {

    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}