/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6c63ff;
    --secondary-color: #ff6584;
    --accent-color: #36d1dc;
    --dark-color: #2a2a3c;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --border-radius: 15px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

body.mobile-optimized {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
}

.container {
    width: 100%;
    max-width: 480px; /* Mobile optimized width */
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.nav-item.active .nav-link {
    background: var(--gradient);
    color: white;
}

/* 3D Animated Cards */
.card-3d {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 15px 0;
    box-shadow: var(--box-shadow);
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-3d::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: var(--transition);
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-3d {
    transform-style: preserve-3d;
    perspective: 500px;
}

.btn-3d:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-3d:active {
    transform: translateY(0) rotateX(0);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 60px;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Announcement Bar */
.announcement-bar {
    background: linear-gradient(45deg, #ff6584, #6c63ff);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    margin-top: 60px;
}

.announcement-content {
    display: inline-block;
    white-space: nowrap;
    animation: scrollText 30s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.announcement-item {
    margin-right: 50px;
    font-weight: 500;
}

/* Grid Layouts */
.posts-grid, .services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

.post-card, .service-card {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.aspect-16-9 {
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.aspect-9-16 {
    padding-bottom: 177.78%; /* 9:16 Aspect Ratio */
}

.aspect-1-1 {
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content, .service-content {
    padding: 20px;
}

.post-title, .service-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.service-details {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: var(--border-radius);
}

.service-price, .service-duration {
    font-weight: 600;
    color: var(--primary-color);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    z-index: 1000;
    cursor: move;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #25D366, #128C7E);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

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

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Footer */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    list-style: none;
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: white;
        padding: 20px;
        transition: var(--transition);
        box-shadow: var(--box-shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .posts-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(108, 99, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Urdu Language Support */
.urdu-mode {
    direction: rtl;
    text-align: right;
}

.urdu-mode .nav-list {
    flex-direction: row-reverse;
}

.urdu-mode .form-control {
    text-align: right;
}

.urdu-mode .post-content,
.urdu-mode .service-description,
.urdu-mode .page-title {
    font-family: 'Jameel Noori Kasheeda', 'Noto Nastaliq Urdu', serif;
    font-size: 1.2em;
    line-height: 1.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    position: relative;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 9999;
    border-left: 5px solid #6c63ff;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    margin-left: auto;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print Styles */
@media print {
    .no-print, .whatsapp-float, .announcement-bar {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #4a00e0;
        --secondary-color: #ff3860;
        --dark-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* SEO Improvements */
.structured-data {
    display: none;
}

/* AdSense Placeholders */
.adsense-placeholder {
    background: #f8f9fa;
    border: 2px dashed #6c63ff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #6c63ff;
    margin: 20px 0;
}

/* AMP Compatibility */
amp-img {
    max-width: 100%;
    height: auto;
}

/* PWA Styles */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

.pwa-install-banner button {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* Chat Widget Placeholder */
.chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: white;
    border-radius: 50px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 999;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-color);
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 1002;
}

/* PWA Styles */
.pwa-install-banner {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.update-notification {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* App-like scroll for iOS PWA */
@media (display-mode: standalone) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide browser UI elements */
    .main-header {
        padding-top: env(safe-area-inset-top);
    }
    
    .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Splash screen style for PWA */
@media (display-mode: standalone) and (orientation: portrait) {
    .splash-screen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }
    
    .splash-screen.hide {
        display: none;
    }
}

/* ==========================================================================
   SERVICE IMAGE THUMBNAIL STYLES
   ========================================================================== */

/* Service image as small logo thumbnail */
.service-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.service-image img {
    max-width: 120px;      /* thumbnail width */
    max-height: 120px;     /* just in case the image is tall */
    width: auto;
    height: auto;
    object-fit: contain;   /* no crop – keep full logo */
    border-radius: 16px;   /* softer rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* For service detail pages if they use different class */
.service-detail-image,
.service-hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.service-detail-image img,
.service-hero-image img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .service-image img,
    .service-detail-image img,
    .service-hero-image img {
        max-width: 100px;
        max-height: 100px;
    }
}

/* ==========================================================================
   VIDEO SUPPORT STYLES
   ========================================================================== */

/* Video Styling */
.post-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.post-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ensure aspect ratio classes work for both images and videos */
.post-image,
.post-video {
    position: relative;
    width: 100%;
}

.aspect-16-9 {
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
}

.aspect-9-16 {
    padding-bottom: 177.78%; /* 9:16 Aspect Ratio */
    position: relative;
}

.aspect-1-1 {
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    position: relative;
}

.post-image img,
.post-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Admin video preview */
.admin-video-preview {
    max-width: 200px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Video indicator */
.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
}