/* Modern Redesign CSS for Inner Pages */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Cairo:wght@300;400;600;700;800&display=swap');

/* ========== Base Reset ========== */
.modern-page {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: #2d3138;
    background: url('../../uploads/slider-1.png') center/cover fixed no-repeat;
    overflow-x: hidden;
    min-height: 100vh;
}

.modern-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(12,92,168,0.85) 0%, rgba(41,128,185,0.85) 40%, rgba(63,169,245,0.85) 100%);
    z-index: -1;
    pointer-events: none;
}

[dir="rtl"] .modern-page {
    font-family: 'Cairo', sans-serif;
}

/* ========== Floating Header ========== */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(12,92,168,0.06);
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDownHeader 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(-100%);
}

@keyframes slideDownHeader {
    to { opacity: 1; transform: translateY(0); }
}

.modern-header .header-logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.modern-header .header-logo img:hover {
    transform: scale(1.05);
}

.modern-header .header-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Header Language Toggle */
.header-lang-toggle {
    display: inline-flex;
    direction: ltr !important;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(12,92,168,0.12);
    border-radius: 25px;
    padding: 3px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.header-lang-toggle span {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    border-radius: 20px;
    z-index: 2;
    position: relative;
    transition: color 0.3s ease;
}

.header-lang-toggle .lang-pill {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 3px);
    background: linear-gradient(135deg, #0c5ca8, #3fa9f5);
    border-radius: 20px;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: 0 2px 8px rgba(12,92,168,0.25);
}

.header-lang-toggle.active-en .btn-en { color: #fff; }
.header-lang-toggle.active-ar .btn-ar { color: #fff; }
.header-lang-toggle.active-ar .lang-pill { transform: translateX(100%); }

/* ========== Hero Banner ========== */
.modern-hero {
    position: relative;
    padding: 140px 40px 60px;
    background: transparent;
    overflow: hidden;
    animation: heroFadeIn 0.8s ease forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    to { opacity: 1; }
}

.modern-hero::before {
    display: none;
}

.modern-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.modern-hero h1 {
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 12px 0;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.2s forwards;
}

.modern-hero .hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.4s forwards;
}

.modern-hero .hero-breadcrumb a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.modern-hero .hero-breadcrumb a:hover { color: #ffffff; }
.modern-hero .hero-breadcrumb .separator { margin: 0 4px; }

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

/* ========== Content Section ========== */
.modern-content {
    max-width: 1000px;
    margin: -20px auto 60px;
    padding: 50px 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: contentSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes contentSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.modern-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0c5ca8;
    margin: 0 0 25px 0;
    position: relative;
    padding-bottom: 15px;
}

.modern-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0c5ca8, #3fa9f5);
    border-radius: 3px;
}

[dir="rtl"] .modern-content h2::after {
    left: auto;
    right: 0;
}

.modern-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin: 0 0 18px 0;
}

/* ========== Contact Form ========== */
.modern-form-group {
    margin-bottom: 20px;
}

.modern-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3138;
    margin-bottom: 8px;
}

.modern-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafd;
    color: #2d3138;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.modern-input:focus {
    border-color: #3fa9f5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(63,169,245,0.1);
}

.modern-textarea {
    min-height: 120px;
    resize: vertical;
}

.modern-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #0c5ca8, #3fa9f5);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(12,92,168,0.25);
}

.modern-btn:active {
    transform: translateY(0);
}

/* ========== Product / News Cards Grid ========== */
.modern-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.modern-card-item {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards;
}

.modern-card-item:nth-child(1) { animation-delay: 0.1s; }
.modern-card-item:nth-child(2) { animation-delay: 0.2s; }
.modern-card-item:nth-child(3) { animation-delay: 0.3s; }
.modern-card-item:nth-child(4) { animation-delay: 0.4s; }
.modern-card-item:nth-child(5) { animation-delay: 0.5s; }
.modern-card-item:nth-child(6) { animation-delay: 0.6s; }

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

.modern-card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    border-color: rgba(12,92,168,0.12);
}

.modern-card-item .card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-card-item:hover .card-img {
    transform: scale(1.05);
}

.modern-card-item .card-img-wrap {
    overflow: hidden;
}

.modern-card-item .card-body {
    padding: 20px;
}

.modern-card-item .card-body h4 {
    font-size: 17px;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 8px 0;
}

.modern-card-item .card-body p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

/* ========== Contact Info Grid ========== */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-info-card {
    background: linear-gradient(135deg, rgba(12,92,168,0.04), rgba(63,169,245,0.04));
    border: 1px solid rgba(12,92,168,0.08);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(12,92,168,0.06);
}

.contact-info-card .info-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0c5ca8, #3fa9f5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-info-card .info-text h5 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3138;
    margin: 0 0 5px;
}

.contact-info-card .info-text p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.4;
}

.contact-info-card .info-text a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-card .info-text a:hover {
    color: #0c5ca8;
}

