/*
 * Healthy Breath - Main Stylesheet
 * Version: 1.0
 * Copyright 2025. All Rights Reserved.
 */

/* 1. Root Variables */
:root {
    --red-dark: #7D0A0A;
    --red-medium: #c53c3c;
    --red-light: #e18b8b;
    --gold-light: #e8ca86;
    --gold-dark: #d5b669;
    --text-dark: #212529;
    --text-light: #fff4cc;
    --text-black: #000000;
    --text-white: #ffffff;
    --background-light: #f4f4f4;
    --background-grey: #ececec;
}

/* 2. Global Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 3.5rem;
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.navbar {
    padding: 0;
}

/* 3. Navbar */
.navbar-custom {
    font-family: "Montserrat", sans-serif;
    background-color: var(--red-medium);
    font-weight: 600;
    min-height: 70px;
}

.navbar-custom .navbar-brand {
    color: #EAD196;
}

.navbar-custom .nav-link {
    color: #EAD196;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 1.5rem 0.75rem !important;
    text-align: center;
}

.navbar-custom .nav-link.active {
    color: #FFFFFF;
}

.navbar-custom .nav-link:hover {
    background-color: var(--red-dark);
    color: #EAD196;
    text-decoration: none;
}

.navbar-custom .dropdown-toggle:focus {
    background-color: var(--red-dark);
    color: #EAD196;
    box-shadow: none;
}

.navbar-custom .nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.navbar-custom .dropdown-toggle::after {
    display: none;
}

.navbar-custom .dropdown-menu {
    background-color: #7D0A0A;
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
}

.navbar-custom .dropdown-item {
    color: #EAD196;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 1rem 1.5rem;
}

.navbar-custom .dropdown-item:hover {
    background-color: #9d2b2b;
    color: #fff;
}

/* 4. Hero Sections (Unique IDs per page) */
/* Hero for Home Page (index.html) */
#hero-home {
    position: relative;
    background-image: url("../thumbnail/team_picture2.jpg");
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

#hero-home .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.333);
}

#hero-home .content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

#hero-home h1 {
    font-weight: bold;
    font-size: 2.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

#hero-home p {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.035em;
    color: var(--text-white);
}

#hero-home .hero-logo {
    max-width: 400px;
    padding-bottom: 1rem;
    height: auto;
    opacity: 0.9;
}

/* Hero for About Page (about.html) */
#hero-about {
    position: relative;
    background-image: url("../thumbnail/team_picture2.jpg");
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

#hero-about .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.333);
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-about .hero-logo {
    max-width: 400px;
    height: auto;
    opacity: 0.9;
}

/* Generic Hero for Product Pages */
.hero-product {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.hero-product .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.333);
}

.hero-product .content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.hero-product h1 {
    font-weight: bold;
    font-size: 2.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.hero-product p {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.035em;
    color: var(--text-white);
}

/* Specific Backgrounds for Product Heroes */
#hero-product-1 {
    background-image: url("../thumbnail/man_lighting_cigarette.png");
}

#hero-product-2 {
    background-image: url("../thumbnail/man-vaping.png");
}

#hero-product-3 {
    background-image: url("../thumbnail/popcorn_lung.png");
}

/* 5. Page-Specific Sections */

/* Sections for Home Page (index.html) */
#services {
    background-color: #ececec;
    padding: 3rem 1rem 4rem;
}

#services h2 {
    font-weight: 700;
    color: var(--red-medium);
}

#services p.subtitle {
    font-size: 0.9rem;
    color: var(--text-black);
    margin-bottom: 2rem;
}

#services .service-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--red-dark);
    user-select: none;
}

#services .service-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--red-medium);
}

#services .service-desc {
    font-size: 0.9rem;
    color: #444;
}

.info-section {
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: var(--gold-light);
}

.info-section .info-img {
    flex: 1;
    display: flex;
}

.info-section .info-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.info-section .info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    box-sizing: border-box;
}

