/* 1. اللوحة البصرية العامة وتوجيهات التصميم (Style Guide & Design Tokens) */

:root {
    /* Colors */
    --bg-primary: #070B13;   /* Deep Slate Black */
    --bg-soft: #0E1321;      /* Deep Slate Blue Container */
    --bg-card: #161D2E;      /* Premium Dark Card Background */
    --color-luxury: #F8FAFC;  /* Bright Text Color */
    --color-active: #38BDF8;  /* Linear LED Cyan Accent */
    --color-accent: #E2C974;  /* Travertine Gold Accent */
    
    /* MEP Colors */
    --color-mep-elec: #34D399;   /* Green for Electrical */
    --color-mep-mech: #FB923C;   /* Orange for HVAC */
    --color-mep-plumb: #38BDF8;  /* Blue for plumbing */
    
    /* Typography */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;

    /* Spacing & Transitions */
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.en-text {
    font-family: var(--font-en);
}

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

/* Typography Utilities */
.text-center { text-align: center; }

/* Buttons */
.btn-primary {
    background-color: var(--color-active);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-ar);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-smooth), transform var(--transition-smooth);
}

.btn-primary:hover {
    background-color: #026ca0;
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 32px;
    font-size: 1.1rem;
}

/* 2. الهيكل البنائي (Page Layouts & Wireframes) */

/* Header / Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 11, 19, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(248, 250, 252, 0.8);
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-active);
    transform: translateY(-2px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switch {
    font-weight: 600;
    cursor: pointer;
    color: rgba(248, 250, 252, 0.8);
    transition: color 0.3s ease;
}

.lang-switch:hover {
    color: var(--color-active);
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#hero-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(7, 11, 19, 0.2) 0%, rgba(7, 11, 19, 0.85) 100%);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-title {
    font-size: 3rem;
    color: var(--color-luxury);
    margin-bottom: 20px;
    text-shadow: 0 5px 25px rgba(0,0,0,0.8);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Sections Common */
section {
    padding: 100px 0;
}
.section-title {
    font-size: 2.5rem;
    color: var(--color-luxury);
    margin-bottom: 50px;
}

/* About Section */
.about-section {
    background-color: var(--bg-soft);
}
.about-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
    }
}
.about-text, .about-3d-materials {
    width: 100%;
}
.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--color-accent);
}
.about-info-list li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    color: rgba(248, 250, 252, 0.85);
}
.about-info-list li:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-active);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.1);
}
.about-info-list li strong {
    color: var(--color-accent);
}

/* 3D Materials Lab Showcase */
.about-3d-materials {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.materials-header h3 {
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 5px;
}
.materials-header p {
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.7);
}
.materials-grid-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.material-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-smooth);
}
.material-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}
.material-btn.active {
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--color-active);
}
.material-btn .m-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: block;
}
.material-btn .m-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-luxury);
}
.material-btn .m-info small {
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.5);
}
.material-3d-canvas-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: #05080e;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
#materials-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.canvas-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.4);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.6);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Services Section */
.services-section {
    background-color: var(--bg-primary);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.service-card {
    background-color: var(--bg-soft);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: default;
}
.service-card:hover {
    background-color: var(--bg-primary);
    transform: translateY(-10px);
    border-color: var(--color-active);
    box-shadow: 0 15px 40px rgba(2, 132, 199, 0.1);
}
.service-card i {
    color: var(--color-active);
    margin-bottom: 20px;
}
.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}
.service-card p {
    color: #475569;
}

/* Portfolio Section */
.portfolio-section {
    background-color: var(--bg-soft);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.portfolio-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}
.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(2, 132, 199, 0.1);
}
.portfolio-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.portfolio-info {
    padding: 30px;
}
.portfolio-info h3 {
    color: var(--color-luxury);
    margin-bottom: 15px;
    font-size: 1.25rem;
    line-height: 1.5;
}
.portfolio-info p, .portfolio-info ul {
    color: #475569;
    font-size: 1rem;
}

/* Configurator Section */
.configurator-section {
    background-color: var(--bg-primary);
}
.configurator-container {
    max-width: 1200px;
}
.configurator-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}
@media (max-width: 992px) {
    .configurator-split-layout {
        grid-template-columns: 1fr;
    }
}
.configurator-form-side {
    width: 100%;
}
.wizard-container {
    background: var(--bg-soft);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.wizard-step {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wizard-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.wizard-step h3 {
    color: var(--color-active);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

/* 3D Viewport Side */
.configurator-3d-side {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.configurator-3d-viewport {
    position: relative;
    width: 100%;
    height: 450px;
    background: #05080e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
#configurator-3d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.viewport-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}
.viewport-overlay button, .viewport-overlay div {
    pointer-events: auto;
}
.mode-badge {
    background: rgba(8, 12, 20, 0.85);
    border: 1px solid var(--color-active);
    color: var(--color-active);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.stats-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(8, 12, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-luxury);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.btn-viewport-reset {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(8, 12, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-luxury);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.btn-viewport-reset:hover {
    background: var(--color-active);
    border-color: var(--color-active);
    color: #05080e;
    transform: rotate(180deg);
}
.configurator-3d-hint {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.6);
    line-height: 1.5;
    padding: 0 10px;
}
.configurator-3d-hint p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.configurator-3d-hint i {
    color: var(--color-active);
}

/* Style Selector */
.style-selector {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.style-card {
    position: relative;
    cursor: pointer;
}
.style-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.style-card-content {
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-luxury);
}
.style-card input:checked ~ .style-card-content {
    border-color: var(--color-active);
    background-color: rgba(56, 189, 248, 0.06);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.1);
}
.style-card-content h4 {
    margin-bottom: 5px;
    color: var(--color-accent);
}

.pay-method-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid rgba(255, 255, 255, 0.08);
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex: 1;
    min-width: 200px;
    text-align: center;
    justify-content: center;
}
.pay-method-card input {
    display: none;
}
.pay-method-card:has(input:checked) {
    border-color: var(--color-active);
    background: rgba(56, 189, 248, 0.06);
}
.pay-method-card span {
    font-weight: 600;
    color: var(--color-luxury);
}

/* Rooms Grid & Inputs */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.room-input-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
}
.room-input-card:focus-within {
    border-color: var(--color-active);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}
.room-input-card label {
    font-weight: 600;
    color: var(--color-luxury);
    font-size: 0.95rem;
}
.room-input-card input {
    background: rgba(5, 8, 14, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--color-luxury) !important;
    padding: 8px !important;
    border-radius: 4px !important;
    font-family: var(--font-ar);
}
.room-input-card input:focus {
    border-color: var(--color-active) !important;
    outline: none;
}

/* Price Display */
.price-display {
    text-align: center;
    padding: 35px;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 8px;
    border: 1px dashed var(--color-active);
}
.total-price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-accent);
    margin: 15px 0;
    text-shadow: 0 0 15px rgba(226, 201, 116, 0.2);
}
.price-note {
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.6);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-soft);
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}
.contact-form {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(5, 8, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-luxury);
    border-radius: 6px;
    font-family: var(--font-ar);
    font-size: 1rem;
    transition: all 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    border-color: var(--color-active);
    outline: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}
.contact-form select option {
    background: var(--bg-primary);
    color: var(--color-luxury);
}
.contact-form button {
    width: 100%;
}
.contact-map {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.map-placeholder {
    text-align: center;
    color: rgba(248, 250, 252, 0.8);
}
.map-placeholder i {
    margin-bottom: 15px;
    color: var(--color-active);
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}
