/* Custom Styles for Dubai Luxury Properties - Mobile First Design */

:root {
    --primary-color: #00796b;
    --secondary-color: #004d40;
    --accent-color: #ffd700;
    --warning-color: #ffc107;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --mobile-breakpoint: 768px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    body {
        font-size: 16px;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .display-4 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .min-vh-100 {
        min-height: 100vh !important;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 121, 107, 0.95), rgba(0, 77, 64, 0.95)),
                url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

@media (max-width: 767px) {
    .hero-section {
        background-attachment: scroll;
        padding: 100px 0 60px;
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.phone-frame {
    width: 300px;
    height: 600px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.3s ease;
}

.phone-frame:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.instagram-post {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #efefef;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.post-info {
    flex: 1;
}

.username {
    font-weight: 600;
    font-size: 14px;
}

.location {
    font-size: 12px;
    color: #666;
}

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

.post-engagement {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.engagement-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    margin-bottom: 12px;
}

.commission-badge {
    text-align: center;
}

@media (max-width: 767px) {
    .phone-mockup {
        min-height: 400px;
        margin-top: 2rem;
    }
    
    .phone-frame {
        width: 250px;
        height: 500px;
    }
    
    .phone-screen {
        border-radius: 25px;
    }
}

/* Stat Highlights */
.stat-highlight {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-highlight:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 26, 0.98) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--accent-color);
}

.nav-link {
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

@media (max-width: 767px) {
    .navbar-nav {
        background: rgba(26, 26, 26, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }
    
    .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .dropdown-menu {
        background: rgba(26, 26, 26, 0.98) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-item {
        color: white !important;
    }
    
    .dropdown-item:hover {
        background: var(--primary-color) !important;
        color: white !important;
    }
}

/* Timeline */
.story-timeline {
    position: relative;
    padding: 2rem 0;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 0 0 150px;
    text-align: center;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    font-weight: bold;
    margin: 0 1rem;
    align-self: center;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -30px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -30px;
    border-right-color: white;
}

@media (max-width: 767px) {
    .story-timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        padding-left: 60px;
    }
    
    .timeline-date {
        flex: none;
        width: auto;
        margin-bottom: 1rem;
        margin-left: 0;
    }
    
    .timeline-content::before {
        left: -30px !important;
        right: auto !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 121, 107, 0.3);
}

.btn-warning {
    background: var(--warning-color);
    border: none;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.3);
}

.btn-outline-light:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 20px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Feature Items */
.feature-item {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(0, 121, 107, 0.05);
    border-radius: 0 15px 15px 0;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.feature-item:hover {
    background: rgba(0, 121, 107, 0.1);
    transform: translateX(10px);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 20px 40px rgba(0, 121, 107, 0.3);
    border-radius: 20px;
}

.stat-item {
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Contact Methods */
.contact-method {
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-method:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 16px; /* Prevents zoom on iOS */
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

.input-group-text {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px 0 0 15px;
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color) !important;
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

/* Mobile Touch Optimizations */
@media (max-width: 767px) {
    .btn {
        min-height: 44px; /* iOS touch target size */
        margin-bottom: 0.5rem;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
    
    .nav-link {
        padding: 12px 16px !important;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .timeline-item {
        margin-bottom: 2rem;
    }
}

/* Sticky Join Button */
.sticky-join-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
    .sticky-join-btn {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
    
    .sticky-join-btn .btn {
        width: 100%;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] .timeline-item:nth-child(odd) {
    flex-direction: row;
}

[dir="rtl"] .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

[dir="rtl"] .timeline-content::before {
    left: auto !important;
    right: -30px !important;
    border-left-color: white !important;
    border-right-color: transparent !important;
}

[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content::before {
    left: -30px !important;
    right: auto !important;
    border-right-color: white !important;
    border-left-color: transparent !important;
}

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

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

/* Success Animation */
.success-message {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 1rem;
    border-radius: 15px;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Performance optimizations */
.hero-section {
    will-change: transform;
}

.phone-frame {
    will-change: transform;
}

.card {
    will-change: transform;
}

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