/*
Theme Name: Golden Chemicals WebSite
Description: Modern WordPress theme for chemical and cleaning products company.
Author: Mr-TITO
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Golden Chemical Company
Tags: business, chemical, industrial, rtl-language-support, custom-post-types, responsive-layout, accessibility-ready
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4

This theme is designed specifically for chemical companies and industrial businesses.
It includes custom post types for products and services, contact forms, and full RTL support.
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Color Scheme - Professional and Calming */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4a90e2;
    --accent-color: #28a745;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn, .mobile-lang-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-btn:hover, .mobile-lang-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.lang-btn.active, .mobile-lang-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.mobile-language-switcher {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.mobile-language-switcher h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.mobile-lang-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.mobile-lang-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

/* Desktop Language Switcher */
.desktop-lang {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .desktop-lang {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-language-switcher {
        display: none;
    }
}

/* Header Styles - Enhanced for Mobile */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

/* Desktop Navigation - Always visible on desktop */
.desktop-nav {
    display: block;
}

.desktop-lang {
    display: flex;
}

/* Mobile Menu Toggle Button - Hidden on desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--bg-light);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.mobile-nav-content {
    background: var(--bg-white);
    min-height: 100%;
    padding: 2rem;
}

.mobile-menu {
    margin-bottom: 2rem;
}

/* Enhanced Mobile Menu Styling */
.mobile-primary-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-primary-menu li {
    margin-bottom: 1rem !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border: none !important;
}

.mobile-primary-menu li:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    transform: translateX(8px) scale(1.02) !important;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3) !important;
}

.mobile-primary-menu li:last-child {
    margin-bottom: 0 !important;
}

.mobile-primary-menu a {
    display: flex !important;
    align-items: center !important;
    padding: 1.5rem 2rem !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    transition: all 0.4s ease !important;
    border: none !important;
    position: relative !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.mobile-primary-menu li:hover a {
    color: white !important;
    text-decoration: none !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

.mobile-primary-menu a:before {
    content: '🔸' !important;
    margin-right: 1rem !important;
    font-size: 1.3rem !important;
    opacity: 0 !important;
    transition: all 0.4s ease !important;
    transform: translateX(-10px) !important;
}

.mobile-primary-menu li:hover a:before {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Remove any default link styling */
.mobile-primary-menu a:link,
.mobile-primary-menu a:visited,
.mobile-primary-menu a:active {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
}

/* Mobile Language Switcher */
.mobile-language-switcher {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.mobile-language-switcher h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.mobile-lang-buttons {
    display: flex;
    gap: 1rem;
}

.mobile-lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-lang-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Mobile Contact Info */
.mobile-contact-info {
    padding: 1.5rem;
    background: var(--accent-color);
    border-radius: 10px;
    color: white;
}

.mobile-contact-info h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

.mobile-contact-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.mobile-contact-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* Desktop Navigation Styles */
.main-nav ul,
.primary-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.main-nav a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Tablet Header Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .desktop-nav {
        display: block !important;
    }
    
    .desktop-lang {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    /* Tablet navigation adjustments */
    .main-nav ul,
    .primary-menu {
        gap: 1.5rem;
    }
    
    .main-nav a {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Tablet Hero Section */
    .hero-section {
        padding: 7rem 2rem 4rem;
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Tablet Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Tablet Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-image i {
        font-size: 3.5rem;
    }
    
    /* Tablet Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Desktop Header Styles */
@media (min-width: 1025px) {
    .desktop-nav {
        display: block !important;
    }
    
    .desktop-lang {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.lang-btn:hover {
    background: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 80px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Services Section */
.services-section {
    padding: 4rem 2rem;
    background: var(--bg-white);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

/* Products Section */
.products-section {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 300px));
    gap: 2rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-light);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-button {
    background: var(--primary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.product-button:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
}

.product-button:visited {
    color: white;
    text-decoration: none;
}

.product-button:focus {
    color: white;
    text-decoration: none;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Contact Section */
.contact-section {
    padding: 4rem 2rem;
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #218838;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #495057;
    margin-top: 2rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 1rem !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .desktop-nav,
    .desktop-lang {
        display: none !important;
    }
    
    .logo {
        font-size: 1.5rem !important;
    }
    
    .hero-section {
        padding: 6rem 1rem 3rem;
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-image i {
        font-size: 3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 120px;
    height: 120px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: logoFloat 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.loading-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: logoShine 3s ease-in-out infinite;
}

.loading-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    animation: logoPulse 1.5s ease-in-out infinite;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: center;
    animation: textFade 2s ease-in-out infinite;
}

.loading-spinner {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: spinnerBounce 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), white, var(--accent-color));
    border-radius: 2px;
    animation: progressMove 2s ease-in-out infinite;
    width: 0%;
}

/* Loading Animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) translateY(200%) rotate(45deg);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes spinnerBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes progressMove {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 100%;
        transform: translateX(0%);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

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

[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .main-nav ul {
    flex-direction: row-reverse;
}
