/* css/global.css */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.75rem;
    border-radius: 50px;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: #FABD02;
    color: #000000;
}

.btn-primary:hover {
    background-color: #e5aa02;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 189, 2, 0.3);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.section-placeholder {
    padding: var(--spacing-xl) var(--container-padding);
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--color-background-alt) 0%, var(--color-background) 100%);
    position: relative;
    overflow: hidden;
}

.section-placeholder::before {
    content: '';
    position: absolute;
    width: 150vw;
    height: 150vw;
    background: radial-gradient(circle, rgba(0,0,0,0.02) 0%, transparent 50%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s infinite alternate;
}

.placeholder-content {
    background-color: var(--color-background);
    padding: var(--spacing-lg);
    
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.placeholder-logo {
    display: block;
    margin: 0 auto var(--spacing-md) auto;
    max-width: 100%;
    height: auto;
}

.section-placeholder h1 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.section-placeholder p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

/* Catalog Modal */
.catalog-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.catalog-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-modal-content {
    background-color: #fff;
    width: 95%;
    max-width: 1400px;
    height: 95vh;
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.catalog-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.catalog-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
}

.catalog-actions {
    display: flex;
    gap: 15px;
    margin-right: 40px;
}

.catalog-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #EF7819;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s;
}

.catalog-action-btn:hover {
    background: #d66a15;
}

.catalog-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.catalog-close:hover {
    color: #333;
}

.catalog-iframe-container {
    flex-grow: 1;
    width: 100%;
    background: #f5f5f5;
}

.catalog-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 600px) {
    .catalog-modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
    
    .catalog-modal-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .catalog-modal-header h2 {
        font-size: 1.1rem;
        padding-right: 35px;
    }
    
    .catalog-actions {
        margin-right: 0;
        width: 100%;
        gap: 8px;
    }
    
    .catalog-action-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
/* Category Navigation Bar */
.category-nav-bar {
    background-color: transparent;
    padding: 40px 0 20px 0;
}
.category-nav-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.category-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 150px;
    text-align: center;
    transition: transform 0.3s;
}
.category-nav-item:hover {
    transform: translateY(-5px);
}
.category-nav-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    
    margin-bottom: 15px;
    mix-blend-mode: multiply;
}
.category-nav-item span {
    font-family: var(--font-primary, 'Barlow', sans-serif);
    font-weight: 600;
    color: #212121;
    font-size: 15px;
}
@media (max-width: 768px) {
    .category-nav-grid {
        gap: 15px;
    }
    .category-nav-item {
        width: 120px;
    }
    .category-nav-item img {
        width: 70px;
        height: 70px;
    }
}

/* RTL Language Support (Arabic) */
html.rtl-lang {
    direction: rtl;
}

html.rtl-lang .main-navigation .nav-list {
    flex-direction: row-reverse;
}

html.rtl-lang .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

html.rtl-lang .footer-container {
    flex-direction: row-reverse;
}

/* Flipping header image for RTL (Arabic) */
html.rtl-lang .page-header {
    transform: scaleX(-1);
}
html.rtl-lang .page-header > .container {
    transform: scaleX(-1);
}

/* RTL Text alignment fixes */
html.rtl-lang body, html.rtl-lang p, html.rtl-lang h1, html.rtl-lang h2, html.rtl-lang h3, html.rtl-lang .product-card-title, html.rtl-lang .page-header-subtitle, html.rtl-lang .about-text {
    text-align: right !important;
}
html.rtl-lang .category-nav-item span {
    text-align: right !important;
}


/* RTL Dropdown arrow fix for mobile */
@media (max-width: 768px) {
    html.rtl-lang .nav-link::after {
        margin-left: 0;
        margin-right: auto;
    }
}


/* RTL Fixes for the new Premium Mobile Menu */
@media (max-width: 768px) {
    html.rtl-lang .nav-link::after {
        margin-left: 0;
        margin-right: auto;
    }
    
    html.rtl-lang .dropdown-link {
        text-align: right;
        padding: 14px 20px 14px 20px;
        border-left: none;
        border-right: 3px solid transparent;
    }
    
    html.rtl-lang .dropdown-link:hover, 
    html.rtl-lang .dropdown-link:active {
        padding-left: 20px;
        padding-right: 20px;
        border-left: none;
        border-right: 3px solid #EF7819;
    }
    
    html.rtl-lang .has-dropdown-submenu > .dropdown-submenu {
        border-left: none;
        border-right: 1px solid #eeeeee;
        margin-left: 0;
        margin-right: 15px;
    }
    
    html.rtl-lang .has-dropdown-submenu > .dropdown-link::after {
        float: left;
    }
    
    html.rtl-lang .has-dropdown-submenu > .dropdown-submenu .dropdown-link {
        padding-left: 15px;
        padding-right: 20px;
        border-right: none;
    }
    
    html.rtl-lang .has-dropdown-submenu > .dropdown-submenu .dropdown-link:hover,
    html.rtl-lang .has-dropdown-submenu > .dropdown-submenu .dropdown-link:active {
        padding-left: 15px;
        padding-right: 20px;
    }
}

/* Brochure Modal */
#brochure-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.brochure-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.brochure-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    background: #fff;
    border-radius: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.brochure-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #AA182C;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
}

#brochure-iframe {
    width: 100%;
    flex: 1;
}

.brochure-modal-actions {
    padding: 15px;
    background: #f8f8f8;
    text-align: center;
    border-top: 1px solid #ddd;
}

/* User requested specific titles */
.home-about-title,
.home-facilities-title,
.home-portfolio-title,
.home-crops-title,
.about-rd-title,
.about-biotech-title,
.about-departments-title,
.timeline-title,
.values-main-title,
.crops-grid-title {
    font-family: "Barlow", sans-serif !important;
    font-size: 60px !important;
}
