* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #d8805b;
    --dark-gray-color: #7f7f7f;
}

body {
    font-family: 'Libre Franklin', sans-serif; 
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: url(../images/Blank-Wall.png);
    background-size: 100% 300%; /* Put here instead of .hero section so that it covers both .hero and .aboutme sections in aboutme.html */
}

/* WebP version - will be applied via JavaScript */
body.webp-supported {
    background: url(../images/Blank-Wall.webp);
    background-size: 100% 300%;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Navbar */
.navbar {
    /* border: 3px solid gold; */
    background: var(--dark-gray-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    min-height: 5.3em;
}

.navbar .container .contact-button {
    background-color: #EFEAE5;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.675em;
    padding: 0.33em 0.4em;
    border-radius: 4.4em;
    cursor: pointer;
    text-decoration: none;
    margin-right: 1em;
}

/* Zencare and Psychology Today Badges */

.navbar .container .badges {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5; /* Lower than hamburger menu (z-index: 10) but higher than default*/
    pointer-events: auto; /* Ensure it doesn't interfere with other elements */
    display: flex;
    align-items: center;
}
.navbar .container .badges .zencare-badge {
    width: 250px; 
    height: 73.32px; 
    transform: scale(0.7);
    border: none;
    display: block;
    /* Ensure it maintains its position */
    position: relative;
    z-index: 5;
}

/* Menu container */
.navbar .container .menu-container {
    display: flex;
    align-items: center;
    margin-left: 1.5em;
    z-index: 100;
    cursor: pointer;
}

.navbar .container .menu-container .menu {
    margin-left: 0.4em;
    color: #EFEAE5;
    font-weight: 500;
    font-size: 1.9em;
}

/* Hamburger Button (within Menu Container) */
.navbar .container .menu-container .hamburger-button {
    background: none;
    border: none;
    cursor: pointer;
}

/* .navbar .container .menu-container .hamburger-button.inactive {
    display: none
}; */

.navbar .container .menu-container .hamburger-button .hamburger-line {
    width: 2.8em;
    height: 0.625em;
    border-radius: 4.4em;
    background: #EFEAE5;
    border: none;
    margin: 0.375em 0em;
}

/* Home Container */
.navbar .container .home-container {
    display: flex;
    align-items: center;
    margin-left: 1.5em;
    z-index: 100;
    position: relative;
    right: 0em;
    bottom: 0.025em;
}

.navbar .container .home-container .close-button {
    cursor: pointer;
    color: #fff;
    border: none;
    background: none;
    line-height: 1; 
    font-size: 4.5em; /* As opposed to 2.8 em */
}

/* Hamburger Menu */
.navbar .hamburger-menu {
    background-color: #CCC4C4;
    border-radius: 0px 0px 30px 0px;
    position: absolute;
    top: 0px;
    height: 20em;
    width: 260px;
    z-index: 10;
    min-height: 300px;
}

.navbar .hamburger-menu .menu-items {
    /* height: 90%; */
    margin-top: 1.3em;
    margin-left: 0.105em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.38em;
    /* Add a transition for menu items height on toggleDropdown() */
    /* transition: height 0.3s ease-in-out; */
}

.navbar .hamburger-menu .menu-items > li {
    margin-bottom: 1.5em;
}

.navbar .hamburger-menu .menu-items > li:not(#contact) {
    flex-shrink: 0;
}

.navbar .hamburger-menu .menu-items .first {
    opacity: 1;
}

.navbar .hamburger-menu .menu-items .submenu #individual {
    align-self: flex-start;
}

.navbar .hamburger-menu .menu-items li a {
    color: #fff;
}

.navbar .hamburger-menu .menu-items li a.active {
    color: var(--primary-color);
}

/* For Javascript */
.navbar .container .menu-container.hidden {
    display: none;
}

.navbar .container .home-container.hidden {
    display: none;
}

.navbar .hamburger-menu.hidden {
    display: none;
}

/* For Clinical Services Dropdown */
.arrow {
    position: relative;
    top: 5px;
    border: solid-black;
    border-width: 0 3px 3px 0;
    display: inline-block;
}

.has-dropdown {
    position: relataive;
}

.dropdown-header {
    cursor: pointer;
}

.submenu {
    font-size: 0.9em;
    list-style: none;
    padding-left: 20px;
    display: none;
}

.submenu li {
    margin-bottom: 1em;
}

/* Show the submenu when active */
.submenu.active {
    display: block;
} 

.submenu.active ~ #contact {
    margin-top: 1.2em;
}

/* .navbar .hamburger-menu .menu-items .submenu li a {
    color: var(--dark-gray-color);
} */

/* Clinical Services when active*/
.clinical-services.active {
    color: var(--primary-color);
}

/* Rotate the arrow when submenu is open */
.arrow.open {
    position: static;
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
}

/* Hero */
.hero {
    flex-grow: 1;
    display: flex;
    overflow: hidden; /*shrinks image2 to fit perfectly inside its contianer*/
}

.hero .container {
    flex-grow: 1;
    position: relative; 
    top: 0;
    left: 0;
    display: flex;
}

.hero .container .transparent-couch { 
    position: relative; /*image gives the container its width, and is relative to its parent container*/
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Remove any fixed width/height here - let it be responsive */
    width: auto;
    height: auto;
    max-width: 100%; /* Ensure no overflow */
}

.hero .container .hero-content {
    position: absolute;
    top: 0;
    left: 0; 
    right: 0; /* effectively centers */
}

.hero .container .hero-content .hero-heading {
    color: var(--primary-color);
    font-weight: 500;
    padding-top: 1em;
    font-size: 2.637em;
    text-align: center;
}
.hero .container .hero-content .hero-heading span {
    font-size: 1.09em;
    font-weight: 600;
}

