/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f5921d;
    --secondary-color: #d67d0a;
    --accent-color: #f5921d;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    /* direction: rtl; - Removed to respect html dir attribute */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info a,
.social-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.contact-info a:hover,
.social-links a:hover {
    opacity: 0.8;
}

.contact-info a i,
.social-links a i {
    font-size: 18px;
}

.mobile-text {
    display: none;
}

.social-links {
    display: flex;
    gap: 15px;
}

.navbar {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.logo-img {
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Admin link style removed */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 1500px;
    max-width: 100%;
    height: 600px;
    overflow: hidden;
    margin: 0 auto;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-color);
}

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 40px;
    max-width: 800px;
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.slide-content p {
    font-size: 20px;
    line-height: 1.8;
}

.btn-slide {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-slide:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

/* Animations */
@keyframes zoomIn {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.slide.active .slide-content h2 {
    animation: fadeInDown 1s ease-out both;
    animation-delay: 0.5s;
}

.slide.active .slide-content p {
    animation: fadeInUp 1s ease-out both;
    animation-delay: 0.8s;
}

.slide.active .btn-slide {
    animation: fadeInUp 1s ease-out both;
    animation-delay: 1.1s;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 10s ease;
    /* Fallback */
}

.slide.active .slide-bg {
    animation: zoomIn 10s linear infinite alternate;
}



.slider-btn.prev {
    right: 20px;
}

.slider-btn.next {
    left: 20px;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--white);
}

/* Section Styles */
section {
    padding: 20px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 137px;
}

.category-icon img {
    width: 137px;
    height: 137px;
    object-fit: contain;
    border-radius: 8px;
}

.category-card h3 {
    color: var(--text-color);
    margin-bottom: 0;
    font-size: 20px;
}

/* Machinery Grid */
.machinery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.machinery-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.machinery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.machinery-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.machinery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.machinery-card:hover .machinery-image img {
    transform: scale(1.1);
}

.machinery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.machinery-content {
    padding: 20px;
}

.machinery-category {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

.machinery-content h3 {
    color: var(--text-color);
    margin: 10px 0;
    font-size: 22px;
}

.machinery-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

/* About Section */
.about-section {
    background: var(--light-color);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    color: var(--primary-color);
    font-size: 36px;
    margin-bottom: 30px;
}

.about-content p {
    font-size: 18px;
    line-height: 2;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 20px;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact Section */
.contact-section {
    padding: 10px 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-section h2,
.contact-map-section h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 28px;
}

.contact-item {
    margin-bottom: 25px;
}

.contact-item h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item h3 i {
    color: var(--primary-color);
}

.contact-item p {
    color: var(--text-light);
    font-size: 16px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-social {
    margin-top: 30px;
}

.contact-social h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.social-links-contact {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.social-icon.facebook {
    background: #1877f2;
}

.social-icon.twitter {
    background: #1da1f2;
}

.social-icon.whatsapp {
    background: #25D366;
}

.social-icon.instagram {
    background: #e4405f;
}

.contact-map-section {
    display: flex;
    flex-direction: column;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 500px;
    width: 100%;
    margin-bottom: 15px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-link {
    margin-top: 15px;
    text-align: center;
}

.map-link a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.map-link a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1600px) {
    .hero-slider {
        width: 100%;
        max-width: 1500px;
    }
}

@media (max-width: 992px) {
    .top-bar {
        padding: 9px 0;
    }

    .contact-info a {
        font-size: 13.5px;
    }

    .social-links a {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 600px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        /* Fixed width for standard mobile drawer feel */
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 30px 30px;
        /* Top padding for close area */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1002;
        /* High z-index */
        align-items: flex-start;
        /* Align text to start */
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1003;
        /* Above the menu so it can be used to close if needed, though usually we have a separate close btn inside */
        position: relative;
    }

    .slide-content h2 {
        font-size: 32px;
    }

    .slide-content p {
        font-size: 16px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }

    .machinery-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 8px 0;
    }

    .top-bar-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    .contact-info,
    .social-links {
        flex-shrink: 0;
    }

    .contact-info a,
    .social-links a {
        font-size: 13px;
        gap: 6px;
    }

    .contact-info a i,
    .social-links a i {
        flex-shrink: 0;
        font-size: 16px;
    }

    .mobile-text {
        display: inline;
    }

    .social-links {
        gap: 10px;
    }

    .contact-layout {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .contact-section {
        padding: 40px 0 !important;
    }

    .contact-info-section h2,
    .contact-map-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .contact-item {
        margin-bottom: 20px;
    }

    .contact-item h3 {
        font-size: 16px;
    }

    .contact-item p {
        font-size: 14px;
    }

    .map-container {
        height: 400px !important;
    }

    .social-links-contact {
        gap: 10px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 6px 0;
    }

    .top-bar-content {
        gap: 10px;
        flex-direction: row;
    }

    .contact-info a,
    .social-links a {
        font-size: 12px;
        gap: 5px;
    }

    .contact-info a i,
    .social-links a i {
        font-size: 14px;
    }

    .mobile-text {
        display: inline;
        font-size: 12px;
    }

    .social-links {
        gap: 8px;
    }

    .contact-section {
        padding: 30px 0 !important;
    }

    .contact-layout {
        gap: 25px !important;
    }

    .contact-info-section h2,
    .contact-map-section h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .map-container {
        height: 300px !important;
    }

    .contact-item {
        margin-bottom: 15px;
    }

    .contact-social {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .machinery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .machinery-card {
        border-radius: 8px;
    }

    .machinery-image {
        height: 140px;
    }

    .machinery-content {
        padding: 10px;
    }

    .machinery-content h3 {
        font-size: 15px;
        margin: 5px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .machinery-category {
        font-size: 11px;
    }

    .machinery-badge {
        font-size: 10px;
        padding: 2px 8px;
        top: 8px;
        left: 8px;
    }
}