:root {
    --primary: #0531b8;
    --secondary:  #25D366;
    --accent:  #fc4c00;
    --hover: #0531b8;
    --sacnd:  #25D366;
    --text:    #1F2937;
    --muted:   #6B7280;
    --light: #F7F9FC;
    --dark: #121212;
    --gap: 10px;
    --arrow-size: 48px;
    --card-radius:12px;
    --card-height:220px; /* rectangle height (desktop) */
    --shadow: 0 20px 30px rgba(11, 60, 145, 0.9);
    --bg-primary: linear-gradient(90deg, var(--primary) 50%, var(--light) 125%);
    --bg-sacnd: linear-gradient(90deg, var(--sacnd) 50%, var(--light) 125%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background:var(--light);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* button (top)*/
.button-top{
    font-size: 14px;
    z-index: 1000;
    color: var(--light);
    background: var(--primary);
    border: 2px solid var(--accent);
    padding: 10px;
    font-weight: bold;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.5);
    align-items: center;
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.button-top:hover {
    background: var(--accent);
}

/* Header */
header {
    position: sticky;
    color: var(--light);
    background: var(--primary);
    border: none;
    padding: 0.5rem 0;
    margin: 10px;
    border-radius: 25px;
    top: 0;
    z-index: 1000;
    direction: ltr !important;
}

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

.logoOne{
    height: 60px;
    width: 60px;
}

.logo {
    color: var(--light);
    font-size: 2rem;
    font-weight: 700;
    display: flex;  
}

.logo-highlight {
    color: var(--accent);
    font-weight: 500;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--light);
    font-size: 1.5rem;
    background: none;
    border: none;
}

/* Hero Section */
.hero {
    background-image: url('../media/photo/back.png');
    display: flex;
    color: var(--light);
    background-size: cover;               
    background-position: center;         
    background-repeat: no-repeat;     
    min-height:90vh;
    justify-content: center;
    align-items:center;
    text-align: center;
    position: relative;
    overflow: hidden;
    direction: ltr !important;
}

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

.search-container {
    background:rgba(5, 49, 184,0.5);
    padding: 1.1rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: fadeInUp 1s ease 0.4s both;
    border: 2px solid var(--accent);
}

.hero h1 {
    font-size: 30px;
    font-weight: 500;
    margin-bottom:16px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size:18px;
    line-height:1.7;
    color: var(--light);
    margin-bottom:30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.search-form {
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding:16px;
    border-radius:12px;
    margin-bottom: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input, .form-group select {
    padding:10px;
    border-radius:8px;
    font-size:14px;
    width: 100%;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
    color: var(--text);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.search-btn {
    cursor:pointer;
    font-size:16px;
    font-weight:700;
    color: var(--light);
    background: var(--primary);
    border: 2px solid var(--accent);
    padding:12px 28px;
    border-radius:10px;
    transition: all 0.5s ease;
}

.search-btn:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
     direction: ltr !important;
}

.filter-section {
    background-image: url('../media/photo/footer.png');
    color: var(--light);
    text-align: center;
    background-size: cover;               
    background-position: center;         
    background-repeat: no-repeat;     
    border-radius: 50px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.filter-section h3{
    text-align: center;
    margin-bottom: 1rem;
}

.filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* properties Section */
.properties-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
    position: relative;
}


.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.properties-card {
    cursor: pointer;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.properties-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.property-image {
    height: 250px;
    background: var(--bg-primary) no-repeat center center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.property-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.property-badge {
    font-size: 0.9rem;
    font-weight: bold;
    color:var(--light);
    background: var(--accent);
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}
.property-bad {
    font-size: 0.7rem;
    color:var(--light);
    background: var(--accent);
    float: right;
    padding: 0.5rem;
    border-radius: 50px;
    font-weight: bold;
}
.property-content {
    padding: 1rem;
}

.property-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
    direction: ltr !important;
}

.property-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color:var(--text);
}

.property-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--muted);
    direction: ltr !important;
}

.property-detail {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.property-location {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.property-actions {
    display: flex;
    gap: 1rem;
    direction: ltr !important;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 0.95rem;
}

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

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

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

.btn:hover {
    transform: translateY(-2px);
}

.highlight {
  outline: 3px solid var(--accent);
  border-radius: 10px;
  transition: outline 0.5s ease;
}

/* more pages container*/
.more-gard {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-left: 0.5rem;
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.more {
    width: 30px;
    height: 30px;
    color: var(--light);
    background: var(--primary);
    border-radius: 100px;
    border: none;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.light {
    background: var(--accent);
}
.more:hover {
    transform: translateY(-5px);
}

/* companies-section */
.newsletter-section {
    margin-inline:auto;
    padding:18px;
    position:relative;
    border-radius:18px;
}

.newsletter-section p{
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    margin: 25px;
}

.newsletter-wrapper {
    overflow:hidden;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 5px;
}

.newsletter-track {
    display:flex;
    gap:var(--gap);
    transition:transform 400ms cubic-bezier(.22,.95,.28,1);
    will-change:transform;
    padding:8px 4px;
    overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
   scrollbar-width: none;    /*  Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}



.newsletter-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.news-card {
    flex:0 0 calc(33.333% - (var(--gap) * 0.66));
    border-radius:var(--card-radius);
    height:var(--card-height);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    position:relative;
    cursor:pointer;
    text-decoration:none;
    scroll-snap-align: start;
    border: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}


.news-label{
    position:absolute;
    left:12px;
    top:12px;
    background:var(--accent);
    color:var(--light);
    padding:6px 10px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
}
.news-card img {
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

/* newsletter dots */
.newsletter-nav {
    position:absolute;
    top:50%;
    transform:translateY(-25%);
    display:grid;
    place-items:center;
    background:var(--primary);
    cursor:pointer;
    z-index:50;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 500;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    transition: background .2s ease, transform .2s ease;
}

.prev{
    right:8px
}

.next{
    left:8px
}

.newsletter-nav:hover { 
    background: var(--accent);
    transform: translateY(-2px);
}

.newsletter-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
}

.newsletter-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.newsletter-dots .dot.active {
  background: var(--accent);
  transform: scale(1.5);
}

/* companies-section */
.companies-section {
    margin: 25px;
}

.companies-section p{
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    margin: 25px;
}

.companies-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 5px;
}

.companies-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
   scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* IE & Edge */
}

.companies-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.company-card {
    display: grid;
    grid-template-rows: 160px auto;
    color: var(--text);
    scroll-snap-align: start;
    align-items: center;
    justify-items: center;
    text-decoration: none;
    border: none;
    border-radius: 100px;
    padding: 5px;
    font-weight: 500;
    transition: transform .2s ease, box-shadow .2s ease;
}

.company-card:hover {
    transform: translateY(-4px);
}

.company-card img {
    border-radius: 100px;
    width: 100%;
    height: 150px;
    object-fit: contain; /* full logo */
}

.company-card span {
    font-size: 14px;
    text-align: center;
}

/* companies dots */
.companies-nav {
    display: grid;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 500;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primary);
    border: none;
    cursor: pointer;
    place-items: center;
    transition: background .2s ease, transform .2s ease;
}

.companies-nav:hover { 
    background: var(--accent);
    transform: translateY(-5px);
}

.companies-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 14px;
}

.companies-dots .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.companies-dots .dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* social links */
.social-links {
    display: flex;
    margin-top: 1.5rem;
    justify-content: center;
}

.social-links a {
    display: flex;
    color: var(--light);
    background-color:var(--accent);
    border: none;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    border: 2px solid var(--light);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-image: url('../media/photo/footer.png');
    color:var(--light);
    font-weight: 500;
    padding: 4rem 0 2rem;
    background-size: cover;               
    background-position: center;         
    background-repeat: no-repeat;     
    direction: ltr !important;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent);
}

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

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

.footer-links a {
    color:var(--light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent);
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: var(--light);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    direction:rtl;
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--primary);
}

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

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .news-card{
        flex:0 0 calc(50% - (var(--gap) * 0.5));
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root{
        --card-height:160px
    }

    .logo-highlight {
        text-align: right;
        overflow: hidden;
    }

    .logo{
        display:flex;
        font-size: 1.5rem;
        font-weight:500;
    }

    .logoOne{
        width: 40px;
        height: 40px;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgb(11, 61, 145, 0.8);
        border: 2px solid var(--primary);
        flex-direction: column;
        border-radius: 5%;
        padding: 1rem 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        text-align: center;
    }

    .hamburger {
        display: block;
    }

    .hero {
        background-size: 100% 100%;               
        background-position: center;         
        background-repeat: no-repeat;     
    }

    .hero h1 {
        font-size: 1.5rem;
    }
    .filter-options {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .search-form {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .properties-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .property-bad {
    font-size: 0.5rem;
    }

    .section-title{
        font-size: 1.5rem;
    }

    .news-card{
        flex:0 0 calc(100% - var(--gap));
    }

    .newsletter-nav{
        display:none
    }

    .companies-nav {
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

}