/* Footer */
footer {
    flex-grow: 1.5; 
    background: var(--primary-color);
    display: flex; 
    justify-content: center;
    align-items: center;
    padding: 1em;
}

footer .firstp {
    color: #fff;
    text-align: center;
}
footer .secondp {
    color: #fff;
    text-align: center;
    display: none;
}

p a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Media Queries */

/* Width-Based Media Queries */

@media (min-width: 1441px) {
    .navbar .hamburger-menu {
        border-radius: 0px 0px 30px 30px;
    }
}

@media (max-width: 1100px) {
    .navbar .hamburger-menu {
        width: 98%;
        height: 100%;
        border-radius: 0em;
    }
    
    .navbar .container .home-container .home {
        display: none; 
    }

    .navbar .hamburger-menu .menu-items {
        /* height: 50%; */
        margin-top: 2em;
        align-items: flex-end;
        margin-right: 2em;
    }
    .navbar .hamburger-menu .menu-items li {
        display: block;
        width: 90%;
        border-bottom: 1px solid var(--dark-gray-color);
        text-align: right;
    }

    .navbar .hamburger-menu .menu-items .first {
        opacity: 1;
    }

    .navbar .hamburger-menu .menu-items .submenu li {
        border-bottom: none;
        width: 100%;
        align-items: flex-end;
    }
}

@media (max-width: 800px) {
    .navbar .container .badges>*{
        transform: translateX(-20%);
    }

    .navbar .container .badges {
        transform: translateX(-50%) scale(0.9);
    }
}

@media (max-width: 730px) {
    footer .firstp {
        display: none;
    }

    footer .secondp {
        display: block;
        line-height: 2em;
        font-size: 0.9em;
    }

    .navbar .container .badges {
        transform: translateX(-50%) scale(0.75);
    }
}

@media (max-width: 650px) {
    .hero .container .hero-content .hero-heading {
        font-size: 2em;
    }

    /*Below used to be at 480px*/
    .navbar .container .menu-container .menu {
        font-size: 1.5em;
    }

    .navbar .container .contact-button {
        font-size: 1.35em;
    }

    .navbar .container .menu-container .hamburger-button .hamburger-line {
        width: 2.4em;
        height: 0.5em;
        border-radius: 4.4em;
        background: #fff;
        border: none;
        margin: 0.375em 0em;
    }

    .navbar .container .badges{
        transform: translateX(-50%) scale(0.65);
    }
}

@media (max-width: 550px) {
    .navbar .container .menu-container .menu {
        font-size: 1.25em;
    }
    
    .navbar .container .menu-container .hamburger-button .hamburger-line {
        width: 2.3em;
        height: 0.425em;
    }

    .navbar .container .contact-button {
        font-size: 1.2em;
    }

    .hero .container .hero-content .hero-heading {
        font-size: 1.75em;
    }

    .navbar .container .badges{
        transform: translateX(-50%) scale(0.55);
    }
}

@media (max-width: 480px) {
    .navbar .container .menu-container {
        margin: 1em;
    }

    .navbar .container .menu-container .menu{
        font-size: 1.125em;
    }

    .navbar .container .menu-container .hamburger-button .hamburger-line {
        width: 2.2em;
        height: 0.375em;
        border-radius: 4.4em;
        background: #fff;
        border: none;
        margin: 0.375em 0em;
    }

    .navbar .container .contact-button {
        margin: 0.5em;
        font-size: 1.0125em;
    }

    .hero .container .hero-content .hero-heading {
        font-size: 1.5em;
    }
}
@media (max-width: 430px) {
    .navbar .container .badges {
        display: none;
    }
}

@media (max-width: 360px) {
    footer .secondp {
        font-size: 0.8em;
    }
}

/* Height-based Media Queries */

/* For short screens - tablets in landscape, short desktop windows */
@media (max-height: 600px) {
    .hero .container .hero-content .hero-heading {
        font-size: 2em; /* Same as your 650px width breakpoint */
        padding-top: 0.5em; /* Reduce top padding */
    }
}

/* For very short screens - phones in landscape */
@media (max-height: 500px) {
    .hero .container .hero-content .hero-heading {
        font-size: 1.75em; /* Same as your 550px width breakpoint */
        padding-top: 0.3em;
    }

    .hero .container .hero-content .hero-heading {
        font-size: 2em;
    }

    /*Below used to be at 480px*/
    .navbar .container .menu-container .menu {
        font-size: 1.5em;
    }

    .navbar .container .contact-button {
        font-size: 1.35em;
    }

    .navbar .container .menu-container .hamburger-button .hamburger-line {
        width: 2.4em;
        height: 0.5em;
        border-radius: 4.4em;
        background: #fff;
        border: none;
        margin: 0.375em 0em;
    }

    .navbar .container .badges{
        transform: translateX(-50%) scale(0.9);
    }
}
    


/* For extremely short screens */
@media (max-height: 400px) {
    .hero .container .hero-content .hero-heading {
        font-size: 1.5em; /* Same as your 480px width breakpoint */
        padding-top: 0.2em;
    }
}

/* Combined width AND height constraints for fine-tuning */
@media (max-width: 768px) and (max-height: 600px) {
    .hero .container .hero-content .hero-heading {
        font-size: 1.6em;
        padding-top: 0.4em;
    }
}

@media (max-width: 480px) and (max-height: 500px) {
    .hero .container .hero-content .hero-heading {
        font-size: 1.3em;
        padding-top: 0.2em;
    }
}