/* ========== Modern Footer ========== */
.modern-footer {
    text-align: center;
    padding: 35px 20px;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

.modern-footer p {
    font-size: 13px;
    color: #95a5a6;
    margin: 0;
}

.modern-footer a {
    color: #0c5ca8;
    text-decoration: none;
    font-weight: 500;
}

/* ========== Google Map ========== */
.modern-map iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 16px;
    margin-top: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .modern-header { padding: 10px 15px; }
    .modern-header .header-logo img { height: 35px; }
    .modern-hero { padding: 100px 20px 110px; }
    .modern-hero h1 { font-size: 26px; }
    .modern-content { margin: -10px 15px 40px; padding: 30px 25px; }
    .modern-cards-grid { grid-template-columns: 1fr; }
    .contact-info-grid { grid-template-columns: 1fr; }
    
    /* Product Pages */
    .product-detail-container { gap: 20px !important; }
    .product-image-box { flex: 1 1 100% !important; padding: 10px !important; }
    
    /* Socials - Moved to very bottom of page (not floating) on mobile */
    .floating-socials { 
        position: static !important;
        transform: none !important;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        background: #fff;
        padding: 0 0 35px 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
    [dir="rtl"] .floating-socials { 
        right: auto; 
        left: auto; 
        transform: none; 
    }
    .floating-socials a { width: 45px; height: 45px; font-size: 22px; }
    
    .modern-footer { padding-bottom: 20px; border-bottom: none; }
    
    /* Lang Toggle */
    .header-lang-toggle span { padding: 5px 10px; font-size: 11px; }
}

/*
 * NOTE: Every page using modern-redesign.css should also include:
 * <script src="[relative path]/public/web/js/page-transition.js"></script>
 * before </body> to get the inter-page logo transition animation.
 */

/* ========== Modern Navigation ========== */
.modern-nav {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.modern-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.modern-nav-list > li {
    position: relative;
    padding: 10px 0;
}

.modern-nav-list a {
    text-decoration: none;
    color: #2d3138;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modern-nav-list a:hover {
    color: #0c5ca8;
}

.modern-nav-list .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #eef2f7;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.modern-nav-list li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modern-nav-list .dropdown-menu li {
    position: relative;
}

.modern-nav-list .dropdown-menu a {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    display: block;
}

.modern-nav-list .dropdown-menu a:hover {
    background: #f8fafd;
    color: #0c5ca8;
}

/* RTL Support */
[dir="rtl"] .modern-nav-list .dropdown-menu {
    left: auto;
    right: 0;
}

/* Submenu */
.modern-nav-list .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
}

[dir="rtl"] .modern-nav-list .dropdown-submenu .dropdown-menu {
    left: auto;
    right: 100%;
}

/* Mobile Menu Hide / Drawer */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #0c5ca8;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0 10px;
}

@media (max-width: 991px) {
    .mobile-menu-btn { display: block; }
    
    .modern-nav {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        box-shadow: 2px 0 15px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    .modern-nav.active { left: 0; }
    
    [dir="rtl"] .modern-nav {
        left: auto;
        right: -100%;
        transition: right 0.3s ease;
        box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    }
    [dir="rtl"] .modern-nav.active { right: 0; left: auto; }

    .modern-nav-list { flex-direction: column; width: 100%; align-items: flex-start; }
    .modern-nav-list > li { width: 100%; border-bottom: 1px solid #f0f0f0; padding: 0; }
    .modern-nav-list > li > a { padding: 15px 20px; width: 100%; justify-content: space-between; }
    
    .modern-nav-list .dropdown-menu {
        position: static; box-shadow: none; border: none; background: #f8fafd;
        opacity: 1; visibility: visible; transform: none; width: 100%;
        border-radius: 0; display: none;
    }
    
    .modern-nav-list li.mob-open > .dropdown-menu { display: block; }
    
    .modern-nav-list .dropdown-submenu .dropdown-menu { padding-left: 15px; }
    [dir="rtl"] .modern-nav-list .dropdown-submenu .dropdown-menu { padding-left: 0; padding-right: 15px; }
}

/* Floating Socials */
.floating-socials {
  position: fixed;
  top: 50%;
  left: 20px; /* Using left for Arabic, maybe right for English? Let's use right 20px for EN, left 20px for AR? Or just fixed right. */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
}
.floating-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.floating-socials a:hover {
  transform: scale(1.1);
  color: white;
}
.social-x { background-color: #000000; }
.social-fb { background-color: #1877F2; }
.social-wa { background-color: #25D366; }

/* ========== Splash Screen Preloader (New Design) ========== */
.mh-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff; /* Clean white */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(150% at 50% 50%);
    transition: clip-path 0.9s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.9s ease;
}

.mh-splash-screen.splash-exit {
    clip-path: circle(0% at 50% 50%);
    opacity: 0;
}

.mh-splash-content-new {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh-splash-logo-new {
    height: 90px;
    z-index: 10;
    opacity: 0;
    animation: logoPopIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    filter: drop-shadow(0 15px 30px rgba(12, 92, 168, 0.15));
}

@keyframes logoPopIn {
    0% { transform: scale(0.6); opacity: 0; filter: blur(5px); }
    100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

.ripple-circle {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 92, 168, 0.15) 0%, rgba(63, 169, 245, 0.05) 70%);
    z-index: 1;
    opacity: 0;
    animation: rippleAnim 1.6s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
}

.ripple-circle.delay {
    animation-delay: 0.8s;
}

@keyframes rippleAnim {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.8); opacity: 0; }
}

