/* 
 * Mar Bay - ملف الأنماط الرئيسي
 * تصميم RTL متجاوب للهواتف والتابلت
 */

/* ================================================
   إعدادات أساسية
================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1FB8C2;      /* Turquoise Blue */
    --secondary-color: #084B83;    /* Deep Ocean Blue */
    --accent-color: #D9A441;       /* Golden Sand */
    --bg-color: #EDE6DA;          /* Soft Sand Beige */
    --light-color: #A8DADC;       /* Sky Blue */
    --text-color: #333333;        /* Charcoal Gray */
    --white-color: #FFFFFF;       /* Pure White */
    
    --font-primary: 'Cairo', 'Tajawal', Arial, sans-serif;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-primary);
    background-color: var(--white-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================================
   Typography
================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.3rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ================================================
   Containers & Layout
================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    display: block;
    margin: 20px auto;
    border-radius: 2px;
}

/* ================================================
   Header & Navigation
================================================ */
.header {
    background: var(--white-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--secondary-color);
}

.contact-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

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

.btn-phone:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ================================================
   Hero Section
================================================ */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(8, 75, 131, 0.7), rgba(31, 184, 194, 0.7)), 
                url('../images/hero-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
                rgba(31, 184, 194, 0.1) 0%, 
                rgba(217, 164, 65, 0.1) 50%, 
                rgba(8, 75, 131, 0.1) 100%);
    animation: gradientMove 8s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-20px) translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero .subtitle {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.btn-hero {
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    min-width: 200px;
}

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

/* ================================================
   About Sections
================================================ */
.about-section {
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ================================================
   Units Section
================================================ */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.unit-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.unit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.unit-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.unit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.unit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(8, 75, 131, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
}

.unit-info h3 {
    color: white;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.unit-info p {
    color: var(--accent-color);
    font-size: 1rem;
    margin: 0;
}

/* ================================================
   Services Section
================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-item {
    background: white;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-item:hover .service-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

.service-item h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

/* ================================================
   Lifestyle Section
================================================ */
.lifestyle {
    background: linear-gradient(135deg, var(--light-color), var(--bg-color));
    padding: 100px 0;
}

.lifestyle-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.lifestyle h2 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.lifestyle-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.lifestyle-feature {
    background: white;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.lifestyle-feature:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: white;
}

.lifestyle-feature h4 {
    color: var(--secondary-color);
    transition: var(--transition);
}

.lifestyle-feature:hover h4 {
    color: white;
}

/* ================================================
   Map Section
================================================ */
.map-section {
    background: var(--secondary-color);
    color: white;
    text-align: center;
}

.map-section h2 {
    color: white;
    margin-bottom: 30px;
}

.map-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 40px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
}

/* ================================================
   Footer
================================================ */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0 30px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* ================================================
   Popup Styles
================================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: var(--transition);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.popup-overlay.active .popup {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.popup-close:hover {
    background: var(--bg-color);
    color: var(--secondary-color);
}

.popup h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.popup p {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================================
   Floating Contact Button
================================================ */
.floating-contact {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1500;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* ================================================
   Responsive Design
================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .nav {
        flex-direction: column;
        gap: 15px;
        padding: 10px 0;
    }
    
    .contact-buttons {
        order: -1;
    }
    
    .hero {
        height: 80vh;
        padding: 0 20px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero {
        width: 100%;
        max-width: 300px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .units-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .lifestyle-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-buttons {
        justify-content: center;
    }
    
    .popup {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .popup-buttons {
        flex-direction: column;
    }
    
    .floating-contact {
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .unit-card {
        margin: 0 10px;
    }
    
    .service-item {
        padding: 30px 15px;
    }
}

/* ================================================
   Animation Classes
================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================
   Utilities
================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.primary-color { color: var(--primary-color); }
.secondary-color { color: var(--secondary-color); }
.accent-color { color: var(--accent-color); }
.text-color { color: var(--text-color); }
.white-color { color: var(--white-color); } 