:root {
    --primary: #156a42;
    --secondary:  #25D366;
    --accent:  #0b3d91;
    --hover: #0b3d91;
    --type:#fc4c00;
    --background:#0ea5a4;
    --text:    #1F2937;
    --muted:   #6B7280;
    --light: #F7F9FC;
    --dark: #121212;
    --gap: 10px;
    --arrow-size: 48px;
    --card-radius:12px;
    --card-height:220px;
    --shadow: 0 10px 10px rgb(37, 211, 102, 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{
    z-index: 1000;
    background: var(--primary);
    color: var(--light);
    font-weight: bold;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    align-items: center;
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--accent);
}

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

/* Header */
header {
    border-radius: 25px;
    margin: 10px;
    background: var(--primary);
    border: 2px solid var(--secondary);
    color: var(--light);
    padding: 0.5rem 0;
    position: sticky;
    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(--secondary);
    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(--secondary);
}

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

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

.layer {
    position:absolute; inset:0;
    background:rgba(0,0,0,0.55);
}

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

.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(auto-fit,minmax(180px,1fr));
    gap:14px;
    margin-bottom:18px;
    background:rgba(255,255,255,0.08);
    padding:16px;
    border-radius:12px;
    border: 2px solid var(--secondary);
}

.form-group {
    position: relative;
}

.form-group input, .form-group select {
    padding:10px;
    border-radius:8px;
    font-size:14px;
    width: 100%;
    border: 2px solid var(--secondary);
    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 {
    padding:12px 28px;
    border-radius:10px;
    font-weight:700;
    font-size:16px;
    cursor:pointer;
    transition:0.3s;
    background: var(--primary);
    color: var(--light);
    border: 2px solid var(--secondary);
}

.search-btn:hover {
    transform: translateY(-3px);
    background: var(--secondary);
    border: 2px solid var(--accent);
}

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

.filter-section {
    background-size: cover;               
    background-position: center;         
    background-repeat: no-repeat;     
    color: var(--light);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.filter-section h3{
    backdrop-filter: blur(10px);
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
}

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

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

.section-title {
    font-size: 2rem;
    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;
}

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

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

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

.Product-image {
    height: 250px;
    background: var(--bg-primary) no-repeat center center;
    background-size: cover;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--accent);
}

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

.Product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--type);
    color:var(--light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0a7d3b; /* نفس أخضر Arrow */
    display: flex;
    overflow: hidden;
    float: right;
}

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

.Product-bad {
    font-size: 0.8rem;
    color:var(--light);
    background: var(--accent);
    float: right;
    padding: 0.5rem;
    border-radius: 50px;
    font-weight: bold;
}

.Product-content {
    padding: 1rem;
}

.Product-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.Product-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

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

.Product-category {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.Product-actions {
    display: flex;
    gap: var(--gap);
}

.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(--accent);
}

.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);
}
/* more pages 
.more-gard ul {
    display: flex;
    list-style-type: none;
    justify-content: center;
}

.more-gard ul li {
    margin-left: 0.5rem;
}

.more-gard ul li a{
    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: 2px solid var(--accent);
    border-radius: 100px;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.light {
    background: var(--secondary);
}
.more:hover {
    transform: translateY(-5px);
}
*/
/* newsletter-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: var(--gap);
}

.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 var(--gap); */
}

.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 {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 999px;
  color: var(--light);
  background: var(--primary);
  border: 2px solid var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}

.companies-nav:hover { 
    background: var(--secondary);
    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 {
    height: 40px;
    width: 40px;
    background-color:var(--primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light);
    margin-right: 1rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-image: url('../media/photo/home/footerBack.png');
    background-size: cover;               
    background-position: center;         
    background-repeat: no-repeat;     
    backdrop-filter: blur(50px);
    color:var(--light);
    font-weight: 500;
    padding: 4rem 0 2rem;
    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(--secondary);
}

.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(--secondary);
}

.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;
}

.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));
    }
    .products-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;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgb(21, 106, 66, 0.8);
        border: 2px solid var(--secondary);
        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;
    }
    
    .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;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 30px;
    }

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

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

    .newsletter-nav{
        display:none
    }

    .companies-nav {
        display: none;
    }
}
