/* ===================================
   SERVICES PAGE STYLES
   =================================== */

/* Hero Section */
.services-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.services-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-top: 1.5rem;
}

/* Services Section */
.services-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../Assets/Services/services.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .services-section::before {
    opacity: 0.1;
}

.services-section .container {
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* Service Card */
.service-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .service-card {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .service-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Service Image */
.service-image {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
    will-change: transform;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: translateY(10px);
    will-change: transform;
}

.service-card:hover .view-details-btn {
    transform: translateY(0);
}

.view-details-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.view-details-btn svg {
    transition: transform 0.3s ease;
}

.view-details-btn:hover svg {
    transform: translateX(4px);
}

/* Service Content */
.service-content {
    padding: 2rem;
}

.service-icon {
    display: none;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.service-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Mobile Learn More Button */
.mobile-learn-more {
    display: none;
}

/* Modal Styles */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.service-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.2s ease;
    will-change: opacity;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.25s ease-out;
    overflow: hidden;
    z-index: 1;
    will-change: transform, opacity;
}

[data-theme="dark"] .modal-container {
    background: #1E293B;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-close svg {
    color: #1e293b;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.95);
    transform: rotate(90deg);
}

.modal-close:hover svg {
    color: white;
}

[data-theme="dark"] .modal-close {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-close svg {
    color: #f1f5f9;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Modal Content Sections */
.modal-header {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
}

.modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.modal-title-wrapper {
    color: white;
}

.modal-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-icon svg {
    color: white;
    width: 36px;
    height: 36px;
}

.modal-service-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-service-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    font-weight: 500;
}

.modal-body {
    padding: 3rem;
}

.modal-section {
    margin-bottom: 3rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    border-radius: 2px;
}

.modal-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    will-change: transform;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .feature-item {
    background: rgba(15, 23, 42, 0.6);
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(249, 115, 22, 0.15) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.feature-icon svg {
    color: #F59E0B;
    width: 22px;
    height: 22px;
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.feature-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.feature-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.benefits-list {
    display: grid;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid #F59E0B;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.benefit-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .benefit-item {
    background: rgba(15, 23, 42, 0.6);
}

.benefit-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    color: white;
    width: 14px;
    height: 14px;
}

.benefit-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.modal-cta {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.modal-cta-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px;
}

.modal-cta-btn.primary {
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.modal-cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.modal-cta-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.modal-cta-btn.secondary:hover {
    background: var(--bg-tertiary);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #c3ced8 0%, #3a78c9 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(251, 169, 76, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background: white;
    color: #F59E0B;
    border: 2px solid white;
    font-weight: 600;
}

.cta-section .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: 600;
}

.cta-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .services-hero {
        padding: 6rem 0 3rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 0.8rem;
    }
    
    .services-section {
        padding: 4rem 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-image {
        height: 220px;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .cta-section {
        padding: 4rem 0;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    .service-icon {
        width: 56px;
        height: 56px;
    }
    
    .service-title {
        font-size: 1.25rem;
    }
    
    .service-excerpt {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .mobile-learn-more {
        display: block;
        width: 100%;
        padding: 0.75rem 1.5rem;
        background: rgba(245, 158, 11, 0.1);
        border: 1px solid rgba(245, 158, 11, 0.3);
        border-radius: 8px;
        color: #F59E0B;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 1rem;
    }
    
    .mobile-learn-more:hover {
        background: rgba(245, 158, 11, 0.2);
        border-color: #F59E0B;
        transform: translateY(-2px);
    }
    
    [data-theme="dark"] .mobile-learn-more {
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.4);
        color: #FCD34D;
    }
    
    [data-theme="dark"] .mobile-learn-more:hover {
        background: rgba(245, 158, 11, 0.25);
        border-color: #F59E0B;
    }
    
    /* Modal Responsive */
    .service-modal {
        padding: 1rem;
    }
    
    .modal-container {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .modal-header {
        height: 250px;
    }
    
    .modal-header-overlay {
        padding: 2rem 1.5rem;
    }
    
    .modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .modal-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-service-title {
        font-size: 1.75rem;
    }
    
    .modal-service-subtitle {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 2rem 1.5rem;
    }
    
    .modal-section {
        margin-bottom: 2rem;
    }
    
    .modal-section-title {
        font-size: 1.5rem;
    }
    
    .modal-description {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .feature-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .feature-content h4 {
        font-size: 0.95rem;
    }
    
    .feature-content p {
        font-size: 0.825rem;
    }
    
    .benefit-item {
        padding: 0.75rem 0.875rem;
        gap: 0.625rem;
    }
    
    .benefit-icon {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
    
    .benefit-icon svg {
        width: 12px;
        height: 12px;
    }
    
    .benefit-text {
        font-size: 0.85rem;
    }
    
    .modal-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-cta-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .services-hero {
        padding: 5rem 0 2.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .service-image {
        height: 200px;
    }
    
    .modal-header {
        height: 200px;
    }
    
    .modal-service-title {
        font-size: 1.25rem;
    }
    
    .modal-service-subtitle {
        font-size: 0.875rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
}