.info-section .info-text button {
    margin-top: 1rem;
    align-self: flex-end;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    font-weight: 400;
    font-style: italic;
    padding: 0.6rem 1.8rem;
}

.info-section .info-text h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#info-1 .info-text {
    background-color: var(--gold-light);
    color: var(--red-dark);
}

#info-1 .info-text button {
    background-color: var(--red-medium);
    color: white;
}

#info-1 .info-text button:hover {
    background-color: var(--red-dark);
}

#info-2 {
    color: var(--gold-light);
}

#info-2 .info-text {
    background-color: var(--red-medium);
}

#info-2 .info-text button {
    background-color: var(--gold-light);
    color: var(--red-medium);
}

#info-2 .info-text button:hover {
    background-color: var(--gold-dark);
    color: #fff;
}

#info-3 {
    color: var(--gold-light);
}

#info-3 .info-text {
    background-color: var(--red-dark);
}

#info-3 .info-text button {
    background-color: var(--gold-light);
    color: var(--red-dark);
}

#info-3 .info-text button:hover {
    background-color: var(--gold-dark);
    color: #fff;
}

#testimoni {
    padding: 3rem 1rem 1.5rem;
    text-align: center;
}

#testimoni h2 {
    font-weight: 700;
    color: var(--red-medium);
}

#testimoni p.subtitle {
    font-size: 0.9rem;
    color: var(--text-black);
    margin-bottom: 2rem;
}

#testimoni .carousel-item .row {
    display: flex;
    align-items: stretch;
}

#testimoni .testimonial-card {
    background-color: var(--red-medium);
    color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 200px;
}

#testimoni .card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    padding: 0;
}

#testimoni .card-header .user-info {
    text-align: left;
}

#testimoni .card-header .user-info .name {
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

#testimoni .card-header .user-info .title {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

#testimoni .card-header img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gold-light);
}

#testimoni .testimonial-text {
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.5;
    flex-grow: 1;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
}

#carouselTestimonials {
    width: 100%;
}

#testimoni .carousel-indicators {
    position: static;
    margin-top: 1rem;
    margin-bottom: 0;
}

#testimoni .carousel-indicators [data-bs-target] {
    box-sizing: content-box;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--red-light);
    border: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

#testimoni .carousel-indicators .active {
    opacity: 1;
    background-color: var(--red-dark);
}

#testimoni .carousel-control-prev,
#testimoni .carousel-control-next {
    position: static;
    width: auto;
    height: auto;
    background: none;
    opacity: 1;
    flex-shrink: 0;
}

#testimoni .carousel-control-prev {
    margin-right: 1rem;
}

#testimoni .carousel-control-next {
    margin-left: 1rem;
}

#testimoni .carousel-control-prev-icon,
#testimoni .carousel-control-next-icon {
    background-color: var(--red-dark);
    border-radius: 50%;
    padding: 1.2rem;
    background-size: 50%;
}

#profile {
    padding: 4rem 1rem;
    background-color: #f4f4f4;
}

#profile .profile-images {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    height: 100%;
}

.dosen-img {
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

#profile .lecturer-img {
    width: 35%;
    object-fit: cover;
}

#profile .group-img {
    width: 65%;
    object-fit: cover;
}

#profile .profile-text-content {
    color: var(--red-medium);
    padding: 1rem;
}

#profile .profile-text-content p {
    color: var(--text-black);
}

#profile .profile-text-content h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

#profile .profile-text-content button {
    border: none;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
    font-style: italic;
    padding: 0.6rem 1.8rem;
    background-color: var(--red-medium);
    color: var(--text-white);
    margin-top: 1.5rem;
}

#profile .profile-text-content button:hover {
    background-color: var(--red-dark);
}

#visitor-counter {
    background-color: var(--gold-light);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--red-dark);
    font-weight: 700;
}

#visitor-counter h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#visitor-counter p {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#visitor-counter .count {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    user-select: text;
}

