/**
 * Services Page Styles
 * HabibPrint.com
 */

/* Services Header */
.services-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.services-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 60s linear infinite;
}

/* Animated Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-shape.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    top: -150px;
    right: -100px;
    animation-duration: 8s;
}

.floating-shape.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    bottom: -100px;
    left: -100px;
    animation-duration: 10s;
    animation-delay: 1s;
}

.floating-shape.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(225deg, var(--primary), var(--secondary));
    top: 50%;
    right: 10%;
    animation-duration: 7s;
    animation-delay: 2s;
}

.floating-shape.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(315deg, var(--secondary), var(--accent));
    bottom: 20%;
    left: 15%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.floating-shape.shape-5 {
    width: 180px;
    height: 180px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    top: 30%;
    left: 40%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.services-stats .stat-item {
    padding: 1rem;
}

.services-stats .stat-number {
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.services-stats .stat-number-animated {
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.services-stats .stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.services-hero-image {
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

/* Service Cards */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateY(0);
    will-change: transform, box-shadow;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 2rem 4rem rgba(0,0,0,0.25) !important;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    border-radius: var(--border-radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
    animation: gradient-border 3s ease infinite;
}

@keyframes gradient-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.service-image-wrapper {
    position: relative;
    height: 100%;
    min-height: 250px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Service Features */
.service-features ul li {
    font-size: 0.9rem;
    color: var(--gray-700);
}

.service-features .fa-check {
    font-size: 0.8rem;
}

/* Price Info */
.price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price {
    font-weight: 700;
}

/* Process Section */
.process-section {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.process-step {
    padding: 2rem 1rem;
}

.step-number {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    filter: blur(10px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.process-step:hover .step-number {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
}

.process-step:hover .step-number::before {
    opacity: 0.5;
}

/* Service Modal - Let Bootstrap handle modal positioning completely */
/* Only style content within modals, not the modal structure itself */
.services-page .modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.services-page .modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
}

.services-page .modal-header .btn-close {
    filter: invert(1);
}

.services-page .modal-body {
    padding: 2rem;
}

.services-page .modal-body .price-info {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.services-page .modal-body ul li {
    padding: 0.25rem 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--dark) 100%);
    position: relative;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* Service Images Placeholders */
.services-grid .service-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        var(--primary) 0%, 
        var(--secondary) 50%, 
        var(--accent) 100%);
    opacity: 0.1;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .services-header .services-stats {
        margin-top: 2rem;
    }
    
    .services-stats .stat-item {
        margin-bottom: 1rem;
    }
    
    .service-card .row {
        flex-direction: column;
    }
    
    .service-image-wrapper {
        min-height: 200px;
    }
    
    .service-card .card-body {
        padding: 1.5rem;
    }
    
    .process-step {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .cta-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .services-header {
        text-align: center;
    }
    
    .services-header .display-4 {
        font-size: 2rem;
    }
    
    .services-hero-image {
        margin-top: 2rem;
    }
    
    .services-hero-image .fa-8x {
        font-size: 4rem !important;
    }
}

/* Animation Keyframes */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% { 
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

/* Accessibility Improvements */
.service-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.step-number:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Print Styles */
@media print {
    .services-header,
    .service-overlay,
    .cta-section {
        display: none !important;
    }
    
    /* Hide modal backdrop and dialog when printing */
    .modal-backdrop,
    .modal.show {
        display: none !important;
    }
    
    .service-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem;
    }
    
    .service-image-wrapper {
        height: 200px !important;
    }
}

/* Loading States */
.service-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.service-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.service-card .btn:hover {
    transform: translateY(-1px);
}

/* Focus States */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

/* Special Effects */
.service-features .fa-check {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}





