/* =============================================
   CSS Variables
   ============================================= */
:root {
    --primary:        #2563eb;
    --primary-dark:   #1d4ed8;
    --primary-light:  #eff6ff;
    --secondary:      #1e293b;
    --text:           #334155;
    --text-light:     #64748b;
    --bg:             #f8fafc;
    --bg-alt:         #ffffff;
    --border:         #e2e8f0;
    --white:          #ffffff;
    --shadow:         0 8px 30px rgba(0, 0, 0, 0.08);

    --font:           'Rubik', sans-serif;

    --header-h:       70px;
    --section-py:     30px;
    --container-px:   24px;
    --content-gap:    60px;
    --radius:         12px;

    --fs-h1:    2.75rem;
    --fs-h2:    2rem;
    --fs-h3:    1.5rem;
    --fs-body:  1.0625rem;
    --fs-small: 0.875rem;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: var(--fs-body);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.75;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul  { list-style: none; }
a   { text-decoration: none; color: inherit; }

/* =============================================
   Container
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-px);
    width: 100%;
}

/* =============================================
   Header
   ============================================= */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-h);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.main-nav ul {
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary);
    padding: 4px 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.25s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a:hover::after {
    width: 100%;
}

/* Hamburger button (hidden on desktop) */
.nav-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
}

.nav-toggle-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--secondary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =============================================
   Sections — Base
   ============================================= */
.section {
    padding: var(--section-py) 0;
}

.section:nth-child(odd)  { background-color: var(--bg); }
.section:nth-child(even) { background-color: var(--bg-alt); }

.section-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}

.section-content {
    font-size: var(--fs-body);
    color: var(--text-light);
    line-height: 1.9;
}

/* =============================================
   Warning Section
   ============================================= */
@keyframes warning-spin {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(20deg); }
    30%  { transform: rotate(-20deg); }
    45%  { transform: rotate(12deg); }
    60%  { transform: rotate(-12deg); }
    75%  { transform: rotate(6deg); }
    100% { transform: rotate(0deg); }
}

.warning-section {
    background-color: #fbbf24 !important;
    padding: 5px !important;
}

.warning-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.warning-icon {
    font-size: 2rem;
    display: inline-block;
    animation: warning-spin 2.5s ease-in-out infinite;
    flex-shrink: 0;
    line-height: 1;
}

.warning-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: #000000;
    line-height: 1.4;
    margin: 0;
}

/* =============================================
   Text-Only Section
   ============================================= */
.text-section {
    text-align: center;
}

.text-section .section-content {
    max-width: 700px;
    margin: 0 auto;
}

/* =============================================
   Content Row — Text + Media (shared)
   ============================================= */
.content-row {
    display: flex;
    align-items: center;
    gap: var(--content-gap);
}

.content-text {
    flex: 1;
    min-width: 0;
}

.content-media {
    flex: 1;
    min-width: 0;
}

/* =============================================
   Text + Image Section
   ============================================= */
.text-image-section .content-media img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    min-height: 280px;
    background-color: var(--border); /* fallback if image missing */
}

/* =============================================
   Text + Video Section
   ============================================= */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background-color: var(--secondary);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
    background-color: var(--secondary);
    padding: 40px 0;
}

.footer-inner {
    text-align: center;
}

.footer-copy {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.6);
}

.footer-version {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    letter-spacing: 0.04em;
}

/* =============================================
   Responsive — Mobile (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
    :root {
        --header-h:   60px;
        --section-py: 30px;
        --content-gap: 28px;
        --container-px: 16px;

        --fs-h1:   1.875rem;
        --fs-h2:   1.2rem;
        --fs-h3:   1.2rem;
        --fs-body: 0.9375rem;
    }

    /* Hamburger visible, nav hidden by default */
    .nav-toggle-btn {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        right: 0;
        left: 0;
        background-color: var(--white);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
        z-index: 999;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 14px var(--container-px);
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a::after {
        display: none;
    }

    /* Stack content rows vertically — text always on top */
    .content-row {
        flex-direction: column;
    }

    .content-text {
        order: 1;
        width: 100%;
    }

    .content-media {
        order: 2;
        width: 100%;
    }

    .text-image-section .content-media img {
        min-height: 220px;
    }
}
