:root {
    --NoyasOrange: #F0935C;
    --NoyasPink: #F5A89D;
    --NoyasYellow: #ECC647;
    --NoyasGreen: #A3C5A9;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Rubik", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background-color: #f6ede8;
}

/* Elements start invisible and 30px lower */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
    /* Smooth 0.8 second transition */
}

/* This class will be added by JavaScript when the element is scrolled into view */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.header-image {
    width: 75%;
    height: 75%;
    margin: 10px 0 0 0;
    border-radius: 50px;
}

.container {
    display: flex;
    justify-content: center;
}

.title-text {
    text-align: center;
    width: 100%;
    padding: 30px;
}


.social-nav {
    display: flex;
    justify-content: center;
    flex-direction: row;
}

.social-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: black;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.link-image:hover {
    animation: pulse 1s infinite;
}

.link-image {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--NoyasGreen);
    border-radius: 100%;
    height: auto;
    padding: 10px;
    background-color: var(--NoyasGreen);
}

.add-contact {
    background-color: var(--NoyasGreen);
    border-radius: 50px;
    padding: 15px;
    text-decoration: none;
    color: #000;
}

.squigly-line {
    /* 1. Remove the default browser line */
    border: none;
    /* 2. Set the height of the wave area */
    height: 10px;
    /* 3. The Wavy SVG Pattern */
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3E%3Cpath fill='none' stroke='%23A3C5A9' stroke-width='2' d='M0 3.5c5 0 5-3 10-3s5 3 10 3'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 20px 10px;
    /* 4. Center and constrain the width */
    width: 75%;
    margin: 40px auto;
    /* Adds vertical space between sections */
    opacity: 0.8;
}

.underline-style {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    /* Space between text and the line */
}

.underline-style::before {
    content: "...";
    position: absolute;
    bottom: -6px;
    /* Adjust this to align vertically with the line */
    left: -6px;
    /* Pulls dots slightly past the end of the line */
    color: #000;
    font-size: 21px;
    font-weight: bold;
    letter-spacing: 2px;
}

.underline-style::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    /* Start from the right (RTL) */
    width: 100%;
    height: 3px;
    /* Thickness of the line */
    /* This creates a solid line that stops, followed by a dotted pattern */
    background: linear-gradient(to left, #000 85%,
            /* Solid line color for 85% of the width */
            transparent 85%
            /* Transparent gap before the dots */
        );
}

.split-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Text gets slightly more space than the image */
    gap: 40px;
    width: 90%;
    max-width: 70ch;
    margin: 60px auto;
    align-items: start;
    /* Ensures both start at the exact same top line */
    direction: rtl;
}

.paragraph-styles {
    line-height: 1;
    /* Increased for better readability in a block */
    font-size: 1.1rem;
    hyphens: auto;
    color: #444;
    text-align: justify;
    /* The magic line for straight edges */
    text-justify: inter-word;
    /* Tells the browser how to space the words */
    direction: rtl;
    /* Ensures Hebrew flow is correct */
    margin: 0;
}

.split-text {
    text-align: right;
}

.split-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    /* Matches your carousel and accordion style */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    display: block;
}

.accordion {
    width: 100%;
    /* Don't hit the very edges of the screen */
    max-width: 500px;
    /* But don't let it get awkwardly wide on desktop */
    margin: 0 auto;
    /* Center it */
    border: 1px solid rgb(148, 148, 148);
}


