/* Enhanced Service Pages CSS - Based on index.html Design */

/* Import existing variables from main CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-bg: #34495e;
    --light-bg: #ecf0f1;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
}

/* ===================== MAIN PAGE LAYOUT ===================== */

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.services-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.services-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.services-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================== BOX CARDS FOR SECTIONS ===================== */

.box-card {
    background: linear-gradient(135deg, #fff, var(--light-bg));
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

.box-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.05), transparent);
    transition: left 0.8s;
}

.box-card:hover::before {
    left: 100%;
}

.box-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.box-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.box-card-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.box-card-content h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.box-card-content p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ===================== ENHANCED GRID LAYOUT ===================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Enhanced Service Cards */
.service-card {
    background: linear-gradient(135deg, #fff, var(--light-bg));
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-card.featured {
    border-color: var(--warning-color);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

.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, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-category {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: fit-content;
}

.service-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.service-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.service-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--success-color);
}

.service-duration {
    font-size: 12px;
    color: var(--text-light);
    background: var(--light-bg);
    padding: 4px 8px;
    border-radius: 8px;
}

.service-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    align-items: stretch;
}

.btn-service {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.2;
}

.btn-cart {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.btn-cart:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-view {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #229954, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* ===================== MODAL STYLES ===================== */

.design-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 15px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.design-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.design-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.design-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.design-item-title {
    padding: 10px;
    background: var(--light-bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

/* ===================== ENHANCED PAGINATION ===================== */

.pagination-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pagination-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pagination-info span {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.page-indicator {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.pagination-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-btn.prev {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.pagination-btn.next {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn.prev:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
}

.pagination-btn.next:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, var(--success-color));
}

/* ===================== FILTER STYLES ===================== */

.filter-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: var(--secondary-color);
}

.filter-info {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-light);
}

/* ===================== RESPONSIVE DESIGN ===================== */

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .box-card-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        padding: 20px 15px;
    }
    
    .services-hero {
        padding: 40px 20px;
    }
    
    .services-hero h1 {
        font-size: 2rem;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-info {
        align-items: center;
        text-align: center;
    }
    
    .designs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .box-card {
        margin-bottom: 20px;
    }
    
    .box-card-header {
        padding: 20px;
    }
    
    .service-actions {
        flex-direction: column;
    }
    
    .designs-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* ===================== LOADING STATES ===================== */

.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-style: italic;
    grid-column: 1 / -1;
    font-size: 16px;
}

.loading-placeholder::before {
    content: '⏳ ';
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* ===================== HEADER & NAVIGATION STYLES ===================== */

/* Live Activity Popup */
.live-activity-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    width: 320px;
    max-width: 90vw;
    border: 2px solid var(--secondary-color);
    animation: slideInRight 0.3s ease;
}

.activity-header {
    background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
    color: white;
    padding: 12px 16px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.activity-content {
    padding: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon-item {
    font-size: 18px;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.activity-time {
    color: var(--text-light);
    font-size: 11px;
    margin-top: 4px;
}

/* Market Indicators Bar */
.market-indicators {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 18px;
    z-index: 1002;
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-content {
    background: white;
    width: 80%;
    max-width: 400px;
    height: 100%;
    position: relative;
    animation: slideInLeft 0.3s ease;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-nav-items {
    padding: 80px 20px 20px;
}

.mobile-nav-link {
    display: block;
    padding: 15px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--secondary-color);
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    padding: 30px 20px;
    color: white;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 300px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-button {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.action-button {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Market Tickers */
.market-tickers {
    background: var(--light-bg);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.tickers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ticker-icon {
    font-size: 18px;
}

.ticker-label {
    color: var(--text-light);
    font-size: 12px;
}

.ticker-value {
    font-weight: 700;
    color: var(--text-dark);
    min-width: 60px;
}

.ticker-change {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

.ticker-change.up {
    background: #d4edda;
    color: #155724;
}

.ticker-change.down {
    background: #f8d7da;
    color: #721c24;
}

/* Enhanced Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 0;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

/* ===================== ANIMATIONS ===================== */

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.service-card.loading {
    animation: pulse 1.5s infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ===================== RESPONSIVE FOR HEADER/FOOTER ===================== */

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-form {
        width: 100%;
        min-width: auto;
    }
    
    .user-actions {
        width: 100%;
        justify-content: center;
    }
    
    .tickers-container {
        gap: 15px;
    }
    
    .ticker-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .ticker-icon {
        font-size: 16px;
    }
    
    .ticker-value {
        min-width: 50px;
        font-size: 13px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .mobile-menu-content {
        width: 90%;
    }
    
    .live-activity-popup {
        width: 280px;
        right: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .search-input,
    .search-button {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .tickers-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}