:root {
    --bg: rgba(220, 232, 233, 0.9);
    --card: rgb(126, 173, 71);
    --accent: rgba(98, 184, 89, 0.9);
    --text: #13181f;
    --muted: #375a7f;
    --shadow: 0 12px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
}

a { color: inherit; text-decoration: none; }
.container {
    width: min(1100px, 96vw);
    margin: 0 auto;
    padding: 2rem 0 4rem;
}
.topnav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    background-image: url('assets/images/cities/riyadh.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100vw;
    height: 60vh;
    margin-left: calc((100vw - 100%) / -2);
    margin-top: -2rem;
}
.topnav-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    background-image: url('assets/images/cities/riyadh.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100vw;
    height: 100vh;
    margin-left: calc((100vw - 100%) / -2);
    margin-top: -2rem;
}
.brand {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: rgb(255, 255, 255);
}
.nav-links {
    display: flex;
    gap: 1.1rem;
}
.nav-links a {
    padding: .45rem .75rem;
    border-radius: .45rem;
    background: rgba(0, 120, 0, 0.9);
    color: white;
    transition: all .2s ease;
}
.nav-links a:hover { background: rgba(0, 150, 0, 1); }
.right-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.right-nav a {
    padding: .45rem .75rem;
    border-radius: .45rem;
    background: var(--card);
    color: white;
    transition: all .2s ease;
}
.right-nav a:hover { background: var(--accent); }
.right-nav img {
    margin-left: auto;
    height: 90px !important;
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 10;
}
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 50px;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.dropbtn {
    background: var(--card);
    color: white;
    padding: .45rem .75rem;
    border-radius: .45rem;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    font-size: inherit;
}
.dropbtn::before {
    content: '☰';
    margin-right: 5px;
}
.dropbtn::after {
    content: '▼';
    margin-left: 5px;
}
.dropbtn:hover { background: var(--accent); }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(0, 120, 0, 0.9);
    width: 600px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}
.dropdown-menu {
    flex: 1;
    padding: 12px;
}
.dropdown-menu a {
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.dropdown-menu a:hover {
    background-color: rgba(0, 150, 0, 1);
}
.dropdown-preview {
    flex: 1;
    background: rgba(47, 141, 35, 0.9);
    border-left: 1px solid rgba(122, 223, 140, 0.3);
    padding: 12px;
}
.preview-content {
    display: none;
}
.preview-content h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1.1em;
}
.preview-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.preview-content li {
    padding: 4px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}
.dropdown:hover .dropdown-content {
    display: flex;
}
/* Preview content hover handled by JavaScript */
.hero {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    margin-top: 2rem;
}
.hero-text h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.12;
}
.hero-text p {
    margin: 1.25rem 0 0;
    color: var(--text);
    max-width: 57ch;
    font-size: 1.2em;
}
.cta-group { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn {
    border: 0;
    border-radius: .625rem;
    cursor: pointer;
    font-weight: 600;
    padding: .75rem 1.35rem;
}
.btn-primary { background: var(--card); color: #e7ffed; }
.btn-secondary { background: var(--card); color: #e7ffed;}
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
    place-items: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.feature-card {
    background: var(--card);
    /* border: 1px solid rgba(122,223,140,.4); */
    border-radius: 1rem; 
    padding: 1.2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    width: 260px;
    height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.feature-card h3 { margin: 0 0 .6rem; color: rgba(255, 255, 255, 0.9); }
.feature-card p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: .95rem; }
.section {
    margin-top: 4.25rem;
    padding: 2.2rem;
    background: var(--card);
    border-radius: 1.1rem;
    border: 1px solid rgba(122,223,140,.35);
    box-shadow: var(--shadow);
}
.section h2 { margin-top: 0; }
.services-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
}
.service { padding: 1rem; border: 1px dashed rgba(148,163,184,.3); border-radius: .9rem; background: var(--accent); }
.service h4 { margin: .35rem 0 0.6rem; }
.service p { margin: 0; color: #1a202c; font-size: .94rem; text-align: justify;}
.products-gallery .gallery-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item p {
    margin: 0;
    padding: 0.8rem;
    text-align: center;
    font-weight: 500;
    color: var(--text);
    background: rgba(0, 0, 0, 0.3);
}
.equipment-marquee {
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: rgba(47, 141, 35, 0.5);
    padding: 1.5rem 0;
}
.marquee-track {
    display: flex;
    animation: marquee-scroll 10s linear infinite;
    gap: 1.5rem;
    padding: 0 1.5rem;
}
.marquee-item {
    flex: 0 0 auto;
    width: 180px;
    text-align: center;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}
.marquee-item:hover {
    opacity: 1;
}
.marquee-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.6rem;
    display: block;
    margin-bottom: 0.5rem;
}
.marquee-item p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.brands-carousel {
    overflow: hidden;
    width: 100%;
}
.brands-track {
    display: flex;
    width: max-content;
    animation: scroll 24s linear infinite;
}
.brands-track img {
    flex: 0 0 auto;
    width: 200px;
    height: 120px;
    margin: 0 30px;
    object-fit: contain;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.footer {
    margin-top: 3.25rem;
    border-top: 1px solid rgba(122,223,140,.5);
    padding-top: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #4a5568;
    font-size: .88rem;
    flex-wrap: wrap;
    gap: .8rem;
}
.social-links { display: flex; align-items:center; gap:.65rem; }
.social-pill { padding: .4rem .65rem; border-radius: .6rem; background: rgba(255,255,255,.08); }
.locations-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
}
.location-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.8rem;
    border: 1px solid rgba(122, 223, 140, 0.3);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    overflow: hidden;
    min-height: 280px;
}
.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.location-content {
    display: flex;
    width: 100%;
    height: 100%;
}
/* Alternate image position for even cards */
.location-card:nth-child(even) .location-content {
    flex-direction: row-reverse;
}
.location-info-section {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}
.location-info-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 700;
}
.location-details-text {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.location-details-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}
.location-details-text strong {
    color: var(--text);
}
.location-details-text a {
    color: var(--text);
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}
.location-details-text a:hover {
    text-decoration: underline;
}
.location-image-section {
    flex: 1;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}
.location-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive styles for location cards */
@media (max-width: 768px) {
    .location-content {
        flex-direction: column;
    }
    
    .location-info-section {
        padding: 1.5rem;
    }
    
    .location-image-section {
        min-height: 200px;
    }
    
    .location-card {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .locations-grid {
        gap: 1rem;
    }

    .location-card {
        min-height: auto;
    }
    
    .location-info-section {
        padding: 1rem;
    }
    
    .location-info-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .location-details-text p {
        font-size: 0.85rem;
    }
    
    .location-image-section {
        min-height: 150px;
    }
}
@media (max-width: 899px) {
    .hero { flex-direction: column; }
}
@media (max-width: 768px) {
    .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .features { grid-template-columns: 1fr; }
}
