/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

/* 
  Sakani - Student Housing Solutions
  Modern, Premium, and Responsive Design
*/

:root {
    /* Colors - Dark Mode (Default) */
    --primary-color: #3b82f6;
    --secondary-color: #f97316;
    --accent-color: #8b5cf6;
    --bg-color: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.4);
    /* Galaxy Theme Variables - Dark Mode */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-bg-highlight: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --galaxy-gradient: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 40%, transparent 70%);
    --glow-color: rgba(139, 92, 246, 0.4);
    --glow-color-soft: rgba(59, 130, 246, 0.2);
    --card-gradient: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    --title-gradient: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #3b82f6 100%);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #f97316 0%, #ea580c 100%);

    /* Spacing */
    --section-padding: 5rem 2rem;
    --container-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition-speed: 0.3s;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .section-title::after {
    margin-right: auto;
    margin-left: auto;
}

[dir="rtl"] .nav-links a {
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .feature-list li {
    justify-content: flex-start;
}

[dir="rtl"] .badge-1 {
    right: auto;
    left: -20px;
}

[dir="rtl"] .badge-2 {
    left: auto;
    right: -20px;
}

[dir="rtl"] .hero-image img {
    transform: perspective(1000px) rotateY(5deg);
}

[dir="rtl"] .hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

[dir="rtl"] .listing-price {
    right: auto;
    left: 10px;
    border-radius: 20px;
}

[dir="rtl"] .listing-meta i,
[dir="rtl"] .listing-features i {
    margin-left: 0.3rem;
    margin-right: 0;
}



[dir="rtl"] .service-item,
[dir="rtl"] .vm-card {
    text-align: right;
}



@media (max-width: 768px) {
    [dir="rtl"] .navbar .nav-links {
        right: auto;
        left: -100%;
    }

    [dir="rtl"] .navbar .nav-links.active {
        left: 0;
        right: auto;
    }
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.05);

    /* Galaxy Theme Variables - Light Mode Overrides */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-highlight: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(59, 130, 246, 0.2);
    --galaxy-gradient: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.02) 40%, transparent 70%);
    --glow-color: rgba(59, 130, 246, 0.1);
    --glow-color-soft: rgba(59, 130, 246, 0.05);
    --card-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --title-gradient: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-secondary: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* Gender Themes */
[data-gender="female"] {
    --primary-color: #ec4899;
    /* Pink */
    --secondary-color: #f43f5e;
    /* Rose */
    --accent-color: #d946ef;
    /* Fuchsia */
    --galaxy-gradient: radial-gradient(circle, rgba(217, 70, 239, 0.2) 0%, rgba(236, 72, 153, 0.1) 40%, transparent 70%);
    --glow-color: rgba(217, 70, 239, 0.4);
    --glow-color-soft: rgba(236, 72, 153, 0.2);
    --title-gradient: linear-gradient(135deg, #fff 0%, #fbcfe8 50%, #ec4899 100%);
    --gradient-primary: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --gradient-secondary: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
}

[data-theme="light"][data-gender="female"] {
    --title-gradient: linear-gradient(135deg, #0f172a 0%, #831843 100%);
    --gradient-primary: linear-gradient(135deg, #db2777 0%, #9d174d 100%);
    --gradient-secondary: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
    --glass-border: rgba(236, 72, 153, 0.2);
    --galaxy-gradient: radial-gradient(circle, rgba(236, 72, 153, 0.05) 0%, rgba(217, 70, 239, 0.02) 40%, transparent 70%);
    --glow-color: rgba(236, 72, 153, 0.1);
    --glow-color-soft: rgba(236, 72, 153, 0.05);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-width: 320px; /* Prevent total collapse in desktop mode */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Selection Grid */
.selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    width: 100%;
}

.selection-card {
    background: var(--bg-card);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition-speed);
}

.gender-selection {
    display: flex;
    gap: 1rem;
}

.gender-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.gender-btn i {
    font-size: 1.5rem;
}

.gender-btn:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.gender-btn[data-gender="male"] i {
    color: #3b82f6; /* Blue for male shape */
}

.gender-btn[data-gender="female"] i {
    color: #ec4899; /* Pink for female shape */
}

.gender-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

[data-gender="female"] .gender-btn.active {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.1);
}
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--primary-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
    border-radius: 8px;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.grid {
    display: grid;
    gap: 2rem;
}

.flex {
    display: flex;
    gap: 1rem;
}

.flex-column {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: block;
    /* Changed from inline-block to block for simpler centering */
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #2563eb;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 2rem;
}
/* Side aligned titles for specific sections */
.section-title.side-title {
    text-align: start;
    margin-bottom: 2rem;
}

.section-title.side-title::after {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: 'Poppins', sans-serif;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}



.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.85);
    /* Slightly transparent dark */
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.85);
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo img {
    height: 55px;
    /* Increased size for impact */
    width: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

#logo-text-en {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

#logo-text-ar {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Tajawal', sans-serif;
}

