/* ================================
   SERVICE PAGES RESPONSIVE STYLES
   Shared responsive CSS for all service detail pages:
   - digital-marketing.php
   - web-development.php  
   - graphics-design.php
   Version: 4.0 - Enhanced Design & Button Fixes
   ================================ */

/* === CSS VARIABLES FOR SERVICE PAGES === */
:root {
    --sp-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --sp-gradient-secondary: linear-gradient(135deg, #422e90 0%, #6b4fbb 100%);
    --sp-card-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
    --sp-card-shadow-hover: 0 25px 60px rgba(102, 126, 234, 0.25);
    --sp-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === ANIMATIONS === */
@keyframes sp-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sp-fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes sp-gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sp-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes sp-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes sp-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

/* === BASE STYLES === */
.page-header {
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: sp-gradientShift 8s ease infinite;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 30%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(255,255,255,0.1), transparent);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header .section-title {
    animation: sp-fadeInUp 0.8s ease forwards;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.page-header .section-description {
    animation: sp-fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* === SERVICES ACTIONS BUTTONS - FIX FOR VISIBILITY === */
.services-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.services-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.services-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.services-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4299 100%);
}

.services-actions .btn-primary i {
    transition: transform 0.3s ease;
}

.services-actions .btn-primary:hover i {
    transform: translateX(3px);
}

.services-actions .btn-outline {
    background: white !important;
    color: #422e90 !important;
    border: 2px solid #422e90 !important;
    box-shadow: 0 2px 10px rgba(66, 46, 144, 0.1);
}

.services-actions .btn-outline:hover {
    background: #422e90 !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(66, 46, 144, 0.3);
}

.services-actions .btn-outline i {
    transition: transform 0.3s ease;
}

.services-actions .btn-outline:hover i {
    transform: scale(1.1);
}

/* === ENHANCED SERVICE CARDS === */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

.service-link {
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link:hover {
    color: #5a4bb8 !important;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* === ENHANCED STATS === */
.stat-item {
    position: relative;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.12);
}

/* === ENHANCED STRATEGY/PROCESS CARDS === */
.strategy-item,
.process-item {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.strategy-item:hover,
.process-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.15);
}

.strategy-icon,
.process-icon {
    transition: all 0.3s ease;
}

.strategy-item:hover .strategy-icon,
.process-item:hover .process-icon {
    transform: scale(1.05);
}

/* === ENHANCED CASE STUDY CARDS === */
.case-study-card {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.15);
}

.result-item span:last-child {
    transition: all 0.3s ease;
}

/* === ENHANCED CTA SECTION === */
.cta-section {
    position: relative;
}

.cta-actions .btn {
    transition: all 0.3s ease;
}

.cta-actions .btn:hover {
    transform: translateY(-3px);
}

.cta-actions .btn i {
    transition: transform 0.3s ease;
}

.cta-actions .btn:hover i {
    transform: scale(1.1);
}

/* === ENHANCED CONTACT FORM === */
.contact-form {
    position: relative;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #422e90 !important;
    box-shadow: 0 0 0 3px rgba(66, 46, 144, 0.1);
    outline: none;
}

.contact-form .btn {
    transition: all 0.3s ease;
}

.contact-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

/* === SERVICE FEATURES LIST === */
.service-features li {
    transition: all 0.3s ease;
    padding: 5px 0;
}

.service-features li:hover {
    transform: translateX(3px);
}

.service-features li i {
    transition: all 0.3s ease;
}

/* === TABLET BREAKPOINT (max-width: 1024px) === */
@media (max-width: 1024px) {
    .page-header {
        min-height: 60vh !important;
        padding: 120px 0 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .page-header .section-title {
        font-size: 44px !important;
        line-height: 1.2 !important;
    }
    
    .page-header .section-description {
        font-size: 18px !important;
        line-height: 1.7 !important;
    }
    
    .services-hero-wrapper {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }
    
    .services-hero-content h2 {
        font-size: 40px !important;
    }
    
    .services-stats {
        gap: 20px !important;
    }
    
    .services-grid,
    .strategy-grid,
    .case-studies-grid,
    .technologies-grid,
    .portfolio-grid {
        gap: 25px !important;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }
}

/* === MOBILE BREAKPOINT (max-width: 768px) === */
@media (max-width: 768px) {
    /* Page Header */
    .page-header {
        min-height: 70vh !important;
        padding: 130px 0 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .page-header .section-title {
        font-size: 38px !important;
        line-height: 1.25 !important;
        margin-bottom: 20px !important;
    }
    
    .page-header .section-description {
        font-size: 17px !important;
        line-height: 1.7 !important;
        padding: 0 15px !important;
        max-width: 600px !important;
    }
    
    /* Services Hero */
    .services-hero {
        padding: 60px 0 !important;
    }
    
    .services-hero-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    .services-hero-content {
        text-align: center !important;
        order: 1 !important;
    }
    
    .services-hero-visual {
        display: none !important;
    }
    
    .services-hero-content h2 {
        font-size: 30px !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .services-hero-content p {
        font-size: 15px !important;
        line-height: 1.7 !important;
        margin-bottom: 25px !important;
    }
    
    .section-subtitle {
        font-size: 12px !important;
    }
    
    /* Stats */
    .services-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
        margin-bottom: 30px !important;
    }
    
    .stat-item {
        padding: 12px 8px !important;
    }
    
    .stat-number {
        font-size: 26px !important;
    }
    
    .stat-label {
        font-size: 11px !important;
    }
    
    /* Actions */
    .services-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .services-actions .btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 14px 24px !important;
        font-size: 15px !important;
        justify-content: center !important;
    }
    
    /* Services Grid Section */
    .services-grid-section {
        padding: 60px 0 !important;
    }
    
    .services-grid,
    .strategy-grid,
    .case-studies-grid,
    .technologies-grid,
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Service Cards */
    .service-card {
        padding: 30px 20px !important;
        border-radius: 15px !important;
    }
    
    .service-icon {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 20px !important;
    }
    
    .service-icon i {
        font-size: 32px !important;
    }
    
    .service-title {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }
    
    .service-description {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
    
    .service-features li {
        font-size: 14px !important;
        padding: 6px 0 !important;
    }
    
    /* Strategy/Process Items */
    .strategy-item,
    .process-item {
        padding: 25px 20px !important;
        border-radius: 15px !important;
    }
    
    .strategy-item h4,
    .process-title {
        font-size: 18px !important;
    }
    
    .strategy-item p,
    .process-description {
        font-size: 14px !important;
    }
    
    /* Case Studies */
    .case-study-card {
        border-radius: 15px !important;
        overflow: hidden !important;
    }
    
    .case-study-header h3 {
        font-size: 20px !important;
    }
    
    .case-study-results {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .result-item {
        padding: 12px !important;
    }
    
    /* Technologies */
    .tech-category {
        padding: 25px 20px !important;
    }
    
    .tech-category h3 {
        font-size: 18px !important;
    }
    
    .tech-items {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .tech-item {
        padding: 12px 10px !important;
    }
    
    .tech-item i {
        font-size: 24px !important;
    }
    
    .tech-item span {
        font-size: 12px !important;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 60px 0 !important;
    }
    
    .cta-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    
    .cta-description {
        font-size: 15px !important;
    }
    
    .cta-actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .cta-actions .btn {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
    }
    
    /* Contact Section */
    .contact-section {
        padding: 60px 0 !important;
    }
    
    .contact-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    .contact-info {
        order: 2 !important;
    }
    
    .contact-form {
        order: 1 !important;
    }
    
    .contact-info-item {
        padding: 15px !important;
        gap: 15px !important;
    }
    
    .contact-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .contact-icon i {
        font-size: 20px !important;
    }
    
    .contact-info-item h4 {
        font-size: 16px !important;
    }
    
    .contact-info-item p {
        font-size: 14px !important;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 30px 20px !important;
        border-radius: 15px !important;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 14px 18px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        border-radius: 10px !important;
    }
    
    .contact-form .form-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .contact-form button {
        width: 100% !important;
        padding: 15px !important;
        font-size: 16px !important;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 40px !important;
    }
    
    .section-header .section-title {
        font-size: 28px !important;
    }
    
    .section-header .section-description {
        font-size: 15px !important;
    }
}

/* === SMALL MOBILE BREAKPOINT (max-width: 480px) === */
@media (max-width: 480px) {
    /* Page Header */
    .page-header {
        min-height: 85vh !important;
        padding: 140px 0 80px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .page-header .section-title {
        font-size: 34px !important;
        line-height: 1.3 !important;
        margin-bottom: 18px !important;
    }
    
    .page-header .section-description {
        font-size: 16px !important;
        line-height: 1.65 !important;
        padding: 0 10px !important;
    }
    
    /* Hero */
    .services-hero {
        padding: 60px 0 !important;
    }
    
    .services-hero-content h2 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    
    .services-hero-content p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Stats */
    .services-stats {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .stat-number {
        font-size: 30px !important;
    }
    
    .stat-label {
        font-size: 13px !important;
    }
    
    /* Service Cards */
    .service-card {
        padding: 25px 18px !important;
    }
    
    .service-title {
        font-size: 18px !important;
    }
    
    .service-description {
        font-size: 13px !important;
    }
    
    /* Tech Items */
    .tech-items {
        grid-template-columns: 1fr !important;
    }
    
    /* CTA */
    .cta-title {
        font-size: 24px !important;
    }
    
    .cta-description {
        font-size: 14px !important;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 25px 15px !important;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 12px 15px !important;
    }
    
    /* Section Headers */
    .section-header .section-title {
        font-size: 24px !important;
    }
}

/* === EXTRA SMALL PHONES (max-width: 375px) === */
@media (max-width: 375px) {
    .page-header {
        min-height: 80vh !important;
        padding: 130px 0 70px !important;
    }
    
    .page-header .section-title {
        font-size: 30px !important;
        line-height: 1.3 !important;
    }
    
    .page-header .section-description {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    .services-hero-content h2 {
        font-size: 26px !important;
    }
    
    .cta-title {
        font-size: 24px !important;
    }
    
    .section-header .section-title {
        font-size: 24px !important;
    }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .service-btn,
    .nav-link {
        min-height: 48px !important;
    }
    
    .service-card:hover {
        transform: translateY(-5px) !important;
    }
    
    .strategy-item:hover,
    .process-item:hover,
    .case-study-card:hover {
        transform: translateY(-5px) !important;
    }
}

/* === LANDSCAPE ORIENTATION === */
@media (max-height: 500px) and (orientation: landscape) {
    .page-header {
        min-height: 100vh !important;
        padding: 90px 0 50px !important;
    }
    
    .page-header .section-title {
        font-size: 28px !important;
    }
    
    .page-header .section-description {
        font-size: 14px !important;
    }
    
    .services-hero {
        padding: 50px 0 !important;
    }
    
    .services-hero-wrapper {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    .services-hero-content {
        text-align: left !important;
    }
    
    .services-actions {
        flex-direction: row !important;
        justify-content: flex-start !important;
    }
}

/* === ACCESSIBILITY - REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === ADDITIONAL ENHANCEMENTS === */

/* Portfolio Section Enhancements */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

/* Tech Items Enhanced */
.tech-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.tech-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.15);
}

.tech-item i {
    transition: all 0.3s ease;
}

.tech-item:hover i {
    transform: scale(1.1);
    color: #422e90;
}

/* Tech Category Card */
.tech-category {
    position: relative;
    background: white;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.tech-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

/* Section Subtitle Enhancement */
.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 30px;
    margin-bottom: 15px;
}

/* Text Gradient Enhancement */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button Enhancements for Service Pages */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Contact Info Items Enhancement */
.contact-info-item {
    position: relative;
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.contact-info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.15);
}

.contact-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transition: all 0.3s ease;
}

.contact-info-item:hover .contact-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.contact-info-item:hover .contact-icon i {
    color: white !important;
}

/* Result Item Enhancement */
.result-item {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(102, 126, 234, 0.08);
}

/* Process Steps Number */
.process-number {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Print Styles */
@media print {
    .page-header,
    .cta-section {
        background: #667eea !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .service-card,
    .strategy-item,
    .case-study-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}