/**
 * Silva Customer Services Shortcode Styles
 * Premium horizontal carousel design for service categories
 * 
 * @package Silva_Customer_Portal
 * @version 2.7.0
 */

/* ==========================================================================
   Smooth Scroll Behavior
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

/* Scroll padding to account for any fixed headers */
html {
    scroll-padding-top: 100px;
}

/* Silva Customer Services Container */
.silva-customer-services {
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

/* Services Section Layout */
.services-section {
    padding: 40px 16px;
    margin: 0;
    position: relative;
    transition: background-color 0.3s ease;
}

.services-section:first-of-type {
    padding-top: 0;
}

.services-section:last-child {
    padding-bottom: 48px;
}

/* Lighter section headers (less visual weight since we have cards above) */
.services-section__header {
    margin: 0 0 24px 0;
    text-align: center;
}

/* Tighter spacing for quick-book section */
.services-section--quick-book .services-section__header {
    margin: 0 0 16px 0;
}

.services-section__title {
    font-size: 20px;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.services-section__description {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.services-section__content {
    margin-top: 4px;
    overflow-x: hidden;
}

/* Service Grid Container (converted from carousel) */
.service-carousel-wrap {
    position: relative;
    margin-top: 4px;
}

.service-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 8px 8px 12px;
}

/* Premium Service Cards */
.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease 0.05s, box-shadow 0.15s ease 0.05s, border-color 0.15s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.service-card.featured {
    border: 2px solid #014385;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #01356a;
}

/* Card Image Section */
.service-card .card-image {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: #f5f5f5;
}

.service-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.service-card .featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #014385;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.service-card .featured-badge i {
    font-size: 0.7rem;
}

/* Card Content Section */
.service-card .card-content {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2a44;
    line-height: 1.2;
    margin: 0;
}

.service-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.service-card .tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
}

/* Card Footer Section */
.service-card .card-footer {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 1px solid #e5e7eb;
}

.service-card .footer-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    color: #014385;
    font-weight: 600;
}

.service-card .footer-badge i {
    color: #014385;
    font-size: 0.7rem;
}

/* Loading state */
.service-card.loading {
    pointer-events: none;
    opacity: 0.6;
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.4; }
}

/* Focus state for accessibility */
.service-card:focus-within {
    outline: 3px solid #d97706;
    outline-offset: 4px;
}

/* Carousel Navigation - Hidden for grid layout */
.carousel-dots,
.carousel-arrow,
.carousel-frame .carousel-arrow {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .services-section {
        padding: 32px 12px;
    }
    
    .services-section:first-of-type {
        padding-top: 24px;
    }
    
    .services-section:last-child {
        padding-bottom: 64px; /* Add comfortable space for fixed bottom nav bar on mobile */
    }
    
    .services-section__header {
        margin: 0 0 16px 0;
    }
    
    .services-section__title {
        font-size: 18px;
    }
    
    .services-section__description {
        font-size: 13px;
    }
    
    .service-carousel-wrap {
        margin-bottom: 40px;
    }
    
    .service-scroll {
        padding: 6px 6px 16px;
        gap: 12px;
        grid-template-columns: 1fr;
    }
    
    .service-card .card-image {
        height: 100px;
    }
    
    .service-card .card-content {
        padding: 8px 10px;
    }
    
    .service-card .card-title {
        font-size: 0.9rem;
    }
    
    .service-card .featured-badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .service-card .footer-badge {
        font-size: 0.6rem;
    }
    
    .service-card .card-footer {
        padding: 6px 8px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .service-scroll {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .services-section {
        padding: 64px 24px;
    }
    
    .services-section:first-of-type {
        padding-top: 48px;
    }
    
    .services-section__header {
        margin: 0 0 32px 0;
    }
    
    .services-section__title {
        font-size: 24px;
    }
    
    .services-section__description {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    .service-scroll {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ==========================================================================
   Section Spacing Adjustments for New Layout
   ========================================================================== */
/* Add subtle dividers between sections */
.services-section + .services-section::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb 50%, transparent);
    margin: 0 auto 2rem;
    max-width: 600px;
}
/* Add more whitespace between sections for breathing room */
.services-section + .services-section {
    margin-top: 0;
}

/* Search Active State - visual feedback when search routes to section */
.services-section.search-active {
    animation: sectionHighlightPulse 1.5s ease;
}

@keyframes sectionHighlightPulse {
    0% {
        background-color: transparent;
    }
    25% {
        background-color: rgba(59, 130, 246, 0.05);
    }
    75% {
        background-color: rgba(59, 130, 246, 0.03);
    }
    100% {
        background-color: transparent;
    }
}

/* Section visibility transitions */
.services-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Scroll anchor offset helper */
.services-section[id] {
    scroll-margin-top: 100px;
}

/* Empty State Styling */
.services-section__empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #9ca3af;
}

.services-section__empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.services-section__empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.services-section__empty-description {
    font-size: 0.9375rem;
    color: #9ca3af;
    margin: 0;
}

/* Hide scrollbars but maintain functionality */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* ==========================================================================
   Accessibility & Print Styles
   ========================================================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .services-section__title {
        color: #000000;
    }
    
    .service-card {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .service-card .card-image img,
    .services-section {
        transition: none;
    }
}

/* Print styles */
@media print {
    .carousel-dots,
    .carousel-arrow {
        display: none;
    }
    
    .service-scroll {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .service-card {
        break-inside: avoid;
    }
}

/* ==========================================================================
   Home Project Command Center Enhancements - v2.8.0
   ========================================================================== */

/* Enhanced Section Spacing */
.services-section {
    padding: 80px 1.5rem;
    background-color: #ffffff;
}

.services-section:nth-child(even) {
    background-color: #f9fafb;
}

/* Section Meta Text */
.services-section__meta {
    font-size: 0.9375rem;
    color: #d97706;
    font-weight: 600;
    margin: 0.5rem 0 0;
}

/* ==========================================================================
   Resources Section
   ========================================================================== */

.services-section--resources {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.resource-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: #8b5cf6;
}

.resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resource-card-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.resource-card-time {
    font-size: 0.8125rem;
    color: #8b5cf6;
    font-weight: 600;
    background-color: #faf5ff;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
}

.resource-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.resource-card-description {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1rem;
    line-height: 1.5;
    flex: 1;
}

.resource-card-link {
    color: #8b5cf6;
    font-weight: 700;
    font-size: 0.9375rem;
}

.resources-cta {
    text-align: center;
    margin-top: 1.5rem;
}

.resources-browse-all {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.resources-browse-all:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================================
   Trust Footer Section
   ========================================================================== */

.services-section--trust {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 80px 1.5rem;
}

.trust-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.trust-footer__title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 2.5rem;
    line-height: 1.2;
    color: #ffffff;
}

.trust-badges-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.trust-badge {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.trust-badge-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.trust-badge-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    color: #ffffff;
}

.trust-badge-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

.trust-footer__cta {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-cta-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 1.5rem;
    color: #ffffff;
}

.trust-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.trust-cta-button {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.trust-cta-button--primary {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.trust-cta-button--primary:hover {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
    transform: translateY(-2px);
}

.trust-cta-button--secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.trust-cta-button--secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive - Tablet & Desktop
   ========================================================================== */

@media (min-width: 640px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trust-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .services-section {
        padding: 80px 2rem;
    }
    
    .trust-cta-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }
    
    .trust-cta-button {
        min-width: 200px;
    }
}

@media (min-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trust-badges-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trust-footer__title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1280px) {
    .trust-badges-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Enhanced card depth for all service cards */
.service-card,
.project-planning-card,
.resource-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
