:root {
    --primary-color: #000000;
    --secondary-color: #D4AF37;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: #f5f5f5;
    transition: all 0.3s ease-in-out;
}

/* Glass Navbar */
.glass-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 80px;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 80px;
    text-align: center;
}

.nav-links a::after {
    content: '';
    position: absolute;
    right: 0; left: 0; bottom: -2px;
    height: 2px;
    background: var(--secondary-color);
    width: 0;
    transition: width 0.3s cubic-bezier(.4,0,.2,1);
}

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

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    align-items: center;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.language-toggle.changing {
    pointer-events: none;
    opacity: 0.7;
}

.flag-icon {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.flag-icon:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.flag-icon.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Smooth content transitions */
body {
    transition: all 0.3s ease-in-out;
}

/* Content fade effect */
.content-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.content-transition.show {
    opacity: 1;
    transform: translateY(0);
}

/* RTL/LTR transition */
html[dir="rtl"] {
    transition: all 0.3s ease-in-out;
}

html[dir="ltr"] {
    transition: all 0.3s ease-in-out;
}

/* Enhanced product cards for language switching */
.product-card {
    transition: all 0.3s ease-in-out;
    min-height: 200px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Smooth text transitions */
h1, h2, h3, p, span {
    transition: all 0.3s ease-in-out;
    min-height: 1.2em;
}

/* Loading animation for content updates */
.content-loading {
    position: relative;
    overflow: hidden;
}

.content-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Prevent layout shifts during language changes */
.nav-links a {
    min-width: 80px;
    text-align: center;
}

.hero-content h1 {
    min-height: 2em;
}

.hero-content p {
    min-height: 1.5em;
}

/* Typewriter effect container */
#typewriter {
    min-height: 1.5em;
    display: inline-block;
    position: relative;
}

/* RTL Support for English */
body[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

body[dir="ltr"] .nav-links a::after {
    left: 0;
    right: auto;
}

body[dir="ltr"] .section-title::after {
    left: 0;
    right: auto;
}

/* Additional RTL/LTR support for language switching */
html[lang="en"] {
    direction: ltr;
}

html[lang="en"] body {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .nav-links {
    /* Remove flex-direction: row; to keep mobile centering */
}

html[lang="en"] .nav-links a::after {
    left: 0;
    right: auto;
}

html[lang="en"] .section-title::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

html[lang="en"] .hero-content {
    text-align: center;
}

html[lang="en"] .slider-btn.prev-btn i {
    transform: rotate(180deg);
}

html[lang="en"] .slider-btn.next-btn i {
    transform: rotate(180deg);
}

html[lang="en"] .product-card,
html[lang="en"] .partner-card,
html[lang="en"] .service-card {
    text-align: left;
}

html[lang="en"] .about-text {
    text-align: left;
}

html[lang="en"] .contact-info {
    text-align: left;
}

html[lang="en"] .info-item {
    text-align: left;
}

html[lang="en"] .info-item i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Persian (RTL) specific styles */
html[lang="fa"] {
    direction: rtl;
}

html[lang="fa"] body {
    direction: rtl;
    text-align: right;
}

html[lang="fa"] .nav-links a::after {
    right: 0;
    left: auto;
}

html[lang="fa"] .section-title::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

html[lang="fa"] .info-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1), filter 0.5s;
}

.slide img:hover {
    transform: scale(1.08);
    filter: blur(2px) brightness(0.95);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.hero-content p {
    font-size: 1.5rem;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 2;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.slider-btn:hover {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.slider-btn i {
    color: white;
    font-size: 1.5rem;
}

.slider-dots {
    display: flex;
    gap: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Products Section */
.products {
    padding: 5rem 2rem;
    background: white;
    background-image: url('../product wall.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.product-section {
    margin-bottom: 4rem;
}

.product-section:last-child {
    margin-bottom: 0;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--secondary-color);
}

.products::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.5);
    z-index: 0;
}

.products > * {
    position: relative;
    z-index: 1;
}

.products h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.product-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), color 0.3s;
}

.product-card:hover i {
    transform: scale(1.2) rotate(-8deg);
    color: var(--secondary-color);
}

.product-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-card .label {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Partners Section */
.partners {
    padding: 5rem 2rem;
    background: #f9f9f9;
    background-image: url('../wallpaperflare.com_wallpaper (9).jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.partners::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    z-index: 0;
}

.partners > * {
    position: relative;
    z-index: 1;
}

.partners h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.partner-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* About Us Section */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-text {
    margin-bottom: 40px;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.about-text h3 {
    font-size: 24px;
    color: #2c3e50;
    margin: 30px 0 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), color 0.3s;
}

.stat-item:hover i {
    transform: scale(1.2) rotate(-8deg);
    color: var(--secondary-color);
}

.stat-item h4 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 18px;
    color: #666;
}

/* Services Section */
.services {
    padding: 5rem 2rem;
    background: white;
    background-image: url('../Services.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.services::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.01);
    z-index: 0;
}

.services > * {
    position: relative;
    z-index: 1;
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    min-width: auto;
    margin-bottom: 1rem;
}

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

.service-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), color 0.3s;
}

.service-card:hover i {
    transform: scale(1.2) rotate(-8deg);
    color: var(--secondary-color);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: #f9f9f9;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.contact-info {
    max-width: 800px;
    margin: 2rem auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-item i {
    color: var(--secondary-color);
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), color 0.3s;
}

.info-item:hover i {
    transform: scale(1.2) rotate(-8deg);
    color: var(--secondary-color);
}

.map-container {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Social Media Icons in Contact Section */
.social-media-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-media-icons a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.social-media-icons img {
    width: 44px;
    height: 44px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.social-media-icons img:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        padding: 0.5rem;
        position: relative;
        align-items: center;
        justify-content: space-between;
    }

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

    .hamburger {
        display: flex;
        align-items: center;
        order: 3;
    }

    .logo {
        order: 1;
    }

    .logo img {
        height: 50px;
    }

    .nav-info {
        order: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0 0.5rem;
        font-size: 0.85rem;
        background: transparent;
        border: none;
    }

    .date, .language-toggle {
        text-align: center;
        white-space: nowrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
        z-index: 1000;
        text-align: center;
        align-items: center;
        justify-content: center;
        min-height: auto;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links a {
        padding: 0.8rem 1.5rem;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(212, 175, 55, 0.1);
        color: var(--secondary-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Center dropdown content in mobile */
    .nav-links .dropdown {
        width: 100%;
        text-align: center;
        max-width: 300px;
        margin: 0 auto;
    }

    .nav-links .dropdown-content {
        position: static;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        box-shadow: none;
        background: rgba(0,0,0,0.02);
        border-radius: 8px;
        margin-top: 0.5rem;
        display: none;
        flex-direction: column;
        align-items: center;
    }

    .nav-links .dropdown:hover .dropdown-content {
        display: flex;
    }

    .nav-links .dropdown-content a {
        padding: 0.6rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.03);
        text-align: center;
        width: 100%;
        max-width: none;
        margin: 0;
        transition: all 0.3s ease;
    }

    .nav-links .dropdown-content a:hover {
        background: rgba(212, 175, 55, 0.1);
        color: var(--secondary-color);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }

    .product-section {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }

    /* Mobile navigation centering for both languages - high specificity */
    html[lang="fa"] .nav-links,
    html[lang="en"] .nav-links {
        text-align: center !important;
        align-items: center !important;
        flex-direction: column !important;
    }

    html[lang="fa"] .nav-links a,
    html[lang="en"] .nav-links a {
        text-align: center !important;
        margin: 0 auto !important;
    }

    html[lang="fa"] .nav-links .dropdown,
    html[lang="en"] .nav-links .dropdown {
        text-align: center !important;
    }

    html[lang="fa"] .nav-links .dropdown-content,
    html[lang="en"] .nav-links .dropdown-content {
        position: static !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        background: rgba(0,0,0,0.02) !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    html[lang="fa"] .nav-links .dropdown:hover .dropdown-content,
    html[lang="en"] .nav-links .dropdown:hover .dropdown-content {
        display: flex !important;
    }

    html[lang="fa"] .nav-links .dropdown-content a,
    html[lang="en"] .nav-links .dropdown-content a {
        padding: 0.6rem 1rem !important;
        border-bottom: 1px solid rgba(0,0,0,0.03) !important;
        text-align: center !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        transition: all 0.3s ease !important;
    }

    html[lang="fa"] .nav-links .dropdown-content a:hover,
    html[lang="en"] .nav-links .dropdown-content a:hover {
        background: rgba(212, 175, 55, 0.1) !important;
        color: var(--secondary-color) !important;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 40px;
    }

    .nav-info {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .language-toggle {
        padding: 0.2rem;
        gap: 0.2rem;
        margin-top: -1px; /* Adjust for mobile alignment */
        transform: translateY(0); /* Reset transform for mobile */
    }

    .flag-icon {
        width: 36px;
        height: 24px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .product-grid, .partner-grid, .services-grid, .about-content, .footer-container {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .product-card, .partner-card, .service-card, .about-text, .about-stats, .footer-info, .footer-map {
        width: 100% !important;
        max-width: 100% !important;
    }

    .nav-links {
        padding: 0.5rem 0;
    }

    .nav-links a {
        padding: 0.7rem 1rem;
        max-width: 280px;
        font-size: 0.95rem;
    }

    .nav-links .dropdown {
        max-width: 280px;
    }

    .nav-links .dropdown-content {
        max-width: 280px;
        margin-top: 0.3rem;
    }

    .nav-links .dropdown-content a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    html[lang="fa"] .nav-links,
    html[lang="en"] .nav-links {
        padding: 0.5rem 0 !important;
    }

    html[lang="fa"] .nav-links a,
    html[lang="en"] .nav-links a {
        padding: 0.7rem 1rem !important;
        max-width: 280px !important;
        font-size: 0.95rem !important;
    }

    html[lang="fa"] .nav-links .dropdown,
    html[lang="en"] .nav-links .dropdown {
        max-width: 280px !important;
    }

    html[lang="fa"] .nav-links .dropdown-content,
    html[lang="en"] .nav-links .dropdown-content {
        max-width: 280px !important;
        margin-top: 0.3rem !important;
    }

    html[lang="fa"] .nav-links .dropdown-content a,
    html[lang="en"] .nav-links .dropdown-content a {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 360px) {
    html[lang="fa"] .nav-links a,
    html[lang="en"] .nav-links a {
        max-width: 260px !important;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }

    html[lang="fa"] .nav-links .dropdown,
    html[lang="en"] .nav-links .dropdown {
        max-width: 260px !important;
    }

    html[lang="fa"] .nav-links .dropdown-content,
    html[lang="en"] .nav-links .dropdown-content {
        max-width: 260px !important;
    }
}

html {
    scroll-padding-top: 110px;
}

/* Progress bar styles */
#progress-bar-container {
    position: fixed;
    top: 0; right: 0; left: 0;
    height: 4px;
    z-index: 2000;
    background: transparent;
}
#progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transition: width 0.2s cubic-bezier(.4,0,.2,1);
}

/* Animated underline on hover */
.hover-underline-animation {
  display: inline-block;
  position: relative;
  cursor: pointer;
}
.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}
.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.centered-title {
    text-align: center;
    display: block;
    width: 100%;
}

/* Footer Contact Section - Increased height */
.contact-footer {
    background: #111;
    color: #fff;
    padding: 4.5rem 2rem 2.5rem 2rem; /* Increased top and bottom padding */
    direction: rtl;
    font-size: 0.85rem;
}
.footer-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}
.footer-info {
    flex: 1 1 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.footer-info h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem; /* Smaller heading */
}
.contact-info {
    max-width: 900px; /* Wider box for single-line info */
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: center;
    font-size: 0.95em;
    line-height: 1.4; /* Less line spacing */
}
.info-item {
    background: transparent;
    color: #fff;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap; /* Prevent line break */
}
.info-item i {
    color: var(--secondary-color);
    font-size: 1em;
}
.footer-map {
    flex: 1 1 350px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}
.map-container {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
@media (max-width: 1200px) {
    .contact-info {
        max-width: 100%;
        gap: 1.2rem;
    }
}
@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
    }
    .footer-map, .footer-info {
        width: 100%;
        max-width: 100%;
    }
    .map-container {
        max-width: 100%;
        height: 220px;
    }
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .info-item {
        white-space: normal;
    }
}

/* Shrinked Navbar on Scroll */
.glass-navbar.scrolled {
    height: 60px;
    transition: height 0.3s, background 0.3s;
}
.glass-navbar .logo img {
    transition: height 0.3s;
}
.glass-navbar.scrolled .logo img {
    height: 40px;
}
.glass-navbar .nav-links a, .glass-navbar .nav-info {
    transition: font-size 0.3s;
}
.glass-navbar.scrolled .nav-links a, .glass-navbar.scrolled .nav-info {
    font-size: 0.7rem;
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .product-grid, .partner-grid, .services-grid, .about-content, .footer-container {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .product-card, .partner-card, .service-card, .about-text, .about-stats, .footer-info, .footer-map {
    width: 100% !important;
    max-width: 100% !important;
  }
  .logo img {
    height: 50px;
  }
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1001;
    backdrop-filter: blur(10px);
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.dropdown-content a {
    color: var(--primary-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: right;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        background: transparent;
        box-shadow: none;
        margin-top: 0;
        padding: 0 1rem;
    }
    
    .dropdown-content a {
        padding: 0.8rem 1.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
}

#dye-products .product-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}

#dye-products .product-card {
    min-width: 550px;
}

@media (max-width: 1200px) {
    #dye-products .product-grid {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    #dye-products .product-card {
        min-width: auto;
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    .service-card {
        min-width: auto;
    }
}

.date, .language-toggle {
    text-align: center;
    white-space: nowrap;
}

.language-toggle {
    padding: 0.3rem;
    gap: 0.3rem;
}

.flag-icon {
    width: 36px;
    height: 24px;
}

/* Language change loading indicator */
.language-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    opacity: 0;
}

.language-toggle.changing::before {
    left: 100%;
    opacity: 1;
    animation: language-change-shimmer 1s ease-in-out;
}

@keyframes language-change-shimmer {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Prevent text selection during language change */
.language-toggle.changing {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Smooth flag transitions */
.flag-icon {
    transition: all 0.3s ease, transform 0.2s ease;
}

.flag-icon:active {
    transform: scale(0.95);
}

/* Enhanced loading animation for content updates */
.content-loading {
    position: relative;
    overflow: hidden;
}

.content-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
    pointer-events: none;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
} 