/* css/style.css - Complete styling like Instagram example */

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

:root {
    --color-white: #fff;
    --color-black: #1a1a1a;
    --color-gray: #4a4a4a;
    --color-light-gray: #f5f5f5;
    --color-border: #e0e0e0;
    --color-primary: #1a5f5f;
    --color-secondary: #0fb9b1;
    --color-accent: #34d399;
    --gradient-primary: linear-gradient(135deg, #0fb9b1, #34d399);
    --gradient-hover: linear-gradient(135deg, #34d399, #0fb9b1);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --border-radius: 4px;
    --border-radius-lg: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-black);
    line-height: 1.6;
    background: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* Header */
.header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo img {
    max-width: 150px;
    height: auto;
}

/* Language Selector */
.header__lang {
    position: relative;
}

.header__lang-btn {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 8px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
    transition: all 0.3s;
}

.header__lang-btn:hover {
    background: var(--color-light-gray);
}

.header__lang-btn::after {
    content: '';
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.3s;
}

.header__lang-btn.active::after {
    transform: rotate(180deg);
}

.header__lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 15px;
    z-index: 1000;
    margin-top: 10px;
}

.header__lang-menu.active {
    display: grid;
}

.header__lang-menu li {
    list-style: none;
    text-align: center;
}

.header__lang-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px;
    border-radius: var(--border-radius);
    transition: background 0.3s;
}

.header__lang-menu a:hover {
    background: var(--color-light-gray);
}

.header__lang-menu span {
    display: block;
    padding: 8px 12px;
    background: var(--color-light-gray);
    color: var(--color-black);
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--border-radius);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    padding: 60px 0;
    text-align: center;
    color: var(--color-white);
}

/* Page Tabs */
.page-tabs {
    margin-bottom: 40px;
}

.page-tabs__list {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 5px;
    list-style: none;
}

.page-tabs__item {
    margin: 0;
}

.page-tabs__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.page-tabs__link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.page-tabs__link.active {
    background: rgba(255, 255, 255, 0.3);
}

.page-tabs__link[disabled] {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.page-tabs__link img {
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 42px;
    font-weight: 300;
    margin: 30px 0;
    line-height: 1.2;
}

/* Download Form */
.download-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    padding: 0 20px;
}

.form-group {
    flex: 1;
    display: flex;
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.form-input {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 5px;
    padding: 5px;
}

.btn-paste,
.btn-clear {
    background: var(--color-light-gray);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--color-black);
    transition: background 0.3s;
}

.btn-paste:hover,
.btn-clear:hover {
    background: var(--color-border);
}

.btn-download {
    background: #fb015b;
    color: var(--color-white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0 40px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: var(--shadow-sm);
}

.btn-download:hover {
    background: #d1014b;
}

/* Search Results */
.search-results {
    margin-top: 40px;
    min-height: 100px;
}

/* Info Section */
.info-section {
    padding: 80px 0;
}

.info-section .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.info-content {
    flex: 1;
}

.info-content h2 {
    color: var(--color-primary);
    font-size: 36px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.2;
}

.info-content p {
    color: var(--color-gray);
    font-size: 18px;
    line-height: 1.8;
}

.info-image {
    flex-shrink: 0;
}

.info-image img {
    max-width: 324px;
    height: auto;
}

/* How-to Section */
.howto-section {
    padding: 60px 0;
    background: var(--color-light-gray);
}

.section-title {
    color: var(--color-primary);
    font-size: 36px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 50px;
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.howto-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.howto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.howto-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--color-white);
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.howto-card h3 {
    color: var(--color-primary);
    font-size: 20px;
    margin-bottom: 15px;
}

.howto-card p {
    color: var(--color-gray);
    font-size: 16px;
    line-height: 1.6;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

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

.feature-card {
    text-align: center;
    padding: 30px;
}

.feature-card h3 {
    color: var(--color-primary);
    font-size: 24px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--color-gray);
    font-size: 16px;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background: var(--color-light-gray);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--color-light-gray);
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--color-gray);
    font-size: 15px;
    line-height: 1.8;
}

