/**
 * منارات الفرص - الملف الرئيسي المشترك
 * Manarat Elforas - Main Shared Stylesheet
 * يحتوي على: Variables, Header, Footer, Buttons, Forms, Utilities
 */

/* ============================================
   CSS Variables & Root
   ============================================ */
:root {
    /* Brand Colors */
    --dark-teal: #002A28;
    --medium-teal: #004C48;
    --light-teal: #006B64;
    --lighter-teal: #008B7F;
    --gold: #AE9357;
    --gold-light: #C4A86A;
    --gold-lighter: #D4B978;
    --gold-dark: #8A7545;
    --light-cream: #E5DCBF;
    --off-white: #E8E7E2;
    --soft-white: #F5F4F0;
    --pure-white: #FFFFFF;
    
    /* Gradients */
    --gold-gradient: #d4b978;
    --teal-gradient: linear-gradient(135deg, #015d5354 0%, #013f3961 100%);
    --header-footer-gradient: linear-gradient(135deg, #004C48 0%, #002A28 100%);
    --light-gradient: linear-gradient(135deg, #E8E7E2 0%, #F5F4F0 100%);
    --gold-overlay: linear-gradient(135deg, rgba(174, 147, 87, 0.1) 0%, transparent 100%);
    --teal-gold-gradient: linear-gradient(135deg, #004C48 0%, rgba(174, 147, 87, 0.15) 50%, #003D3A 100%);
    
    /* Typography */
    --font-main: 'Tajawal', sans-serif;
    
    /* Spacing */
    --section-padding: 5rem;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 5px 30px rgba(174, 147, 87, 0.4);
    --shadow-gold-lg: 0 10px 50px rgba(174, 147, 87, 0.5);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #004C48 0%, #003D3A 50%, #275749 100%);
    color: var(--off-white);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
}

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

::-webkit-scrollbar-track {
    background: var(--medium-teal);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Selection */
::selection {
    background: var(--gold);
    color: var(--dark-teal);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--light-cream);
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--gold-light);
}

/* ============================================
   Layout & Container
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    color: var(--off-white);
}

.section-header h2 span {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(174, 147, 87, 0.3);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--light-cream);
}

/* Background Variations */
.bg-dark { 
    background: var(--teal-gradient); 
    color: var(--off-white); 
    position: relative;
}
.bg-dark p { color: var(--light-cream); }

.bg-medium { 
    background: var(--teal-gold-gradient); 
    color: var(--off-white); 
}
.bg-medium p { color: var(--light-cream); }

.bg-gradient { 
    background: var(--teal-gradient); 
    color: var(--off-white);
    position: relative;
}
.bg-gradient p { color: var(--light-cream); }

.bg-cream { 
    background-color: var(--light-cream); 
    color: var(--dark-teal); 
}

.bg-light { 
    background-color: var(--light-teal); 
    color: var(--off-white);
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
}

.bg-soft { 
    background: linear-gradient(135deg, #006B64 0%, rgba(174, 147, 87, 0.1) 100%);
    color: var(--off-white); 
}

.bg-white { 
    background-color: var(--pure-white); 
    color: var(--dark-teal);
    border-top: 3px solid var(--gold);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--dark-teal);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(174, 147, 87, 0.4);
    color: var(--dark-teal);
}

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

.btn-secondary:hover {
    background: var(--gold);
    color: var(--dark-teal);
}

.btn-white {
    background: var(--off-white);
    color: var(--dark-teal);
}

.btn-white:hover {
    background: var(--light-cream);
}

.btn-lg {
    padding: 1.1rem 3rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background: var(--header-footer-gradient);
    border-bottom: 1px solid #ae935742;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-contact {
    display: flex;
    gap: 2rem;
}

.top-bar-contact a {
    color: var(--light-cream);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar-contact a:hover {
    color: var(--gold);
}

.top-bar-license {
    color: var(--gold);
    font-size: 0.8rem;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-footer-gradient);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px rgba(174, 147, 87, 0.2);
}

.header.scrolled {
    box-shadow: 0 4px 30px rgba(174, 147, 87, 0.3);
}

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

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

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--off-white);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown > .nav-link svg {
    transition: var(--transition-normal);
}

.nav-dropdown:hover > .nav-link svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--dark-teal);
    border: 1px solid rgba(174, 147, 87, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--light-cream);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.nav-dropdown-menu a:hover {
    background: rgba(174, 147, 87, 0.15);
    color: var(--gold);
    padding-right: 2rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--gold);
    margin: 6px 0;
    transition: var(--transition-normal);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 42, 40, 0.98);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
    padding: 2rem;
}

.mobile-menu-content a {
    font-size: 1.5rem;
    color: var(--off-white);
    text-decoration: none;
    transition: var(--transition-normal);
}

.mobile-menu-content a:hover {
    color: var(--gold);
}

.mobile-menu-content .btn {
    margin-top: 1rem;
}

/* Header CTA button hide on mobile */
.header-cta {
    display: inline-flex;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--off-white);
    font-weight: 500;
    text-align: right;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgb(0 123 115 / 18%);
    border: 1px solid #ae93577d;
    border-radius: var(--radius-sm);
    color: var(--off-white);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    text-align: right;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold-light);
    background: rgb(1 51 47 / 84%);
    box-shadow: var(--shadow-gold);
}

.form-input::placeholder {
    color: rgba(232, 231, 226, 0.5);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23AE9357' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.form-note {
    font-size: 0.85rem;
    color: var(--light-cream);
    opacity: 0.8;
    margin-top: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--header-footer-gradient);
    padding-top: 4rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-title {
    color: var(--off-white);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

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

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--light-cream);
    font-size: 0.95rem;
    opacity: 0.85;
}

.footer-links a:hover {
    color: var(--gold);
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid #ae935791;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-licenses {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--gold);
}

/* ============================================
   WhatsApp Float Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 999;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #25D366;
    color: white;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4);
    transition: var(--transition-normal);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    color: white;
}

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-cream { color: var(--light-cream); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3.5rem;
    }
    
    .top-bar {
        display: none;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-cta {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-licenses {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .whatsapp-float {
        bottom: 1rem;
        left: 1rem;
    }
    
    .whatsapp-btn span {
        display: none;
    }
    
    .whatsapp-btn {
        padding: 1rem;
        border-radius: 50%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Homepage CTA & Contact Form Styles
   ============================================ */

/* Contact Buttons */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem auto;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.contact-btn svg {
    flex-shrink: 0;
}

.call-btn {
    background: linear-gradient(135deg, #006B64 0%, #004C48 100%);
    color: var(--gold);
    border: 2px solid var(--gold);
}

.call-btn:hover {
    background: var(--gold);
    color: var(--dark-teal);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(174, 147, 87, 0.4);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: 2px solid #25D366;
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.divider-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gold);
    margin: 2.5rem 0 1.5rem;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.divider-text::before {
    right: 0;
}

.divider-text::after {
    left: 0;
}

/* Simplified Form */
.contact-form {
    max-width: 600px;
    background: rgba(0, 76, 72, 0.3);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid rgb(174 147 87 / 39%);
    box-shadow: 0 25px 40px rgb(0 0 0 / 19%);
        margin: 0 auto;
}

.form-input.error,
.form-select.error {
    border-color: #ff6b6b !important;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* --- Right-align form placeholder text for Arabic --- */
.form-input::placeholder,
.form-textarea::placeholder,
.form-select {
  text-align: right;
}

/* This makes the dropdown arrow appear on the left */
.form-select {
  background-position: left 0.75rem center;
  padding-right: 1rem; 
}


@media (max-width: 600px) {
    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}