.accordion-header {
    position: relative;
    /* Needed to anchor the arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f1f1;
    color: #444;
    cursor: pointer;
    padding: 20px;
    font-size: 1.1rem;
    width: 100%;
    border: none;
    outline: none;
    transition: 0.4s;
    font-weight: bold;
    text-align: right;
}

/* Create the arrow */
.accordion-header::after {
    content: '+';
    font-size: 24px;
    font-weight: bold;
    display: inline-block;
    /* Remove or set rotate to 0 */
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

/* When the button has the "active" class, rotate it */
.accordion-header.active::after {
    content: '\2212';
    transform: rotate(180deg);
}

/* Add a background color on hover */
.accordion-header:hover {
    background-color: #e2dede;
}

/* Hide the panel by default */
.accordion-panel {
    padding: 0 18px;
    background-color: #f6ede8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border: 1px solid rgb(148, 148, 148);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.accordion-panel p {
    text-align: justify;
    text-justify: inter-word;
    direction: rtl;
}

.accordion.nested {
    margin: 15px 0;
    border: none;
    /* Removes double borders */
}

.sub-header {
    background-color: #f1f1f1 !important;
    /* Slightly lighter */
    font-size: 0.95rem !important;
    /* Slightly smaller font */
    border-right: 4px solid var(--NoyasGreen) !important;
    /* Visual cue */
}


.custom-carousel {
    position: relative;
    /* Anchor for the absolute buttons */
    overflow: hidden;
    width: 90%;
    max-width: 500px;
    margin: 40px auto;
}

/* Base style for both buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--NoyasGreen);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
}

/* Positioning for RTL */
.prev {
    right: 10px;
    /* Right side button */
}

.next {
    left: 10px;
    /* Left side button */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 400px;
    width: 100%;
    scroll-behavior: smooth;
    border-radius: 20px;
}

.image1 {
    height: 300px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    display: flex;
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    justify-content: center;
    align-items: center; /* Centers vertically */
    height: 400px; /* Or whatever height we want the carousel to be */
    overflow: hidden;
    background-color: #f6ede8;
}

.carousel-item img {
    cursor: zoom-in;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 'contain' ensures the whole image is visible without cropping */
    display: block;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Higher than everything else */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark background */
    cursor: zoom-out;
}

/* Modal Content (Image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    animation: zoomIn 0.3s;
}

/* The Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.contact-section {
    width: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    /* This stacks the title ABOVE the form */
    align-items: center;
    /* This centers both the title and the form horizontally */
    gap: 20px;
    /* Space between the title and the form */
}

/* Ensure the title itself is centered */
.contact-section .underline-style {
    text-align: center;
    margin-bottom: 10px;
}

.contact-form {
    width: 100%;
    max-width: 400px;
    /* Keeps the mobile width on desktop */
    background: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #f1f1f1;
    border-radius: 12px;
    font-family: "Rubik", sans-serif;
    font-size: 1rem;
    background-color: #fafafa;
    box-sizing: border-box;
    /* Ensures padding doesn't break width */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--NoyasGreen);
    background-color: #fff;
}

.submit-btn {
    border: none;
    cursor: pointer;
    width: 100%;
    /* Keeps it full width of the 400px container */
    font-size: 1.1rem;
    margin-top: 10px;
    padding: 15px;
}

#scrollTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--NoyasGreen);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, opacity 0.3s;
}

#scrollTopBtn:hover {
    background-color: var(--NoyasGreen);
    transform: scale(1.1);
    /* Slight pop on hover/tap */
}

/* Fade in animation */
.show-btn {
    display: block !important;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.main-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
    margin-top: 60px;
    /* Space from the last section */
    text-align: center;
}

