/**
 * Jenks Service Area Addon - Main Styles
 * 
 * @package Jenks_Service_Area_Addon
 * @version 1.0.0
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    --jsa-primary: #E31837;
    --jsa-primary-dark: #C41530;
    --jsa-black: #131313;
    --jsa-white: #FFFFFF;
    --jsa-gray: #B0B0B0;
    --jsa-light-gray: #F4F4F4;
    --jsa-transition: all 0.3s ease;
    --jsa-transition-slow: all 0.5s ease;
}

/* ==========================================
   SERVICE AREA WIDGET STYLES
   ========================================== */

/* Wrapper */
.jsa-wrapper {
    width: 100%;
}

/* Header */
.jsa-header {
    margin-bottom: 40px;
}

.jsa-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--jsa-primary);
    margin-bottom: 10px;
}

.jsa-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--jsa-white);
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.jsa-description {
    font-size: 16px;
    color: var(--jsa-gray);
    margin: 0;
    max-width: 600px;
}

.jsa-header[style*="text-align: center"] .jsa-description {
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layout */
.jsa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Items */
.jsa-item {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: var(--jsa-transition);
    overflow: hidden;
}

.jsa-item-inner {
    position: relative;
    z-index: 2;
}

/* Hover Transforms */
.jsa-item.hover-translate-up:hover {
    transform: translateY(-8px);
}

.jsa-item.hover-scale:hover {
    transform: scale(1.03);
}

.jsa-item.hover-rotate:hover {
    transform: rotate(1deg);
}

/* Item Hover */
.jsa-item:hover {
    border-color: var(--jsa-primary);
    background: rgba(227, 24, 55, 0.05);
    box-shadow: 0 10px 30px rgba(227, 24, 55, 0.15);
}

/* Icon */
.jsa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(227, 24, 55, 0.1);
    border-radius: 50%;
    margin-bottom: 15px;
    transition: var(--jsa-transition);
}

.jsa-icon i,
.jsa-icon svg {
    font-size: 28px;
    color: var(--jsa-primary);
    transition: var(--jsa-transition);
}

.jsa-item:hover .jsa-icon {
    background: var(--jsa-primary);
    transform: scale(1.1);
}

.jsa-item:hover .jsa-icon i,
.jsa-item:hover .jsa-icon svg {
    color: var(--jsa-white);
}

/* Icon Positions */
.jsa-item.icon-left .jsa-item-inner {
    display: flex;
    align-items: center;
    text-align: left;
}

.jsa-item.icon-left .jsa-icon {
    margin-bottom: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.jsa-item.icon-right .jsa-item-inner {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    text-align: right;
}

.jsa-item.icon-right .jsa-icon {
    margin-bottom: 0;
    margin-left: 15px;
    flex-shrink: 0;
}

/* Area Name */
.jsa-area-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--jsa-white);
    margin: 0;
    transition: var(--jsa-transition);
}

.jsa-item:hover .jsa-area-name {
    color: var(--jsa-primary);
}

/* Area Description */
.jsa-area-desc {
    font-size: 14px;
    color: var(--jsa-gray);
    margin: 8px 0 0 0;
}

/* Highlighted Items */
.jsa-item.is-highlighted {
    border-color: var(--jsa-primary);
    border-width: 2px;
}

.jsa-badge {
    position: absolute;
    top: -1px;
    right: 15px;
    background: var(--jsa-primary);
    color: var(--jsa-white);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 0 0 5px 5px;
}

/* Layout Variations */
.jsa-layout-list .jsa-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

.jsa-layout-list .jsa-item {
    padding: 20px 25px;
}

.jsa-layout-list .jsa-item-inner {
    display: flex;
    align-items: center;
}

.jsa-layout-list .jsa-icon {
    margin-bottom: 0;
    margin-right: 20px;
}

.jsa-layout-list .jsa-content {
    text-align: left;
}

.jsa-layout-cards .jsa-item {
    background: var(--jsa-black);
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    padding: 35px 25px;
}

.jsa-layout-cards .jsa-item:hover {
    box-shadow: 0 15px 40px rgba(227, 24, 55, 0.2);
}

.jsa-layout-minimal .jsa-item {
    background: transparent;
    border: none;
    padding: 15px;
}

.jsa-layout-minimal .jsa-icon {
    background: transparent;
    width: auto;
    height: auto;
}

.jsa-layout-boxed .jsa-item {
    background: var(--jsa-black);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.jsa-layout-boxed .jsa-item:hover {
    border-color: var(--jsa-primary);
    background: rgba(227, 24, 55, 0.1);
}

/* ==========================================
   SERVICE CARD WIDGET STYLES
   ========================================== */

/* Card Base */
.jsc-card {
    position: relative;
    display: flex;
    min-height: 350px;
    overflow: hidden;
    background: var(--jsa-black);
    border-radius: 8px;
}

/* Content Wrapper */
.jsc-content-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    flex: 0 0 50%;
    max-width: 50%;
}

.jsc-content {
    position: relative;
}

/* Image Wrapper */
.jsc-image-wrap {
    position: relative;
    flex: 0 0 50%;
    max-width: 50%;
    overflow: hidden;
}

