:root {
    --primary-red: #D31018;
    --accent-yellow: #FFD200;
    --background-white: #FFFFFF;
    --text-dark: #1B1B18;
    --text-muted: #706f6c;
    --border-light: #e3e3e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --admin-dark: #1A1A2E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[dir="rtl"] { text-align: right; }
[dir="ltr"] { text-align: left; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--background-white);
    border-bottom: 2px solid var(--accent-yellow);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-desc {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--primary-red);
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.lang-switcher a {
    text-decoration: none;
    color: #666;
    transition: color 0.2s;
}

.lang-switcher a.active {
    color: var(--primary-red);
    font-weight: bold;
}

.lang-switcher span {
    color: #ccc;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-red);
}

.cta-button {
    background-color: var(--primary-red);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    background-color: #b00d14;
    box-shadow: 0 4px 12px rgba(211, 16, 24, 0.3);
}

/* ============================================
   MOBILE MENU TOGGLE (Hamburger)
   ============================================ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 26px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   MOBILE SLIDE-IN MENU
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    z-index: 1200;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

[dir="ltr"] .mobile-menu { left: 0; transform: translateX(-100%); }
[dir="rtl"] .mobile-menu { right: 0; transform: translateX(100%); }

.mobile-menu.active {
    transform: translateX(0) !important;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid var(--accent-yellow);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-links {
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.mobile-nav-link i {
    color: var(--primary-red);
    width: 20px;
    text-align: center;
}

.mobile-nav-link:hover {
    background: #f8f8f8;
    color: var(--primary-red);
}

.mobile-menu-bottom {
    padding: 1.5rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* ============================================
   HERO SECTION SLIDER
   ============================================ */
.hero {
    height: 85vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background-color: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.2s ease-in-out;
    opacity: 0;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide.previous {
    opacity: 1;
    z-index: 1;
    transition: none;
}

.hero-slide.active:first-child {
    transition: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 5%;
    max-width: 900px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero span {
    color: var(--accent-yellow);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SECTION
   ============================================ */
.section {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-yellow);
    margin: 10px auto;
}

/* ============================================
   PREMIUM INDUSTRIAL SERVICES GRID
   ============================================ */
.premium-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.premium-service-card {
    position: relative;
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.premium-service-card:hover .card-image-bg {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.premium-service-card:hover .card-overlay {
    background: linear-gradient(to top, var(--primary-red) 0%, rgba(211, 16, 24, 0.7) 100%);
    opacity: 0.85;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.4s ease;
}

.premium-service-card:hover .card-content {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-yellow);
    opacity: 0.8;
}

.card-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 900;
}

.card-text p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0;
    max-height: 0;
    transition: all 0.4s ease;
    overflow: hidden;
}

.premium-service-card:hover .card-text p {
    opacity: 1;
    max-height: 100px;
    margin-bottom: 1.5rem;
}

.read-more {
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-yellow);
}

.premium-service-card:hover .read-more {
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #1B1B18;
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col {
    text-align: inherit;
}

.footer-col h4 {
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

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

.copyright {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid #333;
    color: #888;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(211, 16, 24, 0.4);
}

[dir="ltr"] .scroll-to-top { right: 30px; }
[dir="rtl"] .scroll-to-top { left: 30px; }

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-to-top:hover {
    background: #b00d14;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(211, 16, 24, 0.5);
}

/* ============================================
   RTL OVERRIDES
   ============================================ */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .service-card .badge {
    right: auto;
    left: 10px;
}

/* ============================================
   RESPONSIVE: TABLET (max-width: 991px)
   ============================================ */
@media (max-width: 991px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .premium-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .hero p {
        font-size: 1.1rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .why-sm-image > div:first-child {
        height: 350px !important;
    }

    /* Category page grid */
    .category-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Header: Hide desktop nav, show hamburger */
    .nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header {
        padding: 0.8rem 1rem;
    }

    /* Hero */
    .hero {
        height: 70vh;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .hero-btns .cta-button {
        width: 80%;
        text-align: center;
    }

    /* Services Grid */
    .premium-services-grid {
        grid-template-columns: 1fr;
    }

    .premium-service-card {
        height: 320px;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-text h3 {
        font-size: 1.4rem;
    }

    .card-icon {
        font-size: 2rem;
    }

    /* Section */
    .section {
        padding: 2.5rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    /* Why SM */
    .why-sm-image > div:first-child {
        height: 280px !important;
    }



    /* Contact Form */
    .contact-form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-col {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Scroll to Top */
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
    }

    [dir="ltr"] .scroll-to-top { right: 20px; }
    [dir="rtl"] .scroll-to-top { left: 20px; }

    /* Category page overrides */
    .category-grid {
        grid-template-columns: 1fr !important;
    }

    .category-grid > div:first-child div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .category-grid > div:first-child div[style*="grid-column"] {
        grid-column: span 1 !important;
    }
}

/* ============================================
   RESPONSIVE: SMALL PHONES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .hero {
        height: 65vh;
    }

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

    .hero p {
        font-size: 0.85rem;
    }

    .premium-service-card {
        height: 280px;
    }

    .card-text h3 {
        font-size: 1.2rem;
    }

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

    .footer-col h4 {
        font-size: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}

/* Dynamic Grid Layout for Pages */
.page-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

@media (max-width: 991px) {
    .page-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Fix for sticky headers covering anchor scroll targets */
[id] {
    scroll-margin-top: 85px;
}