/* Sections for About Page (about.html) */
#about,
#dosen-pembimbing,
#tim-pengembang,
#contact {
    padding: 4rem 1rem;
}

#about,
#contact {
    background-color: var(--background-grey);
}

#about h2,
#dosen-pembimbing h2,
#tim-pengembang h2,
#contact h2 {
    font-weight: 700;
    color: var(--red-medium);
    margin-bottom: 2rem;
}

#dosen-pembimbing h3,
#tim-pengembang h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

#about .about-text,
#dosen-pembimbing p {
    line-height: 1.75;
}

#tim-pengembang .anggota-list li {
    font-weight: 500;
}

#contact a p {
    color: var(--text-dark);
}

/* Sections for Product Pages (product_*.html) */
#product {
    background-color: #ececec;
    padding: 4rem 1rem 2rem;
}

#product h2 {
    font-weight: 700;
    color: var(--red-medium);
}

#product h4 {
    font-weight: 700;
    color: var(--text-black);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

#product h4:not(:first-of-type) {
    margin-top: 2rem;
}

#product p {
    font-size: 0.9rem;
    color: var(--text-black);
}

#product li {
    margin-bottom: 0.5rem;
    color: var(--text-black);
}

#product ul ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

/* 6. Footer */
footer {
    background-color: var(--red-medium);
    color: #f4f4f4;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

footer .footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

footer .footer-logo,
footer .footer-contact,
footer .footer-social {
    flex: 1 1 180px;
    text-align: center;
}

footer .footer-logo svg,
footer .footer-logo img {
    max-width: 100px;
    height: auto;
}

footer .footer-contact p,
footer .footer-social p {
    margin: 0.25rem 0;
}

footer .footer-social a {
    color: #f4f4f4;
    margin: 0 0.5rem;
    font-size: 1.4rem;
    user-select: none;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer .footer-social a:hover {
    color: var(--gold-light);
}

footer .footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #d0a0a0;
    padding-top: 0.8rem;
    letter-spacing: 0.025em;
    user-select: none;
}

/* 7. Media Queries */
@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 25rem;
    }

    .navbar-custom .dropdown-menu {
        width: 100%;
        text-align: center;
        margin-top: 0 !important;
        border-radius: 0 !important;
    }

    #testimoni .carousel-item .col-md-4:not(:first-child) {
        display: none;
    }

    #testimoni .carousel-control-prev,
    #testimoni .carousel-control-next {
        display: none;
    }

    #testimoni .carousel-item.active {
        display: flex;
        flex-wrap: wrap;
    }

    #testimoni .carousel-item.active .col-md-4 {
        flex: 1 0 100%;
        max-width: 100%;
    }

    #testimoni .carousel-item .col-md-4 {
        display: flex !important;
        align-items: stretch;
    }

    #testimoni .testimonial-card {
        min-height: 180px;
    }

    .dosen-img {
        max-width: 180px;
    }

    #profile .profile-images {
        margin-bottom: 2rem;
    }

    #dosen-pembimbing .col-lg-6 {
        text-align: center !important;
        margin-bottom: 1.5rem;
    }

    #profile .profile-text-content {
        text-align: center;
    }

    #hero-home .hero-logo,
    #hero-about .hero-logo,
    .hero-product .hero-logo {
        max-width: 300px;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 360px) {
    .navbar-custom .dropdown-item {
        white-space: normal;
        word-wrap: break-word;
    }
}

@media (min-width: 992px) {
    html {
        scroll-padding-top: 4.5rem;
    }

    .info-section {
        flex-direction: row;
        min-height: 400px;
    }

    .info-section .info-img,
    .info-section .info-text {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .info-section .info-img img {
        height: 100%;
    }

    #info-2 {
        flex-direction: row-reverse;
    }

    #testimoni .carousel-item .row {
        align-items: stretch;
    }

    #testimoni .carousel-item .col-md-4 {
        display: flex;
        align-items: stretch;
    }
}