.footer-container {
    max-width: 400px;
    /* Match form and carousel width */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--NoyasGreen);
    margin-bottom: 5px;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-divider {
    width: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.footer-bottom {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Make those messy credit links tiny and subtle */
.icon-credits {
    margin-top: 15px;
    font-size: 0.7rem;
}

.icon-credits a {
    color: var(--NoyasGreen);
    text-decoration: none;
}

.icon-credits a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {

    html,
    body {
        margin: 0;
        padding: 0;
        font-family: "Rubik", sans-serif;
        background-color: #f6ede8;
        overflow-x: hidden;
        /* Prevents accidental side-scrolling */
    }

    /* Updated Header for Mobile */
    .header-image {
        width: 100vw;
        height: 250px;
        /* Slightly shorter for mobile */
        background-image: url('./images/hero.jpg');
        /* background-size: cover; */
        /* background-position: center; */
        border-radius: 0px;
        margin-top: 0;
    }

    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
        /* Side padding so text doesn't touch screen edges */
    }

    .title-text h1 {
        font-size: 1.5rem;
        /* Scales down title for mobile */
        text-align: center;
        padding: 20px 0;
    }

    /* --- Social Nav Mobile Fix --- */
    .social-nav {
        display: grid;
        /* Creates 3 equal columns */
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 10px;
        /* 20px vertical gap, 10px horizontal gap */
        padding: 20px;
        justify-items: center;
        /* Centers the icons in their grid cells */
    }

    .social-nav ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .link-text {
        font-size: 0.75rem; /* Smaller text to fit 3-across on small phones */
        margin-top: 8px;
        text-align: center;
    }

    /* --- Buttons & Links --- */
    .add-contact {
        display: inline-block;
        background-color: var(--NoyasGreen);
        border-radius: 50px;
        padding: 15px 30px;
        text-decoration: none;
        color: #000;
        font-weight: bold;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        margin: 20px 0;
    }

    .split-section {
        grid-template-columns: 1fr; /* Stack vertically on phones */
        gap: 30px;
        text-align: center;
    }

    .split-image {
        order: -1; /* Moves the image ABOVE the text on mobile */
        max-width: 300px;
        margin: 0 auto;
    }

    /* --- Accordion Mobile Tweaks --- */
    .accordioncontainer {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .accordion {
        width: 100%;
        max-width: 500px;
        margin: 20px auto;
        border-radius: 12px;
        overflow: hidden;
        /* Keeps corners rounded */
    }
    .accordion-panel.active{
        max-height: none;
        height: auto;
    }
    .accordion-panel .accordion{
        visibility: visible;
        opacity: 1;
        display: block;
        width: 100%;
    }
    .accordion-header.active + .accordion-panel .accordion {
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
}
.accordion-panel .accordion-panel {
    max-height: 0;
    display: block; /* Ensure they aren't 'none' */
}
.sub-header {
    border-bottom: 1px solid #ddd !important;
    background-color: #ffffff !important;
    z-index: 10;
}

    /* --- Carousel Mobile Tweaks --- */
    .custom-carousel {
        width: 95%;
        /* Wider on mobile */
        max-width: 500px;
    }

    .image1{
        height: 280px;
        /* Slightly shorter for phone screens */
    }

    /* form css start */
    .contact-section {
        margin: 40px auto;
    }

    .contact-form {
        width: 100%;
        max-width: 400px;
        background: white;
        padding: 30px;
        border-radius: 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        gap: 15px;
        box-sizing: border-box;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        text-align: right;
        gap: 5px;
    }

    .form-group label {
        font-weight: bold;
        font-size: 0.9rem;
        color: #444;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-family: "Rubik", sans-serif;
        font-size: 1rem;
        box-sizing: border-box;
        /* Crucial for mobile */
    }

    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--NoyasGreen);
        box-shadow: 0 0 5px rgba(255, 170, 184, 0.5);
    }

    .submit-btn {
        border: none;
        cursor: pointer;
        width: 100%;
        font-size: 1.1rem;
        margin-top: 10px;
    }

    /* form css end */

    #scrollTopBtn {
        display: none;
        /* Hidden by default */
        position: fixed;
        bottom: 20px;
        left: 20px;
        /* Placed on the left for RTL layouts */
        z-index: 99;
        border: none;
        outline: none;
        background-color: var(--NoyasGreen);
        /* Your brand pink */
        color: white;
        cursor: pointer;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        /* Perfect circle */
        font-size: 24px;
        font-weight: bold;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s, opacity 0.3s;
    }

    #scrollTopBtn:hover {
        background-color: var(--NoyasGreen);
        transform: scale(1.1);
        /* Slight pop on hover/tap */
    }

    /* Optional: Fade in animation */
    .show-btn {
        display: block !important;
        animation: fadeIn 0.3s;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}