/* New Profile Plugin - Frontend Styles */
/* Elementor Compatible */

:root {
    --npp-primary-color: #4f46e5;
    --npp-primary-hover: #4338ca;
    --npp-secondary-color: #64748b;
    --npp-bg-color: #ffffff;
    --npp-border-color: #e2e8f0;
    --npp-text-color: #1e293b;
    --npp-text-secondary: #64748b;
    --npp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --npp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --npp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --npp-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --npp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --npp-border-radius: 12px;
}

/* Elementor Reset - Ensure our styles don't get overridden */
.elementor-widget-shortcode .npp-container,
.elementor-element .npp-container,
.elementor .npp-container {
    box-sizing: border-box;
}

.elementor-widget-shortcode .npp-container *,
.elementor-element .npp-container *,
.elementor .npp-container * {
    box-sizing: border-box;
}

/* Container */
.npp-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Elementor full-width compatibility */
.elementor-section-boxed .npp-container {
    max-width: 100%;
}

.elementor-widget-container .npp-container {
    margin: 0;
}

/* Ensure compatibility with Elementor column spacing */
.elementor-column .npp-container {
    padding: 0;
}

/* Grid Layout */
.npp-container .npp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}

/* Ensure grid works in Elementor */
.elementor-widget-shortcode .npp-grid,
.elementor-element .npp-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
}

/* Section Headers */
.npp-container .npp-section-header {
    margin-bottom: 24px;
}

.npp-container .npp-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--npp-text-color);
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--npp-primary-color);
    display: inline-block;
    line-height: 1.3;
}

/* Override Elementor heading styles */
.elementor-widget-shortcode .npp-section-title,
.elementor-element .npp-section-title {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
}

/* Services Section */
.npp-container .npp-services-section {
    width: 100%;
    min-width: 0;
}

.elementor-widget-shortcode .npp-services-section,
.elementor-element .npp-services-section {
    flex: 0 0 auto;
}

/* Consultation Button */
.npp-consultation-button-wrapper {
    margin-bottom: 24px;
}

.npp-consultation-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--npp-primary-color) 0%, var(--npp-primary-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--npp-border-radius);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--npp-transition);
    box-shadow: var(--npp-shadow-lg);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.npp-consultation-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.npp-consultation-button:hover::before {
    left: 100%;
}

.npp-consultation-button:hover {
    box-shadow: var(--npp-shadow-hover);
    transform: translateY(-3px);
    text-decoration: none;
    color: white;
}

.npp-consultation-button:active {
    transform: translateY(-1px);
}

.npp-consultation-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.npp-consultation-text {
    flex: 1;
    text-align: center;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.npp-consultation-arrow {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.npp-consultation-button:hover .npp-consultation-icon {
    transform: scale(1.1) rotate(-5deg);
}

.npp-consultation-button:hover .npp-consultation-arrow {
    transform: translateX(4px);
}

/* Elementor compatibility for consultation button */
.elementor-widget-shortcode .npp-consultation-button,
.elementor-element .npp-consultation-button {
    text-decoration: none !important;
    text-transform: none;
    letter-spacing: 0.5px;
}

.npp-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Service Card */
.npp-services-grid .npp-service-card {
    display: block;
    background: var(--npp-bg-color);
    border: 2px solid var(--npp-border-color);
    border-radius: var(--npp-border-radius);
    padding: 24px 20px;
    text-decoration: none;
    color: var(--npp-text-color);
    transition: var(--npp-transition);
    box-shadow: var(--npp-shadow-sm);
    position: relative;
    overflow: visible;
    min-height: 140px;
    cursor: pointer;
    box-sizing: border-box;
}

/* Elementor link style override */
.elementor-widget-shortcode .npp-service-card,
.elementor-element .npp-service-card {
    text-decoration: none !important;
}

/* Service Tag */
.npp-service-tag {
    position: absolute;
    top: -10px;
    right: 12px;
    background: linear-gradient(135deg, var(--npp-primary-color) 0%, var(--npp-primary-hover) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--npp-shadow-md);
    z-index: 10;
    white-space: nowrap;
    transition: var(--npp-transition);
}

.npp-service-card:hover .npp-service-tag {
    transform: translateY(-2px);
    box-shadow: var(--npp-shadow-lg);
}

/* Service Icon */
.npp-service-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.npp-service-card:hover .npp-service-icon {
    transform: scale(1.15) rotate(5deg);
}

.npp-services-grid .npp-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--npp-primary-color), var(--npp-primary-hover));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.npp-services-grid .npp-service-card:hover::before {
    transform: scaleX(1);
}

.npp-services-grid .npp-service-card:hover {
    border-color: var(--npp-primary-color);
    box-shadow: var(--npp-shadow-hover);
    transform: translateY(-4px);
    text-decoration: none;
}

.npp-service-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.npp-service-card .npp-service-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--npp-text-color);
    line-height: 1.4;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.npp-service-card .npp-service-description {
    font-size: 14px;
    color: var(--npp-text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.6;
    flex-grow: 1;
    font-family: inherit;
}

.npp-service-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--npp-primary-color);
    color: white;
    margin-top: auto;
    transition: var(--npp-transition);
    align-self: flex-start;
}

