/* ========== Variables & base ========== */
:root {
    --primary-brown: #5d4037;
    --ocean-blue: #3498db;
    --sand-bg: #fdf5e6;
    --text-dark: #2c3e50;
    --white: #ffffff;
    --success-green: #27ae60;
    --warning-red: #e74c3c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-color: var(--sand-bg);
    color: var(--text-dark);
    font-family: 'Assistant', sans-serif;
    line-height: 1.8;
    margin: 0;
}

/* Hebrew/RTL: default alignment right; centered elements override below */
[dir="rtl"] {
    text-align: right;
}

/* ========== Layout ========== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Nav: supports both legacy (nav > a) and new (.nav-menu) structure */
nav {
    width: 100%;
    background-color: var(--primary-brown);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-width: 100%;
    box-sizing: border-box;
    right: 0;
    /*    height: 100px; */
    z-index: 1000;
}

/* New responsive nav: toggle and menu list */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.nav-toggle-label {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    color: #fdf5e6;
    background: transparent;
    border: none;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 3px;
    /* This is now the middle line */
    background: currentColor;
    position: relative;
    border-radius: 2px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
}

/* Position the outer lines away from the center line */
.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1px;
}

.nav-menu a,
nav>a {
    color: #fdf5e6;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    transition: color 0.3s, border-bottom 0.3s;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
nav>a:hover {
    color: #f1c40f;
    border-bottom: 2px solid #f1c40f;
}

/* הגדרת מיקום יחסי כדי שתפריט המשנה ייצמד לאבא שלו */
.has-submenu {
    position: relative;
}

/* עיצוב תפריט המשנה בנייח */
.nav-submenu {
    display: none;
    /* מוסתר כברירת מחדל */
    position: absolute;
    top: 100%;
    /* מופיע בדיוק מתחת ללינק */
    right: 0;
    background-color: var(--primary-brown);
    list-style: none;
    padding: 10px 0;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 10px 10px;
    z-index: 1000;
}

/* עיצוב הלינקים בתוך תפריט המשנה */
.nav-submenu li {
    width: 100%;
}

.nav-submenu li a {
    font-size: 18px !important;
    /* קטן מעט מהתפריט הראשי */
    padding: 10px 20px !important;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-submenu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* הצגה במעבר עכבר (Hover) */
.has-submenu:hover .nav-submenu {
    display: block;
}

/* Mobile: hamburger menu - hamburger on the right (RTL) */
/* Submenu Toggle (Checkbox Hack) */
.submenu-checkbox {
    display: none;
}

.submenu-label {
    display: none;
}

/* ========== Mobile Media Query (960px) ========== */
@media (max-width: 960px) {

    body {
        padding-top: 0;
    }

    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: relative;
        height: auto;
    }

    /* כותרת האתר ממורכזת - מבוסס על הקובץ שלך */
    nav::after {
        content: "מצלמת חוף בת ים";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        color: var(--sand-bg);
        font-size: 24px;
        font-weight: 700;
        white-space: nowrap;
        pointer-events: none;
    }

    /* ההמבורגר והכיתוב "תפריט" - כפי שביקשת */
    .nav-toggle-label {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        z-index: 101;
        width: auto;
    }

    .nav-toggle-label::before {
        content: "תפריט";
        font-size: 14px;
        font-weight: 700;
        color: var(--sand-bg);
    }

    /* אייקון המבורגר 3 קווים תקין */
    .nav-toggle-icon {
        display: block;
        width: 24px;
        height: 3px;
        background: currentColor;
        position: relative;
        border-radius: 2px;
        flex-shrink: 0;
    }

    .nav-toggle-icon::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 3px;
        background: currentColor;
        border-radius: 2px;
        top: -8px;
    }

    .nav-toggle-icon::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 3px;
        background: currentColor;
        border-radius: 2px;
        top: 8px;
    }

    /* התפריט הראשי */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background: var(--primary-brown);
        padding: 5px 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 100;
    }

    #nav-toggle:checked~.nav-menu {
        display: flex;
    }

    /* Mobile Submenu Toggle logic */
    .desktop-link {
        display: none;
    }

    .submenu-label {
        display: block;
        color: #fdf5e6;
        font-size: 24px;
        font-weight: 700;
        padding: 5px 10px;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .submenu-label:hover {
        color: #f1c40f;
    }

    /* Disable default hover behavior on mobile */
    .has-submenu:hover .nav-submenu {
        display: none;
    }

    /* Show submenu when checkbox is checked */
    .submenu-checkbox:checked~.nav-submenu {
        display: block;
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
    }

    .nav-submenu li a {
        padding-right: 30px !important;
        background-color: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

footer {
    background-color: var(--sand-bg);
    padding: 40px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #222;
    color: #7f8c8d;
}

/* ========== About page ========== */
.content-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.content-container h1,
.contact-form h1 {
    color: var(--primary-brown);
    font-size: 32px;
    border-bottom: 4px solid var(--ocean-blue);
    display: inline-block;
    margin-bottom: 30px;
}

.contact-form h1 {
    text-align: right;
}

.content-container h2,
.info-section h2 {
    color: var(--ocean-blue);
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-container h2 {
    font-size: 24px;
    border-right: 5px solid var(--primary-brown);
    padding-right: 15px;
}

.content-container h2::before {
    content: "🌊";
    font-size: 24px;
}

.content-container p,
.content-container li {
    font-size: 18px;
    color: #444;
    text-align: justify;
    margin-bottom: 20px;
}

.highlight-box {
    background: #f0f7fd;
    border-right: 5px solid var(--ocean-blue);
    padding: 20px;
    margin: 25px 0;
    font-style: italic;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tech-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--ocean-blue);
}

.tech-title {
    display: block;
    font-weight: 800;
    color: var(--primary-brown);
    margin-bottom: 10px;
    font-size: 19px;
}

/* ========== More-info page (stats + interest boxes) ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eee;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-brown);
}

.interest-box {
    background-color: #f9f9f9;
    padding: 15px;
    border-right: 5px solid var(--ocean-blue);
    margin-bottom: 20px;
}

.interest-box--blue {
    border-right-color: #0078d4;
}

.interest-box--green {
    border-right-color: #28a745;
}

.free-badge {
    display: inline-block;
    background-color: var(--success-green);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 14px;
}

.signoff {
    text-align: center;
    margin-top: 60px;
    font-weight: 800;
    font-size: 22px;
    color: var(--primary-brown);
}

/* ========== Contact page ========== */
.contact-container {
    flex: 1;
    padding: 40px 20px;
}

.contact-container,
.main-content,
.content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-content {
    flex: 1;
    padding: 20px;
}

.content {
    flex: 1;
    padding: 10px;
}

.contact-card {
    background: #fff;
    color: #333;
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    padding: 40px;
    display: flex;
    flex-direction: row;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-form {
    flex: 1.2;
    text-align: right;
}

.contact-form h2 {
    margin-top: 0;
    font-size: 28px;
    border-bottom: 3px solid #649ed6;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    box-sizing: border-box;
    text-align: right;
    font-size: 18px;
}

.form-group textarea {
    height: 180px;
    resize: none;
}

.submit-btn {
    width: 100%;
    background-color: #649ed6;
    color: white;
    border: none;
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 140px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-text {
    text-align: right;
}

.info-text h4 {
    margin: 0;
    color: #649ed6;
    font-size: 18px;
}

.info-text p,
.info-text a {
    margin: 3px 0 0 0;
    color: #666;
    font-size: 18px;
    text-decoration: none;
    display: block;
}

.icon-box {
    font-size: 24px;
    min-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.legal-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f0f7fd;
    border: 1px solid #d1e9ff;
    padding: 20px;
    border-radius: 20px;
    max-width: 900px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.content-container .legal-notice {
    margin: 20px 0;
    max-width: none;
}

/* ========== Index page ========== */
.info-section {
    text-align: center;
    padding: 40px 20px 10px 20px;
}

.info-section h1 {
    font-size: 26px;
    font-family: 'Assistant', sans-serif;
    display: block;
    background-color: #5d4037;
    color: #fdf5e6;
    padding: 10px 70px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 4px solid #3e2723;
    border-radius: 4px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    margin: 20px auto;
    max-width: fit-content;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 4px, 4px 100%;
}

.info-section h1::before,
.info-section h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background-color: #2c3e50;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.info-section h1::before {
    left: 15px;
}

.info-section h1::after {
    right: 15px;
}

.info-section h2 {
    font-size: 28px;
}

.info-section h2::before {
    content: "🌊";
    font-size: 24px;
}

.info-section h3 {
    font-size: 24px;
    color: #16a085;
    font-weight: 700;
}

.info-section p {
    margin: 0;
    color: #aaa;
    font-size: 1.1rem;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    background: #34495e;
    color: white;
    padding: 2px 5px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    border: 2px solid #3498db;
    direction: rtl;
}

.counter-label {
    font-size: 12px;
    margin-left: 0;
    font-weight: bold;
}

.counter-number {
    font-size: 10px;
    font-weight: 800;
    color: #f1c40f;
    letter-spacing: 1px;
}

.weather-board {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.data-card {
    background: #fff;
    border: 1.5px solid #5d4037;
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 180px;
}

.icon {
    font-size: 24px;
    display: flex;
    align-items: center;
}

.text-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.label,
.value {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 800;
}

.label {
    white-space: nowrap;
}

.value {
    line-height: 1;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    /* the following line is new */
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
    /* the following 2 line are new */
    border-radius: 10px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.site-description {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: right;
    line-height: 1.8;
}

.site-description p {
    font-size: 17px;
    color: #444;
    margin-bottom: 20px;
}

.site-description .description-tip-box {
    background-color: #fdf5e6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px dashed #5d4037;
}

.site-description .description-tip-box h4 {
    margin-top: 0;
    color: #5d4037;
}

.site-description .description-tip-box ul {
    margin-bottom: 0;
}

/* ========== Privacy page ========== */
.content-container h3 {
    color: var(--primary-brown);
    font-size: 20px;
    margin-top: 25px;
}

.jump-nav {
    background: #fcf8f2;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid #eee;
}

.jump-link {
    color: var(--ocean-blue);
    text-decoration: none;
    font-weight: 800;
    margin: 0 15px;
    font-size: 17px;
}

.warning-box {
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #721c24;
}

.section-divider {
    margin: 60px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* ========== Media queries ========== */
@media (max-width: 960px) {
    .content-container {
        margin: 15px;
        padding: 20px;
    }

    .contact-container {
        margin: 15px;
        padding: 20px;
    }

    .contact-card {
        flex-direction: column;
        padding: 20px;
    }

    .legal-notice {
        margin: 15px auto 20px;
        max-width: none;
    }

    h1 {
        font-size: 32px;
    }

    .nav-container {
        gap: 5px;
    }

    .nav-link {
        font-size: 14px;
    }

    nav a {
        font-size: 24px;
        padding: 7px 7px;
    }

    .contact-info {
        padding-top: 0;
        order: 2;
    }

    .contact-form {
        order: 1;
    }
}