/* App Section */
.app-section {
    padding: 60px 0;
    background: var(--gradient-primary);
    color: var(--color-white);
}

.app-section .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.app-content {
    flex: 1;
}

.app-content h2 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 20px;
}

.app-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-app {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-white);
    color: var(--color-primary);
    padding: 15px 40px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-app:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.app-image {
    flex-shrink: 0;
}

.app-image img {
    max-width: 100%;
    height: auto;
}

/* Footer */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 60px 0 30px;
    margin-top: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.footer-nav {
    margin-bottom: 40px;
}

.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu a {
    color: var(--color-text-muted, #999);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-menu a:hover {
    color: var(--color-white);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.footer-social a {
    color: var(--color-text-muted, #999);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-social a:hover {
    color: var(--color-white);
}

.footer-social img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0.8;
}

.footer-social a:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.footer-logo {
    text-align: center;
    margin-bottom: 30px;
}

.footer-logo img {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-logo img:hover {
    opacity: 1;
}

.footer-copyright {
    text-align: center;
    color: var(--color-text-muted, #999);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Menu icons */
.menu-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-menu a:hover .menu-icon {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-menu {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-menu a {
        font-size: 15px;
    }
    
    .footer-social {
        gap: 20px;
    }
    
    .footer-social img {
        width: 26px;
        height: 26px;
    }
    
    .footer-copyright {
        font-size: 13px;
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-social {
        gap: 15px;
    }
    
    .footer-social img {
        width: 24px;
        height: 24px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}

/* RTL Support */
[dir="rtl"] .header__lang-btn::after {
    margin-right: 8px;
    margin-left: 0;
}

[dir="rtl"] .faq-question {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
    
    .info-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .app-section .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
    
    .download-form {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    .btn-download {
        width: 100%;
        padding: 15px;
    }
    
    .page-tabs__list {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }
    
    .page-tabs__link span {
        display: none;
    }
    
    .howto-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }
    
    .info-content h2 {
        font-size: 28px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .header__nav {
        padding: 0 15px;
    }
    
    .header__lang-menu {
        min-width: 250px;
    }
}

/* Add to css/style.css */

/* Screen reader only - accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print styles for better printing */
@media print {
    .header, .footer, .hero-section, .app-section {
        display: none;
    }
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* ===== HEADER MENU STYLES ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: var(--menu-border-bottom, 1px solid rgba(0,0,0,0.1));
    height: 60px;
    display: flex;
    align-items: center;
    background-color: var(--menu-bg-color, #1a1a1a);
}

.header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.header__logo img {
    max-height: 35px;
    width: auto;
    object-fit: contain;
}

/* Main Menu */
.header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100%;
}

.header__menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.header__menu-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--menu-text-color, #fff);
}

.header__menu-link:hover {
    background-color: var(--menu-hover-bg-color, #333) !important;
    color: var(--menu-hover-text-color, #ff9900) !important;
}

.header__menu-item.active > .header__menu-link {
    background-color: var(--menu-active-bg-color, #2a2a2a) !important;
    color: var(--menu-active-text-color, #ff9900) !important;
}

/* Dropdown icon for items with children */
.header__menu-item.has-children > .header__menu-link::after {
    content: var(--dropdown-icon, "▼");
    font-size: var(--dropdown-icon-size, 10px);
    color: var(--dropdown-icon-color, #fff);
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.header__menu-item.has-children:hover > .header__menu-link::after {
    transform: rotate(180deg);
}

/* Submenu */
.header__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    min-width: 200px;
    background-color: var(--submenu-bg-color, #fff);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.header__menu-item:hover .header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__submenu-item {
    width: 100%;
}

.header__submenu-link {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    font-size: 13px;
    color: var(--submenu-text-color, #333);
    transition: all 0.2s;
}

.header__submenu-link:hover {
    background-color: var(--submenu-hover-bg, #f5f5f5) !important;
    color: var(--submenu-hover-text, #0066cc) !important;
}

.header__submenu-item.active .header__submenu-link {
    background-color: var(--submenu-hover-bg, #f0f0f0);
    color: var(--submenu-hover-text, #0066cc);
    font-weight: 600;
}

/* Right Side Elements */
.header__right {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* Language Selector */
.header__lang {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.header__lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--menu-text-color, #fff);
    height: 32px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.header__lang-btn:hover {
    background: rgba(255,255,255,0.1);
}

.header__lang-btn svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
}

/* Language Dropdown Menu */
.header__lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--submenu-bg-color, #fff);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 5px;
    border: 1px solid rgba(0,0,0,0.1);
}

.header__lang-menu.active {
    display: block;
}

.header__lang-menu li {
    list-style: none;
}

.header__lang-menu a {
    display: block;
    padding: 8px 15px;
    color: var(--submenu-text-color, #333);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.header__lang-menu a:hover {
    background-color: var(--submenu-hover-bg, #f5f5f5);
    color: var(--submenu-hover-text, #0066cc);
}

/* ===== MOBILE MENU STYLES ===== */

/* Mobile Menu Toggle Button */
.header__menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
    z-index: 1001;
    position: relative;
}

.header__menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--hamburger-color, #fff);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.header__menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Mobile Responsive - LTR (English) Default */
@media (max-width: 768px) {
    .header {
        height: 55px;
    }
    
    .header__nav {
        padding: 0 12px;
        position: relative;
    }
    
    /* Show hamburger on mobile */
    .header__menu-toggle {
        display: flex;
        order: 0;
        margin-right: 10px;
        margin-left: 0;
    }
    
    /* Center logo on mobile */
    .header__logo {
        order: 1;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
    
    .header__logo img {
        max-height: 30px;
    }
    
    /* Right side elements */
    .header__right {
        order: 2;
        margin-left: auto;
        margin-right: 0;
        z-index: 1;
    }
    
    /* Mobile Menu Panel - LTR (slide from left) */
    .header__menu {
        display: block;
        position: fixed;
        top: 55px;
        left: -100%;
        right: auto;
        width: 280px;
        height: calc(100vh - 55px);
        background-color: var(--mobile-menu-bg, #1a1a1a);
        flex-direction: column;
        padding: 20px 0;
        margin: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        border-right: 1px solid rgba(255,255,255,0.1);
        border-left: none;
    }
    
    /* When menu is active - LTR */
    .header__menu.active {
        left: 0;
        right: auto;
    }
    
    /* Menu Items */
    .header__menu-item {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .header__menu-link {
        width: 100%;
        height: 50px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--mobile-menu-text, #fff) !important;
        font-size: 15px;
        font-weight: 500;
        background: transparent;
        text-align: left;
    }
    
    .header__menu-link:hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* Active menu item in mobile */
    .header__menu-item.active > .header__menu-link {
        background-color: var(--menu-active-bg-color, #333) !important;
        color: var(--menu-active-text-color, #ff9900) !important;
    }
    
    /* Dropdown arrow for items with children - LTR */
    .header__menu-item.has-children > .header__menu-link::after {
        content: var(--dropdown-icon, "▼");
        font-size: 12px;
        transform: rotate(0deg);
        transition: transform 0.3s;
        margin-left: auto;
        margin-right: 0;
    }
    
    .header__menu-item.has-children.active > .header__menu-link::after {
        transform: rotate(180deg);
    }
    
    /* Submenu in mobile */
    .header__submenu {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0,0,0,0.2);
        padding: 0;
        margin: 0;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .header__menu-item.has-children.active .header__submenu {
        display: block;
        max-height: 500px;
    }
    
    .header__submenu-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .header__submenu-link {
        padding: 12px 30px;
        color: var(--mobile-menu-text, #fff) !important;
        font-size: 14px;
        opacity: 0.9;
        display: block;
        background: transparent;
        text-align: left;
    }
    
    .header__submenu-link:hover {
        background-color: rgba(255,255,255,0.1);
        opacity: 1;
    }
    
    /* Language selector dropdown in mobile */
    .header__lang-menu {
        position: fixed;
        top: 55px;
        right: 10px;
        left: auto;
        width: 200px;
        background: var(--mobile-menu-bg, #1a1a1a);
        border: 1px solid rgba(255,255,255,0.1);
        z-index: 1002;
    }
    
    .header__lang-menu a {
        color: var(--mobile-menu-text, #fff);
        text-align: left;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* RTL Mobile Styles - for Arabic, Hebrew etc. */
[dir="rtl"] .header__menu-toggle {
    margin-right: 0;
    margin-left: 10px;
}

@media (max-width: 768px) {
    /* RTL Mobile Menu - Slide from right */
    [dir="rtl"] .header__menu-toggle {
        order: 2;
        margin-left: 0;
        margin-right: auto;
    }
    
    [dir="rtl"] .header__logo {
        order: 1;
    }
    
    [dir="rtl"] .header__right {
        order: 0;
        margin-left: 0;
        margin-right: auto;
    }
    
    /* Mobile Menu Panel - RTL (slide from right) */
    [dir="rtl"] .header__menu {
        left: auto;
        right: -100%;
        border-right: none;
        border-left: 1px solid rgba(255,255,255,0.1);
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    }
    
    /* When menu is active - RTL */
    [dir="rtl"] .header__menu.active {
        left: auto;
        right: 0;
    }
    
    /* RTL Menu Items text alignment */
    [dir="rtl"] .header__menu-link {
        text-align: right;
        padding: 0 20px;
    }
    
    /* RTL Dropdown arrow */
    [dir="rtl"] .header__menu-item.has-children > .header__menu-link::after {
        margin-left: 0;
        margin-right: auto;
        transform: rotate(0deg);
    }
    
    /* RTL Submenu links */
    [dir="rtl"] .header__submenu-link {
        text-align: right;
        padding: 12px 30px;
    }
    
    /* RTL Language selector */
    [dir="rtl"] .header__lang-menu {
        right: auto;
        left: 10px;
    }
    
    [dir="rtl"] .header__lang-menu a {
        text-align: right;
    }
    
    /* RTL Menu overlay - same for both directions */
    [dir="rtl"] .menu-overlay {
        left: 0;
        right: 0;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .header__menu {
        width: 260px;
    }
    
    .header__menu-link {
        height: 45px;
        font-size: 14px;
    }
    
    .header__submenu-link {
        padding: 10px 25px;
        font-size: 13px;
    }
}


/* ===== LANGUAGE DROPDOWN FIXES ===== */

/* Remove duplicate arrow from language button */
.header__lang-btn::after {
    display: none !important;
    content: none !important;
}

/* Ensure flags align left in dropdown */
.header__lang-menu {
    text-align: left !important;
}

.header__lang-menu a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    text-align: left !important;
}

.header__lang-menu a img {
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

/* RTL support for dropdown */
[dir="rtl"] .header__lang-menu {
    text-align: right !important;
}

[dir="rtl"] .header__lang-menu a {
    justify-content: flex-end !important;
    text-align: right !important;
}

[dir="rtl"] .header__lang-menu a img {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* Ensure dropdown items are properly aligned */
.header__lang-menu li {
    width: 100% !important;
    list-style: none !important;
}


/* 404 Page Styles */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.error-content {
    max-width: 600px;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--color-primary, #1a5f5f);
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.2;
}

.error-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--color-black, #1a1a1a);
}

.error-message {
    font-size: 18px;
    color: var(--color-gray, #4a4a4a);
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-home {
    display: inline-block;
    padding: 12px 30px;
    background: var(--gradient-primary, linear-gradient(135deg, #0fb9b1, #34d399));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(15,185,177,0.3);
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: var(--color-primary, #1a5f5f);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--color-primary, #1a5f5f);
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--color-primary, #1a5f5f);
    color: white;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 80px;
    }
    .error-title {
        font-size: 24px;
    }
    .error-message {
        font-size: 16px;
    }
}


/* FAQ Section Styles */
.faq-section {
    padding: 60px 0;
    background: #f9fafb;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 20px;
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px 25px 25px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
    display: none;
    animation: slideDown 0.3s ease;
}

.faq-item.active .faq-answer {
    display: block;
}

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

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

[dir="rtl"] .faq-question span:first-child {
    padding-right: 0;
    padding-left: 20px;
}
/* ===== AD PLACEMENT STYLES ===== */
.ad-container {
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
}

.ad-container iframe {
    max-width: 100%;
    margin: 0 auto;
}

/* Header Ad */
.header-ad-wrapper {
    text-align: center;
    padding: 10px 0;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    transition: all 0.3s ease;
}

/* Footer Ad */
.footer-ad-wrapper {
    text-align: center;
    padding: 20px 0;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    margin-top: 30px;
}

/* Content Ads */
.content-ad-wrapper {
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.content-ad-wrapper:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Sticky Ad */
.sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    padding: 10px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-ad-close {
    position: absolute;
    top: -30px;
    right: 10px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.sticky-ad-close:hover {
    background: #ff4444;
    transform: scale(1.1);
}

/* Sidebar Ad (if you have sidebar) */
.sidebar-ad-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

/* AdSense specific styles */
ins.adsbygoogle {
    background: transparent;
    display: inline-block !important;
    text-decoration: none;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-container {
        margin: 0 auto;
    }
    
    .header-ad-wrapper {
        padding: 5px 0;
    }
    
    .content-ad-wrapper {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .sticky-ad {
        padding: 5px;
    }
    
    .sticky-ad-close {
        top: -25px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header-ad-wrapper,
    .footer-ad-wrapper,
    .content-ad-wrapper {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .content-ad-wrapper:hover {
        background: #333;
    }
}

/* Print styles */
@media print {
    .header-ad-wrapper,
    .footer-ad-wrapper,
    .content-ad-wrapper,
    .sticky-ad,
    .sidebar-ad-wrapper {
        display: none !important;
    }
}

.custom-page .page-section {
    width: 100%;
    transition: all 0.3s ease;
}

.custom-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.custom-page h1 { font-size: 42px; }
.custom-page h2 { font-size: 36px; }
.custom-page h3 { font-size: 30px; }
.custom-page h4 { font-size: 24px; }
.custom-page h5 { font-size: 20px; }
.custom-page h6 { font-size: 18px; }

.custom-page .text-content {
    line-height: 1.8;
}

.custom-page .custom-button {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.custom-page .custom-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.alert-info {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .custom-page .container {
        padding: 0 15px;
    }
    
    .custom-page h1 { font-size: 32px; }
    .custom-page h2 { font-size: 28px; }
    .custom-page h3 { font-size: 24px; }
}

/* Responsive styles */
@media (max-width: 768px) {
    .dynamic-page .container {
        padding: 20px 15px;
    }
    
    .dynamic-page h1 {
        font-size: 32px !important;
    }
    
    .dynamic-page h2 {
        font-size: 20px !important;
    }
    
    .dynamic-page .page-content {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .dynamic-page h1 {
        font-size: 28px !important;
    }
    
    .dynamic-page .featured-image img {
        max-height: 300px;
    }
}

/* Content styling */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
    color: #1e293b;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-content h2 { font-size: 32px; }
.page-content h3 { font-size: 24px; }
.page-content h4 { font-size: 20px; }

.page-content p {
    margin-bottom: 20px;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.page-content ul,
.page-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content blockquote {
    border-left: 4px solid #3b82f6;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8fafc;
    font-style: italic;
    color: #475569;
}

.page-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.page-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #3b82f6;
}

.page-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.page-content a:hover {
    color: #2563eb;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.page-content th,
.page-content td {
    border: 1px solid #e2e8f0;
    padding: 10px;
    text-align: left;
}

.page-content th {
    background: #f8fafc;
    font-weight: 600;
}
