/* ========================================
   SIDEBAR STYLES - Modern & Professional
   ======================================== */

/* Base Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sidebar Widget Base */
.sidebar-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Widget Icon */
.widget-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #2d5a3d 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
}

/* Widget Title */
.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark, #1a1a1a);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary, #c9a961), var(--primary, #1a472a));
}

/* ========================================
   SEARCH WIDGET
   ======================================== */
.sidebar-widget--search .search-input-wrapper {
    display: flex;
    gap: 8px;
    position: relative;
}

.sidebar-widget--search .search-field {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.sidebar-widget--search .search-field:focus {
    outline: none;
    border-color: var(--primary, #1a472a);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
}

.sidebar-widget--search .search-submit {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #2d5a3d 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-widget--search .search-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.3);
}

/* ========================================
   CATEGORIES WIDGET
   ======================================== */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark, #1a1a1a);
    transition: all 0.3s ease;
}

.category-item a:hover {
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #2d5a3d 100%);
    color: #fff;
    transform: translateX(4px);
}

.category-name {
    font-weight: 500;
}

.category-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-item a:hover .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   RECENT POSTS WIDGET
   ======================================== */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-post-item {
    margin: 0;
}

.recent-post-link {
    display: flex;
    gap: 14px;
    text-decoration: none;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recent-post-link:hover {
    background: #f0f4f1;
    transform: translateX(4px);
}

.recent-post-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.recent-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recent-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark, #1a1a1a);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #888;
}

/* ========================================
   TAGS WIDGET
   ======================================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f4f1;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark, #1a1a1a);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--primary, #1a472a);
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   CTA WIDGET
   ======================================== */
.sidebar-widget--cta {
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #0d2816 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 32px 24px;
}

.sidebar-widget--cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-widget--cta .cta-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

.sidebar-widget--cta .cta-content {
    position: relative;
    z-index: 1;
}

.sidebar-widget--cta .cta-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.sidebar-widget--cta h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.sidebar-widget--cta p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 20px 0;
}

.sidebar-widget--cta .cta-phone {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary, #c9a961);
    text-decoration: none;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.sidebar-widget--cta .cta-phone:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(201, 169, 97, 0.5);
}

.sidebar-widget--cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--secondary, #c9a961);
    color: var(--dark, #1a1a1a);
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-widget--cta .cta-button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sidebar-widget--cta .cta-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #25D366;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.sidebar-widget--cta .cta-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* ========================================
   SERVICES NAV WIDGET
   ======================================== */
.services-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-nav-item {
    margin-bottom: 8px;
}

.service-nav-item:last-child {
    margin-bottom: 0;
}

.service-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark, #1a1a1a);
    transition: all 0.3s ease;
}

.service-nav-item a:hover {
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #2d5a3d 100%);
    color: #fff;
    transform: translateX(4px);
}

.service-icon {
    width: 40px;
    height: 40px;
    background: rgba(26, 71, 42, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-nav-item a:hover .service-icon {
    background: rgba(255, 255, 255, 0.2);
}

.service-name {
    flex: 1;
    font-weight: 500;
}

.service-arrow {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.service-nav-item a:hover .service-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ========================================
   WHY US WIDGET
   ======================================== */
.why-us-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.why-us-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.why-us-item:last-child {
    border-bottom: none;
}

.check-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.why-us-item span:last-child {
    font-weight: 500;
    color: var(--dark, #1a1a1a);
}

/* ========================================
   PROMO WIDGET
   ======================================== */
.sidebar-widget--promo {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed var(--secondary, #c9a961);
    text-align: center;
    position: relative;
}

.promo-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.promo-content h4 {
    font-size: 1rem;
    color: var(--dark, #1a1a1a);
    margin: 16px 0 8px 0;
}

.promo-discount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary, #1a472a);
    margin-bottom: 8px;
}

.promo-content p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 16px;
}

.promo-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary, #1a472a);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.promo-button:hover {
    background: #0d2816;
    transform: translateY(-2px);
}

/* ========================================
   CITIES WIDGET
   ======================================== */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.city-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark, #1a1a1a);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.city-item:hover,
.city-item.active {
    background: var(--primary, #1a472a);
    color: #fff;
}

.city-pin {
    color: var(--secondary, #c9a961);
    transition: all 0.3s ease;
}

.city-item:hover .city-pin,
.city-item.active .city-pin {
    color: var(--secondary, #c9a961);
}

.view-all-cities {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #f0f4f1;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary, #1a472a);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-all-cities:hover {
    background: var(--primary, #1a472a);
    color: #fff;
}

/* ========================================
   LOCAL BENEFITS WIDGET
   ======================================== */
.local-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.benefit-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.benefit-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(26, 71, 42, 0.1) 0%, rgba(26, 71, 42, 0.05) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #1a472a);
    flex-shrink: 0;
}

.benefit-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark, #1a1a1a);
    margin-bottom: 2px;
}

.benefit-content span {
    font-size: 0.8rem;
    color: #888;
}

/* ========================================
   REFERENCES WIDGET
   ======================================== */
.reference-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 16px 0;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary, #1a472a);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f0f4f1;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary, #1a472a);
}

/* ========================================
   QUICK FORM WIDGET
   ======================================== */
.quick-quote-form .form-group {
    margin-bottom: 12px;
}

.quick-quote-form input,
.quick-quote-form select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.quick-quote-form input:focus,
.quick-quote-form select:focus {
    outline: none;
    border-color: var(--primary, #1a472a);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
}

.quick-quote-form .submit-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary, #1a472a) 0%, #2d5a3d 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.quick-quote-form .submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 71, 42, 0.3);
}

/* ========================================
   PRODUCT CATEGORIES WIDGET
   ======================================== */
.product-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-cat-item {
    margin-bottom: 4px;
}

.product-cat-item a {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark, #1a1a1a);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 28px;
}

.product-cat-item a::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--secondary, #c9a961);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.product-cat-item a:hover {
    background: var(--primary, #1a472a);
    color: #fff;
    padding-left: 32px;
}

.product-cat-item a:hover::before {
    background: #fff;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .sidebar-widget {
        padding: 20px;
    }
    
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .reference-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