.jsc-image-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--jsa-transition);
    pointer-events: none;
}

.jsc-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--jsa-transition-slow);
}

/* Image Position Variations */
.jsc-image-left {
    flex-direction: row;
}

.jsc-image-right {
    flex-direction: row-reverse;
}

.jsc-image-top {
    flex-direction: column;
}

.jsc-image-top .jsc-content-wrap,
.jsc-image-top .jsc-image-wrap,
.jsc-image-bottom .jsc-content-wrap,
.jsc-image-bottom .jsc-image-wrap {
    flex: none;
    max-width: 100%;
    width: 100%;
}

.jsc-image-top .jsc-image-wrap,
.jsc-image-bottom .jsc-image-wrap {
    height: 250px;
}

.jsc-image-bottom {
    flex-direction: column-reverse;
}

.jsc-image-background .jsc-image-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    flex: none;
}

.jsc-image-background .jsc-content-wrap {
    max-width: 100%;
    flex: 1;
    background: linear-gradient(90deg, rgba(19, 19, 19, 0.95) 0%, rgba(19, 19, 19, 0.7) 60%, transparent 100%);
}

/* Service Number */
.jsc-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--jsa-primary);
    margin-bottom: 10px;
    font-style: italic;
}

/* Title */
.jsc-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--jsa-white);
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Description */
.jsc-description {
    font-size: 15px;
    color: var(--jsa-gray);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Button */
.jsc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--jsa-primary);
    color: var(--jsa-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--jsa-transition);
}

.jsc-button:hover {
    background: var(--jsa-primary-dark);
    color: var(--jsa-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(227, 24, 55, 0.4);
}

.jsc-btn-icon {
    display: inline-flex;
    align-items: center;
}

.jsc-btn-icon i,
.jsc-btn-icon svg {
    font-size: 14px;
}

/* Image Hover Effects */
.jsc-img-hover-zoom:hover .jsc-image-wrap img {
    transform: scale(1.1);
}

.jsc-img-hover-rotate:hover .jsc-image-wrap img {
    transform: scale(1.1) rotate(3deg);
}

.jsc-img-hover-slide:hover .jsc-image-wrap img {
    transform: translateX(10px) scale(1.05);
}

.jsc-img-hover-shine .jsc-image-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    z-index: 2;
    transition: var(--jsa-transition-slow);
}

.jsc-img-hover-shine:hover .jsc-image-wrap::before {
    left: 100%;
}

/* Card Style Variations */
.jsc-style-overlay .jsc-content-wrap {
    background: linear-gradient(180deg, transparent 0%, rgba(19, 19, 19, 0.9) 100%);
}

.jsc-style-stacked {
    flex-direction: column;
}

.jsc-style-stacked .jsc-content-wrap,
.jsc-style-stacked .jsc-image-wrap {
    max-width: 100%;
    flex: none;
}

.jsc-style-stacked .jsc-image-wrap {
    height: 200px;
}

.jsc-style-minimal {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.jsc-style-minimal .jsc-image-wrap::after {
    display: none;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 1024px) {
    .jsa-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .jsa-title {
        font-size: 30px;
    }
    
    .jsc-card {
        min-height: 300px;
    }
    
    .jsc-title {
        font-size: 24px;
    }
    
    .jsc-content-wrap {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .jsa-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .jsa-title {
        font-size: 26px;
    }
    
    .jsa-item {
        padding: 20px 15px;
    }
    
    .jsa-icon {
        width: 50px;
        height: 50px;
    }
    
    .jsa-icon i,
    .jsa-icon svg {
        font-size: 22px;
    }
    
    .jsc-card {
        flex-direction: column !important;
        min-height: auto;
    }
    
    .jsc-content-wrap,
    .jsc-image-wrap {
        max-width: 100% !important;
        flex: none !important;
        width: 100%;
    }
    
    .jsc-image-wrap {
        height: 250px !important;
        order: -1;
    }
    
    .jsc-content-wrap {
        padding: 25px 20px;
    }
    
    .jsc-title {
        font-size: 22px;
    }
    
    .jsc-image-background .jsc-content-wrap {
        background: rgba(19, 19, 19, 0.9);
    }
}

@media (max-width: 480px) {
    .jsa-grid {
        grid-template-columns: 1fr;
    }
    
    .jsa-title {
        font-size: 22px;
    }
    
    .jsa-header {
        margin-bottom: 30px;
    }
    
    .jsc-image-wrap {
        height: 200px !important;
    }
    
    .jsc-title {
        font-size: 20px;
    }
    
    .jsc-description {
        font-size: 14px;
    }
    
    .jsc-button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   DARK/LIGHT MODE SUPPORT
   ========================================== */

/* Light Mode Override (if needed) */
.elementor-section.elementor-section-boxed[data-settings*="light"] .jsa-item,
.jsa-wrapper.light-mode .jsa-item {
    background: var(--jsa-white);
    border-color: rgba(0, 0, 0, 0.1);
}

.jsa-wrapper.light-mode .jsa-title,
.jsa-wrapper.light-mode .jsa-area-name {
    color: var(--jsa-black);
}

.jsa-wrapper.light-mode .jsa-item:hover {
    background: rgba(227, 24, 55, 0.05);
}