.dot {
    color: var(--primary-color);
}

.highlight {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.lang-toggle:hover {
    color: var(--primary-color);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--glow-color-soft);
}

.theme-toggle i {
    transition: all 0.4s ease;
}

/* Sun state color */
.theme-toggle i.fa-sun {
    color: #f59e0b;
    transform: rotate(360deg);
}

/* Moon state color */
.theme-toggle i.fa-moon {
    color: #8b5cf6;
    transform: rotate(-360deg);
}

/* Mobile Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.university-search {
    width: 100% !important;
    max-width: none !important;
    margin-top: 1rem !important;
    background: var(--bg-card) !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
    border: 1px solid var(--border-color) !important;
}

.icon-uni {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.search-box {
    background: var(--glass-bg);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 0 30px var(--glow-color-soft);
}

.search-select {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    min-width: 0;
    /* Prevents flex items from overflowing */
}

.search-select:focus {
    box-shadow: 0 0 15px var(--glow-color-soft);
    border-color: var(--primary-color) !important;
}

[dir="rtl"] .search-select {
    text-align: right;
    direction: rtl;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: visible;
    z-index: 5;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 60%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-text h1 {
    background: linear-gradient(to right, #0f172a, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text h1 span {
    -webkit-text-fill-color: var(--primary-color);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

/* Floating Badges */
.badge {
    position: absolute;
    background: var(--bg-surface);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.badge-1 {
    top: 10%;
    right: -20px;
    animation: float 3s ease-in-out infinite;
}

.badge-2 {
    bottom: 10%;
    left: -20px;
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

/* About Section */
.about {
    padding: var(--section-padding);
    background: var(--bg-surface);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
}

.about-img {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: var(--bg-color);
    aspect-ratio: 4/5;
}

.showcase-automation {
    position: relative;
    width: 100%;
    height: 100%;
}

.showcase-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.showcase-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.5s ease-in-out, transform 8s linear;
}

.showcase-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

[data-theme="light"] .showcase-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, transparent 100%);
}

.showcase-badge {
    background: var(--glass-bg-highlight);
    backdrop-filter: blur(8px);
    width: fit-content;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.showcase-content h4 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

.showcase-pills {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pill {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.pill.active {
    background: var(--primary-color);
    width: 60px;
    box-shadow: 0 0 10px var(--primary-color);
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        order: -1;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        height: 380px;       /* Fixed height so showcase is visible on mobile */
        border-radius: 20px;
        aspect-ratio: unset; /* Override the 4/5 ratio on mobile */
    }
}


.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Vision & Mission */
.vm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.vm-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s;
}

.vm-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.vm-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Accommodation */
.accommodation {
    padding: var(--section-padding);
}

.acc-card {
    background: var(--bg-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.acc-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.acc-img {
    height: 200px;
    background: var(--bg-color);
    /* Fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.acc-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Premium Explore Button at bottom of cards */
.acc-explore-btn {
    margin-top: auto;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    width: 100%;
    text-align: center;
}

[data-gender="male"] .acc-explore-btn {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

[data-gender="female"] .acc-explore-btn {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.08);
    color: #ec4899;
}

.acc-card:hover .acc-explore-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px var(--glow-color-soft);
}

[data-gender="male"] .acc-card:hover .acc-explore-btn {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

[data-gender="female"] .acc-card:hover .acc-explore-btn {
    background: #ec4899;
    color: white;
    border-color: #ec4899;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.acc-explore-btn .explore-arrow {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.acc-card:hover .acc-explore-btn .explore-arrow {
    transform: translateX(5px);
}

/* RTL Arrow support */
[dir="rtl"] .acc-explore-btn .explore-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .acc-card:hover .acc-explore-btn .explore-arrow {
    transform: scaleX(-1) translateX(5px);
}

/* Gender-specific Pulsing Glow Animations for Accommodation Cards */
@keyframes pulse-glow-male {
    0% {
        border-color: var(--border-color);
        box-shadow: 0 4px 20px var(--shadow-color);
    }
    100% {
        border-color: #3b82f6;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
}

@keyframes pulse-glow-female {
    0% {
        border-color: var(--border-color);
        box-shadow: 0 4px 20px var(--shadow-color);
    }
    100% {
        border-color: #ec4899;
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
    }
}

[data-gender="male"] .acc-card {
    animation: pulse-glow-male 1.5s infinite alternate ease-in-out;
}

[data-gender="female"] .acc-card {
    animation: pulse-glow-female 1.5s infinite alternate ease-in-out;
}

.acc-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.acc-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* Why Sakani & Team */
.feature-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.check-icon {
    color: var(--accent-color);
}

/* Why Sakani + Team grid */
.why-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(2rem, 4vw, 4rem);
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}


.team-member {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.support-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #25D366;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.supp-status {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
    font-weight: 600;
}

.wa-icon-small {
    font-size: 1.5rem;
    color: #25D366;
    margin-top: 0.5rem;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--border-color);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Digital Presence */
.digital-presence {
    padding: var(--section-padding);
    background: var(--bg-color);
}

.presence-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.presence-item {
    text-align: center;
}

.presence-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.global-icon { color: var(--primary-color); }
.wa-icon { color: #25D366; }
.mobile-icon { color: var(--secondary-color); }

/* Contact */
.contact {
    padding: var(--section-padding);
    background: var(--bg-surface);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.contact-info {
    width: 100%;
    max-width: 600px;
}

.contact-card {
    background: var(--bg-card);
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.wa-icon-large {
    font-size: 4rem;
    color: #25D366;
    margin-bottom: 1.5rem;
    display: block;
}

.contact-card h3 {
    margin-bottom: 1rem;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.phone-number {
    font-size: 0.9rem;
    color: var(--text-muted);
    direction: ltr;
}

/* Footer Additions */
.footer-bottom {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(10deg);
}

/* WhatsApp Button */
.whatsapp-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: #25D366;
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn-large i {
    font-size: 2rem;
}

/* Footer */
footer {
    background: var(--bg-color);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    header {
        height: 60px;
    }

    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 6rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        transition: 0.3s ease-in-out;
    }

    .navbar .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hero-content,
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Ensure showcase/about-img is visible on small phones */
    .about-img {
        height: 300px;
        max-width: 100%;
        width: 100%;
        aspect-ratio: unset;
        border-radius: 16px;
        order: -1;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .section-title {
        width: 100%;
    }

    /* Fix showcase text on mobile */
    .showcase-overlay {
        padding: 1rem 1.2rem;
        gap: 0.6rem;
    }

    .showcase-content h4 {
        font-size: 1.1rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .showcase-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }

    .showcase-pills {
        margin-top: 0.4rem;
    }

    .pill {
        width: 28px;
        height: 3px;
    }

    .pill.active {
        width: 44px;
    }
}

/* Listings Section */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.listings-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-fav-filter {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-fav-filter #fav-icon {
    color: var(--primary-color);
}

.sort-select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    font-weight: 600;
    outline: none;
}

.listings-grid-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.listings-section {
    padding: var(--section-padding);
    background: var(--bg-surface);
    display: none;
    min-height: 50vh;
}

.listings-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.listing-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.listing-img-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.listing-img-container::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px; /* Slight overflow to ensure edge blur coverage */
    backdrop-filter: blur(25px) brightness(0.4);
    -webkit-backdrop-filter: blur(25px) brightness(0.4);
    z-index: 0;
}

.listing-images {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1; /* Above the blur */
}

.listing-images img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.listing-images img.active {
    opacity: 1;
    pointer-events: auto;
}

.img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s;
}

.img-nav:hover {
    background: var(--primary-color);
}

.img-nav.prev {
    left: 10px;
}

.img-nav.next {
    right: 10px;
}

/* Modal gallery arrows — use modal-prev / modal-next classes */
.modal-gallery .img-nav {
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.modal-gallery .modal-prev {
    left: 12px;
}

.modal-gallery .modal-next {
    right: 12px;
}

.modal-gallery .img-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.listing-price {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.listing-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.listing-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.book-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    background: #25D366;
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.book-btn:hover {
    background: #20b857;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transform: translateY(-2px);
}

/* Error State Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.search-select.error {
    border-color: #ef4444;
    /* Red */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}



/* --- Galaxy Theme Expansion --- */

/* 1. Luminous Icons */
.service-icon,
.check-icon,
.vm-icon,
.fas.fa-globe,
.fab.fa-whatsapp,
.fas.fa-mobile-alt,
.listing-features i,
.listing-meta i {
    filter: drop-shadow(0 0 5px currentColor);
    transition: filter 0.3s ease;
}

.service-item:hover .service-icon,
.vm-card:hover .vm-icon {
    filter: drop-shadow(0 0 8px currentColor) brightness(1.2);
    transform: scale(1.1);
}

/* 2. Glowing Buttons */
.btn-primary,
.book-btn {
    box-shadow: 0 0 15px var(--glow-color-soft);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.btn-primary:hover,
.book-btn:hover {
    box-shadow: 0 0 25px var(--glow-color);
}

/* 3. Section Titles with Nebula Gradient */
.section-title h2,
h2.section-title {
    background: var(--title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px var(--glow-color-soft));
}

.section-title::after {
    background: linear-gradient(90deg, transparent, var(--accent-color), var(--primary-color), transparent);
    height: 3px;
    box-shadow: 0 0 10px var(--accent-color);
}

/* 4. Search Box Galaxy Style */
.search-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 30px var(--glow-color-soft);
}

.search-select {
    background: var(--bg-surface) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-primary) !important;
}

.search-select:focus {
    box-shadow: 0 0 15px var(--glow-color-soft);
    border-color: var(--primary-color) !important;
}

/* 5. Accommodation Cards Subtle Glow */
.acc-card {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.acc-card:hover {
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--primary-color);
}

.acc-img i {
    color: var(--primary-color);
}

/* 6. Listing Cards */
.listing-card {
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.listing-card:hover {
    box-shadow: 0 10px 40px var(--shadow-color);
    border-color: var(--primary-color);
}

/* Mobile Responsiveness for Galaxy Theme */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .search-box {
        flex-direction: column;
        padding: 1.5rem;
    }

    .search-select {
        width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .why-team .grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }



    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0 1rem;
    }

    .logo-text span:first-child {
        font-size: 1.2rem !important;
    }

    .logo-text span:last-child {
        font-size: 1rem !important;
    }

    .team-grid {
        grid-template-columns: 1fr !important;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .badge-1 {
        right: -10px;
    }

    .badge-2 {
        left: -10px;
    }
}

/* Specific Section Fixes */
.why-team .grid {
    align-items: start;
}



.feature-list span {
    word-break: break-word;
}

/* Ensure images don't overflow */
.hero-image img,
.about-img img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-surface);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: var(--text-muted);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

[dir="rtl"] .close-modal {
    right: auto;
    left: 25px;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}

/* Modal Gallery */
.modal-gallery {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.modal-gallery::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    backdrop-filter: blur(25px) brightness(0.4);
    -webkit-backdrop-filter: blur(25px) brightness(0.4);
    z-index: 0;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.modal-gallery img.active {
    opacity: 1;
    pointer-events: auto;
}

/* Enhanced Details Modal Design */
.modal-header-container {
    margin-bottom: 1.25rem;
}

.modal-title-block h3 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.modal-header-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.modal-rating-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.modal-status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.modal-status-badge.available {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-status-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.modal-status-badge.sold {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.modal-info-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 0.85rem 1rem;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-info-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modal-info-card .icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.modal-info-card.price-card .icon-box {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.modal-info-card.dist-card .icon-box {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.modal-info-card.type-card .icon-box {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.modal-info-card.gender-card .icon-box {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.modal-info-card .info-content {
    display: flex;
    flex-direction: column;
}

.modal-info-card .info-content span {
    font-size: 0.78rem;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 0.15rem;
}

.modal-info-card .info-content strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-desc-box {
    background: var(--bg-card, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.07));
    padding: 1rem 1.15rem;
    border-radius: 14px;
    margin: 1.15rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.modal-desc-box .desc-icon {
    color: var(--primary-color, #3b82f6);
    font-size: 1.15rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.modal-desc-box p {
    margin: 0;
}

.amenities-section {
    margin: 1.35rem 0;
}

.amenities-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.amenities-title i {
    color: #3b82f6;
    font-size: 0.95rem;
}

.modal-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
}

.modal-amenity-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.07));
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.modal-amenity-card:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
    transform: translateY(-1px);
}

.modal-amenity-card .amenity-icon-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.modal-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-book-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.9rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.25s ease;
}

.modal-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

/* Utility Classes for Listings */
.rating-badge {
    background: var(--bg-surface);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.listing-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.listing-actions button, 
.listing-actions a {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.listing-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.listing-features {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.listing-features span {
    font-size: 0.75rem;
    background: var(--bg-surface);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.listing-features span i {
    color: var(--primary-color);
}

/* Mobile Responsive Adjustments for Modal and General UI */
@media (max-width: 768px) {
    .listing-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        margin: 1rem;
    }

    #modal-body h3 {
        font-size: 1.4rem;
        margin-top: 0.5rem;
    }

    .modal-gallery {
        height: 220px;
        /* Reduced height on mobile */
        margin-bottom: 1.2rem;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
        /* Stack detailed options on mobile */
        gap: 1rem;
    }

    .modal-info-item {
        padding: 0.8rem;
        display: flex;
        flex-direction: row;
        /* Align icon and text horizontally on mobile for space */
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    [dir="rtl"] .modal-info-item {
        text-align: right;
    }

    .modal-info-item i {
        margin-bottom: 0;
        font-size: 1.4rem;
        /* Adjusted for horizontal layout */
    }

    .modal-info-item > div {
        display: flex;
        flex-direction: column;
    }

    .modal-info-item span {
        font-size: 0.85rem;
    }

    .modal-info-item strong {
        font-size: 1rem;
    }

    /* Overall Mobile Icons Downscaling */
    .gender-btn i.fas,
    .search-box i.fas,
    .info-item i.fas,
    .feature-list i.fas {
        font-size: 1.5rem !important;
    }

    .modal-info-item i.fas {
        font-size: 1.2rem !important;
    }

    /* Ensure small buttons/meta icons stay compact */
    .listing-meta i.fas,
    .listing-features i.fas {
        font-size: 0.85rem !important;
    }

    .btn i.fas,
    .btn i.fab,
    .book-btn i.fab,
    .details-btn i.fas {
        font-size: 1rem !important;
    }

    .whatsapp-float {
        width: 45px !important;
        height: 45px !important;
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    [dir="rtl"] .whatsapp-float {
        right: auto !important;
        left: 15px !important;
    }

    .whatsapp-float i.fab {
        font-size: 1.5rem !important;
    }

    /* Specific adjustment for large contact icon */
    .contact-info>div>i.fa-whatsapp {
        font-size: 2rem !important;
        /* Brought down from 4rem */
        margin-bottom: 0.5rem !important;
    }

    /* Resize the large whatsapp button in Contact */
    .whatsapp-btn-large {
        padding: 0.6rem 1.5rem !important;
        font-size: 1rem !important;
    }

    .whatsapp-btn-large i.fab {
        font-size: 1.2rem !important;
    }
}

/* Professional Upgrades for Amenities, Filters & Wishlist */
.listings-controls select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='gray' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
}

[data-theme="light"] .listings-controls select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='gray' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

[dir="rtl"] .listings-controls select {
    background-position: left 1rem center;
    padding-right: 1rem !important;
    padding-left: 2.5rem !important;
}

.list-fav-btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.list-fav-btn:hover {
    transform: scale(1.15);
    background: rgba(0,0,0,0.7) !important;
}

.list-fav-btn:active {
    transform: scale(0.9);
}

.amenity-badge {
    background: var(--bg-surface);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all 0.3s ease;
}

.amenity-badge:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    background: var(--glass-bg);
}

.amenity-badge i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* --- Premium Scarcity Indicators --- */
.listing-card.is-sold-out {
    opacity: 0.85;
}

.sold-out-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.sold-out-badge {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(-5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.sold-out-badge i {
    font-size: 1.1rem;
}

.almost-full-badge {
    position: absolute;
    top: 15px;
    right: 15px; /* Adjust based on RTL if needed, but normally opposite to heart */
    z-index: 10;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: pulse-orange 2s infinite;
}

[dir="rtl"] .almost-full-badge {
    right: auto;
    left: 15px; /* Since heart is right-aligned in RTL, we put this on the left */
}
[dir="rtl"] .list-fav-btn {
    left: auto !important;
    right: 15px !important;
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pulse-btn {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.book-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================
   Professional Fullscreen Lightbox Styles
   ========================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000; /* Layered above ordinary details modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 3100;
}

.close-lightbox:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

[dir="rtl"] .close-lightbox {
    right: auto;
    left: 40px;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3100;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.lightbox-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

/* Lightbox cursor pointer for listing and modal images */
.listing-images img,
.modal-gallery img {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.listing-images img:hover,
.modal-gallery img:hover {
    filter: brightness(1.05);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 90%;
    }
    .lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .lightbox-prev {
        left: 15px;
    }
    .lightbox-next {
        right: 15px;
    }
    .close-lightbox {
        top: 20px;
        right: 25px;
        font-size: 32px;
    }
    [dir="rtl"] .close-lightbox {
        left: 25px;
        right: auto;
    }
}

/* Gallery Counter styling */
.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
    pointer-events: none;
    transition: all 0.3s ease;
}

[dir="rtl"] .gallery-counter {
    right: auto;
    left: 15px;
}

.search-select.hidden-original {
    display: none !important;
}

/* Custom Premium University Selector Dropdown */
.custom-select-container {
    position: relative;
    flex: 1;
    width: 100%;
    min-width: 0;
    z-index: 100;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-select-trigger:hover,
.custom-select-trigger:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px var(--glow-color-soft);
}

.custom-select-trigger .trigger-icon {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-right: 0.75rem;
    transition: transform 0.3s ease;
}

[dir="rtl"] .custom-select-trigger .trigger-icon {
    margin-right: 0;
    margin-left: 0.75rem;
}

.custom-select-trigger .trigger-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[dir="rtl"] .custom-select-trigger .trigger-text {
    text-align: right;
}

.custom-select-trigger .trigger-arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

[dir="rtl"] .custom-select-trigger .trigger-arrow {
    margin-left: 0;
    margin-right: 0.75rem;
}

.custom-select-container.open .custom-select-trigger .trigger-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.custom-select-container.open .custom-select-trigger {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px var(--glow-color-soft);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    z-index: 1000;
    overflow: hidden;
}

body[data-theme="dark"] .custom-select-dropdown {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border-color: var(--glass-border);
}

.custom-select-container.open .custom-select-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}



.custom-select-options {
    display: block;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Custom Scrollbar for Options */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(59, 130, 246, 0.08);
    padding-left: 1.4rem;
}

[dir="rtl"] .custom-select-option:hover {
    padding-left: 1.2rem;
    padding-right: 1.4rem;
}

[data-gender="female"] .custom-select-option:hover {
    background: rgba(236, 72, 153, 0.08);
}

.custom-select-option.selected {
    background: var(--primary-color) !important;
    color: white !important;
}

.custom-select-option.hidden {
    display: none;
}

.custom-select-option .option-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

[data-gender="female"] .custom-select-option .option-icon-container {
    background: rgba(236, 72, 153, 0.1);
    color: var(--primary-color);
}

.custom-select-option:hover .option-icon-container {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.custom-select-option.selected .option-icon-container {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.custom-select-option .option-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
}

.custom-select-option .option-name {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
}

.custom-select-option .option-city {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

body[data-theme="dark"] .custom-select-option .option-city {
    background: rgba(255, 255, 255, 0.05);
}

.custom-select-option.selected .option-city {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}



/* Let's make sure the university-search box container handles layout correctly and doesn't get messed up */
.university-search {
    position: relative;
    z-index: 10;
    overflow: visible !important;
}