.npp-service-card:hover .npp-service-arrow {
    background-color: var(--npp-primary-hover);
    transform: translateX(4px);
}

.npp-no-services {
    text-align: center;
    padding: 40px 20px;
    color: var(--npp-text-secondary);
    font-size: 16px;
}

/* Load More Button */
.npp-container .npp-load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.npp-container .npp-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--npp-primary-color);
    color: white !important;
    border: none;
    border-radius: var(--npp-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--npp-transition);
    box-shadow: var(--npp-shadow-md);
    min-width: 160px;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.5;
}

.npp-container .npp-load-more-btn:hover:not(:disabled) {
    background: var(--npp-primary-hover);
    box-shadow: var(--npp-shadow-lg);
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none;
}

.npp-container .npp-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.npp-container .npp-load-more-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Elementor button style override */
.elementor-widget-shortcode .npp-load-more-btn,
.elementor-element .npp-load-more-btn {
    text-transform: none;
    letter-spacing: normal;
}

/* Spinner */
.npp-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: npp-spin 0.8s linear infinite;
}

@keyframes npp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Profile Section */
.npp-container .npp-profile-section {
    width: 100%;
    min-width: 0;
    position: sticky;
    top: 20px;
}

.elementor-widget-shortcode .npp-profile-section,
.elementor-element .npp-profile-section {
    flex: 0 0 auto;
}

.npp-container .npp-profile-content {
    background: var(--npp-bg-color);
    border: 2px solid var(--npp-border-color);
    border-radius: var(--npp-border-radius);
    padding: 24px;
    box-shadow: var(--npp-shadow-md);
    min-height: 300px;
    box-sizing: border-box;
}

/* Ensure profile content inherits properly in Elementor */
.elementor-widget-shortcode .npp-profile-content,
.elementor-element .npp-profile-content {
    font-family: inherit;
    color: inherit;
}

/* Fade-in animation for new items */
@keyframes npp-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.npp-service-card.npp-new-item {
    animation: npp-fade-in 0.5s ease forwards;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .npp-container .npp-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px;
    }
    
    .npp-container .npp-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }
    
    .npp-container .npp-section-title {
        font-size: 24px;
    }
    
    .npp-container .npp-profile-section {
        position: relative;
        top: 0;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .npp-container {
        padding: 16px;
    }
    
    /* Elementor mobile padding override */
    .elementor-column .npp-container {
        padding: 0;
    }
    
    .npp-container .npp-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }
    
    .elementor-widget-shortcode .npp-grid,
    .elementor-element .npp-grid {
        grid-template-columns: 1fr !important;
    }
    
    .npp-consultation-button {
        font-size: 16px;
        padding: 16px 24px;
    }
    
    .npp-consultation-icon {
        width: 20px;
        height: 20px;
    }
    
    .npp-consultation-arrow {
        width: 18px;
        height: 18px;
    }
    
    .npp-container .npp-services-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .npp-services-grid .npp-service-card {
        padding: 20px 16px;
        min-height: 120px;
    }
    
    .npp-service-card .npp-service-title {
        font-size: 16px;
    }
    
    .npp-service-card .npp-service-description {
        font-size: 13px;
    }
    
    .npp-service-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .npp-service-tag {
        font-size: 10px;
        padding: 3px 10px;
        top: -8px;
        right: 10px;
    }
    
    .npp-container .npp-section-title {
        font-size: 22px;
    }
    
    .npp-container .npp-load-more-btn {
        width: 100%;
        padding: 12px 24px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .npp-container .npp-services-grid {
        grid-template-columns: 1fr;
    }
    
    .npp-services-grid .npp-service-card {
        min-height: auto;
    }
    
    .npp-service-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .npp-service-tag {
        font-size: 9px;
        padding: 2px 8px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --npp-bg-color: #1e293b;
        --npp-border-color: #334155;
        --npp-text-color: #f1f5f9;
        --npp-text-secondary: #94a3b8;
    }
}

/* Focus styles for accessibility */
.npp-consultation-button:focus,
.npp-services-grid .npp-service-card:focus,
.npp-container .npp-load-more-btn:focus {
    outline: 3px solid var(--npp-primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .npp-container .npp-load-more-container {
        display: none;
    }
    
    .npp-services-grid .npp-service-card {
        break-inside: avoid;
    }
}

/* Elementor Editor Mode Compatibility */
.elementor-editor-active .npp-container {
    pointer-events: auto;
}

/* Ensure proper z-index stacking in Elementor */
.elementor-widget-shortcode .npp-container {
    z-index: auto;
    position: relative;
}

/* Elementor background color compatibility */
.elementor-element:not([data-settings*="background"]) .npp-container {
    background: transparent;
}

/* Fix for Elementor stretched section */
.elementor-section-stretched .npp-container {
    max-width: 100%;
}

