@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700&display=swap');

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Rubik', sans-serif;
    color: #5B5B5A;
    min-height: 100%;
    font-size: 1.15rem;
    /* ~18px base text size for smooth readability */
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ================================================== */
/* Global Typography Hierarchy across all tabs        */
/* ================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
li {
    font-family: 'Rubik', sans-serif;
    letter-spacing: 0.5px;
    color: #5B5B5A !important;
}

/* Main Page Titles (e.g. אודות, טיפול בחרדה, הקליניקה) */
h2,
.page-main-title {
    font-size: 2.2rem !important;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* ALL Standard Subtitles (H3 outside accordions like on Clinic tab) */
h3,
.page-sub-title {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin-top: 18px !important;
    margin-bottom: 8px !important;
}

/* Paragraph Content */
p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }

    h1 {
        font-size: 28px !important;
    }

    h2,
    .page-main-title {
        font-size: 1.75rem !important;
        margin-bottom: 15px;
    }

    h3,
    .page-sub-title,
    .accordion article h3 {
        font-size: 1.05rem !important;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 14px;
    }
}

/* --- Parallax Effect and Header Centering --- */
.bgimg-1,
.bgimg-2 {
    opacity: 0.7;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url('media/background-narrow.jpg');
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.bgimg-1 {
    min-height: 100vh;
}

.bgimg-2 {
    min-height: 70vh;
}

.bgimg-1 h1,
.bgimg-2 h1 {
    margin: 0;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
}

/* Regarding Navigation Bar */
ul.topnav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #ffffff;
    border-bottom: #DBDBDB 1px solid;
}

ul.topnav li {
    float: right;
}

ul.topnav li a {
    display: inline-block;
    color: #5B5B5A;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: 0.3s;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

ul.topnav li a:hover {
    background-color: #f1f2f0;
}

ul.topnav li.icon {
    display: none;
}

@media screen and (max-width:680px) {
    ul.topnav li {
        display: none;
    }

    ul.topnav li.icon {
        float: right;
        display: inline-block;
    }
}

@media screen and (max-width:680px) {
    ul.topnav.responsive {
        position: relative;
    }

    ul.topnav.responsive li.icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    ul.topnav.responsive li {
        float: none;
        display: inline;
    }

    ul.topnav.responsive li a {
        display: block;
        text-align: center;
    }
}

/* ================================================== */
/* Collapsible Part (Accordion)                       */
/* ================================================== */
.accordion,
.accordion::before,
.accordion::after {
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

.accordion {
    max-width: 800px;
    text-align: right;
}

article {
    border: 1px solid #fff;
    padding: 2px;
    margin: 1px auto;
}

.accordion article label:hover h3 {
    background-color: #D2D6CF !important;
}

/* Accordion Specific H3 Title */
.accordion article h3 {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    padding: 10px !important;
    text-align: center !important;
    background-color: #ecedeb !important;
    margin: 0 !important;
}

input[type="radio"] {
    appearance: none;
    position: fixed;
    top: -100vh;
    left: -100vh;
}

/* Outer Wrapper: Controls the open/close animation */
input[type="radio"]~div {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out;
}

/* Inner Wrapper: Holds the content */
input[type="radio"]~div>div {
    overflow: hidden;
    min-height: 0;
    /* CRUCIAL: Allows the container to shrink perfectly to 0 */
    padding: 0 !important;
    /* ZERO padding guarantees absolutely no peeping text */
}

/* Add breathing room directly to the first and last paragraphs INSIDE the accordion */
input[type="radio"]~div>div>*:first-child {
    margin-top: 15px !important;
}

input[type="radio"]~div>div>*:last-child {
    margin-bottom: 25px !important;
}

/* WHEN OPEN: Expand the grid to fit the content */
input[type="radio"]:checked~div {
    grid-template-rows: 1fr;
}

/* Footer Adjustments */
hr {
    margin-bottom: 0 !important;
}

footer.w3-center {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

footer.w3-center p {
    margin: 0 !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    color: #ffffff !important;
}

.map-container {
    width: 100%;
    height: 230px;
    border: 12px solid #D2D6CF;
    border-radius: 4px;
    box-sizing: border-box;
    filter: grayscale(85%) opacity(90%);
    margin-top: 75px;
}

ul.topnav li a.nav-active {
    background-color: #f1f2f0 !important;
}

@media (max-width: 600px) {
    .w3-padding-64 {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .w3-section {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    .map-container {
        margin-top: 20px !important;
    }

    .w3-padding-large {
        padding: 8px !important;
    }

    .bgimg-1,
    .bgimg-2 {
        background-attachment: scroll !important;
        background-position: right center !important;
        background-size: cover !important;
    }

    .bgimg-1 {
        min-height: 45vh !important;
    }

    .bgimg-2 {
        min-height: 35vh !important;
    }
}

/* Sticky Branding Banner */
.site-branding {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #747772 !important;
    border-bottom: 1px solid #b3b8af;
    z-index: 1001;
    text-align: center;
    padding: 12px 15px 10px;
    box-sizing: border-box;
}

.site-branding h1 {
    margin: 0;
    font-size: 32px;
    color: #ffffff !important;
    letter-spacing: 1px;
    font-weight: 500;
    line-height: 1.2;
}

.site-branding p {
    margin: 6px 0 0;
    font-size: 17px;
    color: #ffffff !important;
    letter-spacing: 1px;
    line-height: 1.2;
}

.w3-top {
    top: 86px !important;
}

body {
    padding-top: 145px;
}

@media (min-width: 601px) and (max-width: 1024px) {
    .site-branding {
        padding: 14px 15px 12px;
    }

    .site-branding h1 {
        font-size: 34px !important;
        color: #ffffff !important;
    }

    .site-branding p {
        font-size: 19px !important;
        color: #ffffff !important;
    }

    ul.topnav li a {
        font-size: 1rem !important;
        padding: 12px 10px !important;
    }

    .w3-top {
        top: 95px !important;
    }

    body {
        padding-top: 155px;
    }
}

@media (max-width: 680px) {
    .site-branding {
        padding: 10px 8px;
    }

    .site-branding h1 {
        font-size: 26px !important;
        color: #ffffff !important;
    }

    .site-branding p {
        font-size: 17px !important;
        color: #ffffff !important;
        margin-top: 5px;
    }

    .w3-top {
        top: 78px !important;
    }

    body {
        padding-top: 125px;
    }
}
