/* ===================
   Candle Light Page
   =================== */
.home-main-light {
    background: #111;
    min-height: 100vh;
    overflow: scroll;
    width: 100%;
    padding: 0;
}
.home-main-light-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5em 1em 1.5em 1em;
}
.home-main-light-back {
    background: var(--yellow);
    color: #111;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 16px;
    padding: 0.5em 1.5em;
    cursor: pointer;
    margin-bottom: 1.5em;
    box-shadow: 0 2px 8px #0003;
    transition: background 0.2s;
}
.home-main-light-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5em;
}
.home-main-light-subtitle {
    color: #ffe100;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 2em;
}
.home-main-light-count {
    font-weight: bold;
    font-size: 1.3em;
}
.home-main-light-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2em 1.5em;
    justify-items: center;
    margin-bottom: 2em;
}
.home-main-light-candle {
    background: transparent;
    border: 2px solid #fff;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 170px;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.home-main-light-candle img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 0;
    background: #000;
    margin-bottom: 0.5em;
}
.home-main-light-candle:hover {
    border: 2.5px solid #ffe100;
    box-shadow: 0 0 16px #ffe10088;
}
.home-main-light-label {
    color: #bde0ff;
    font-size: 1.05rem;
    text-align: center;
    margin-top: 0.2em;
    font-weight: 500;
    line-height: 1.2;
}
.home-main-light-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
    margin-top: 1.5em;
}
.home-main-light-page {
    background: #fff;
    color: #111;
    border: none;
    border-radius: 6px;
    padding: 0.4em 1.1em;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0.1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.home-main-light-page.active, .home-main-light-page:hover {
    background: #ffe100;
    color: #111;
}
@media (max-width: 1024px) {
    .home-main-light-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5em 1em;
    }
    .home-main-light-candle {
        width: 160px;
    }
    .home-main-light-candle img {
        width: 140px;
        height: 140px;
    }
}
@media (max-width: 700px) {
    .home-main-light-page {
        font-size: 1rem;
        padding: 0.3em 0.5em;
    }
    .home-main-light-title {
        font-size: 1.3rem;
    }
    .home-main-light-subtitle {
        font-size: 1rem;
    }
    .home-main-light-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1em 0.7em;
    }
    .home-main-light-candle {
        width: 160px;
        padding: 0.4em 0.4em 0.1em 0.4em;
    }
    .home-main-light-candle img {
        width: 140px;
        height: 140px;
    }
    .home-main-light-label {
        font-size: 0.85rem;
    }
    .home-main-light-back {
        font-size: 1rem;
        padding: 0.4em 1em;
    }
    .home-main-light-wrapper {
        padding: 1.2em 0.2em 0.7em 0.2em;
    }
}
/* Variables and Reset */
:root {
    --primary-red: #D61C26;
    --primary-blue: #1E3B7B;
    --primary-black: #000000;
    --white: #ffffff;
    --yellow: rgb(253 185 19);
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--yellow);
}

/* Header Styles */
header {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--yellow);
    border-bottom: 1px solid var(--yellow);
    z-index: 2000; /* keep header above absolutely positioned images */
}

.logo-mobile img {
    width: 100%;
    height: auto;
}

header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    line-height: 1.2;
    font-size: 2rem;
    font-weight: 400;
    font-style: normal;
    color: var(--primary-black);
    font-kerning: none;
    text-decoration-line: none;
    text-decoration-thickness: initial;
    text-decoration-style: initial;
    text-align: center;
}

/* Desktop header branding (hidden on mobile via media query below) */
.logo-desktop {
    display: flex;              /* layout items horizontally */
    align-items: center;        /* vertical centering */
    gap: 18px;                  /* base spacing between items */
    padding: 10px 20px;         /* breathing room */
    width: 100%;
    max-width: 1400px;          /* contain width on large screens */
    margin: 0 auto;             /* center within header */
    position: relative;         /* enable z-index */
    z-index: 1000;              /* keep above overlapping images */
}

/* Left CSI crest */
.logo-desktop img:first-of-type {
    height: 58px;
    width: auto;
}

/* Title grows to fill the center, keeping right logos together */
.logo-desktop h2 {
    flex: 1;                    /* take remaining space, pushing right logos */
    color: var(--primary-black);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;        /* keep on one line */
}

/* Right-side logos (WHD + Don't Miss) */
.logo-desktop img:nth-of-type(2),
.logo-desktop img:nth-of-type(3) {
    height: 50px;
    width: auto;
}

/* Tighten spacing specifically between the two right logos */
.logo-desktop img:nth-of-type(3) {
    margin-left: 14px;
}

/* Main Content Styles */
.home-main {
    background-color: var(--primary-black);
    min-height: calc(100vh - 200px);
}

/* Desktop hero section (heart image + right text) */
.home-main.desktop {
    display: block;
}
.home-main.mobile {
    display: none;
}

.image-container-desktop {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}
.image-container-desktop > img:first-of-type {
    width: 100%;
    height: auto;
    display: block;
}
/* overlay text artwork positioned on the right red panel */
.image-container-desktop > img:nth-of-type(2) {
    position: absolute;
    right: 6%;
    top: 16%;
    width: 36%;
    height: auto;
    pointer-events: none;
}
/* place pledge button near the lower-right as per design */
.image-container-desktop .pledge-button {
    position: absolute;
    right: 9%;
    bottom: 8%;
    padding: 0;           /* reset center section spacing */
    background: none;
}
.image-container-desktop #pledgeBtnDesk {
    background-color: #183676;
    border: 3px solid #ffffff;
    border-radius: 40px;
    padding: 16px 34px;
    font-size: 1.05rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

.content-wrapper {
    background-color: var(--primary-black);
    padding: 20px;
    display: flex;
    position: relative;
}

.content-wrapper-home {
    background-color: var(--primary-black);
    padding-top: 20px;
    padding-bottom: 20px;
    padding-right: 20px;
    display: flex;
    position: relative;
}

.image-container {
    width: 100%;
    position: relative;
}

.image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.heart-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
}

.heart-icon img {
    width: 100%;
    height: auto;
}

.text-content {
    width: 50%;
    padding: 20px;
    color: var(--yellow);
}

.text-content h2 {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: bold;
    text-align: right;
}

/* Button Styles */
.pledge-button {
    text-align: center;
    padding: 30px 0;
    background-color: var(--primary-black);
}

button, .submit-btn, .upload-btn, .pledge-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: 2px solid var(--primary-red);
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

button:hover, .submit-btn:hover, .upload-btn:hover, .pledge-btn:hover {
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer Styles */
footer {
    padding: 20px;
    background-color: white;
    position: fixed;
    width: 100vw;
    bottom: 0;
}

.footer-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.whd-logo, .beat-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whd-logo img, .beat-logo img {
    height: 50px;
    width: auto;
}

.whd-logo span {
    color: var(--primary-black);
    font-weight: bold;
}

/* Doctors Page Styles */
.doctors-main {
    background-color: var(--primary-black);
    min-height: calc(100vh - 200px);
    padding: 20px;
    padding-left: 0;
    padding-right: 0;
}

.search-bar {
    display: flex;
    flex-direction: column;      /* stack input and count */
    align-items: flex-start;     /* left align */
    gap: 8px;                    /* spacing between input and count */
    margin-bottom: 30px;
    padding: 0 20px;
}

.search-bar input {
padding: 2px 10px;
    border-radius: 10px;
    border: none;
    width: 180px;
    font-size: 1rem;
    background: white url(img/search-icon.png) no-repeat 15px center;
    background-size: 20px;
}

.doctor-count {
    color: white;
    font-size: 1rem;
    white-space: nowrap;         /* keep it on one line */
    overflow: hidden;            /* avoid wrapping on small screens */
    text-overflow: ellipsis;     /* show ellipsis if too long */
    margin-left: 0;              /* reset from previous inline layout */
    text-align: left;            /* align with input */
}

img.doctor-photo {
    width: 40px;
    height: 40px;
}

.heart-collage {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 460px;
    background: url('img/doc.png') no-repeat center;
    background-size: 103vw 600px;
    background-position: center; 
}

.heart-collage .row {
    display: flex;
    justify-content: center;
    margin: -1px 0;
}

/* Special styling for top rows to create heart shape */
.heart-collage .row-1 {
    margin-bottom: 5px;
}

.heart-collage .row-2 {
    margin-bottom: 3px;
}

.heart-collage .photo-container {
    width: 40px;
    height: 40px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.doctor-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.doctor-photo:hover {
    transform: scale(1.5);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Upload Page Styles */
.upload-main {
    background-color: var(--primary-black);
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    text-align: center;
}

.upload-main h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 400;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.photo-preview {
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
    background-color: #000;
    border: 2px solid white;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Pledge Page Styles */
.pledge-main {
    background-color: var(--primary-black);
    padding: 40px 20px;
    min-height: 100vh;
}

/* Pledge page split layout */
.pledge-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.pledge-part-1,
.pledge-part-2 {
    flex: 0 0 50%;
    min-width: 0;
    color: white;
}

.pledge-part-1 { /* left column */
    display: block;
    padding: 50px;
}

.pledge-part-2 { /* right column */
    display: block;
}

.pledge-part-2 img:first-of-type {
    width: 44%;
    height: auto;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
}

.pledge-part-2 #share-doctor-photo {
    position: relative;
}

.pledge-part-2 img:nth-child(2) {
width: 40%;
    height: auto;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 58%;
    left: 56%;
    right: 0;
    bottom: 0;
}

.pledge-title {
    color: var(--yellow);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 40px;
    font-weight: 800;
}

.pledge-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: var(--yellow);
    padding-top: 30px;
    padding-bottom: 30px;
    padding-left: 50px;
    padding-right: 50px;
}

.form-group {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 30px;
    outline: none;
    color: var(--primary-blue);
}

.form-group input::placeholder {
    color: var(--primary-blue);
    opacity: 1;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    transition: 0.3s ease all;
    pointer-events: none;
    font-size: 1.2rem;
    display: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    left: 15px;
    font-size: 0.9rem;
    background-color: white;
    padding: 0 5px;
    transform: translateY(-50%);
}

/* Commandments Page Styles */
.commandments-main {
    background-color: var(--primary-black);
    min-height: calc(100vh - 100px);
    color: white;
}
.commandments-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto;
    height: 100vh; /* Ensure container fills viewport height */
}

.commandments-part-1,
.commandments-part-3 {
    flex: 0 0 20%;
    min-width: 0;
    display: block;
    position: relative;
    height: 100vh; /* Fill vertical space */
}

.commandments-part-2 {
    flex: 0 0 60%;
    min-width: 0;
    display: block;
    padding: 40px 20px;
    height: 100vh; /* Fill vertical space */
    overflow-y: auto;
}

.commandments-main h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.commandments-part-1 img,
.commandments-part-3 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* Fill area, crop if needed */
    display: block;
}

.commandments-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.commandment {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.2rem;
    cursor: pointer;
}

.commandment input[type="checkbox"] {
    flex: 0 0 20px;  /* Don't grow, don't shrink, stay at 20px */
    width: 20px;
    height: 20px;
    margin-top: 4px;
}

.commandment span {
    flex: 1;  /* Take up remaining space */
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}
.mobile,
.logo-mobile {
    display: none;
}
.logo-desktop {
    display: flex;
}
.footer-logos {
    display: flex;
}
.desktop {
    display: block;
}
.home-main.desktop {
    min-height: calc(100vh - 160px);
}
.image-container-desktop {
    display: flex;
}

/* Left CSI crest */
.image-container-desktop img:first-of-type {
    height: auto;
    width: 50%;
    padding: 10px;
}
/* Right-side logos (WHD + Don't Miss) */
.image-container-desktop img:nth-of-type(2){
    height: auto;
    width: 50%;
    padding: 50px;
}

.light-btn {
    margin-top:0.7em; font-size:1.5rem; font-weight:700; background:#ffe100; color:#000; border:none; border-radius:14px; padding:0.5em 2em; cursor:pointer; box-shadow:0 2px 8px #0003;
}
.light-text {
    color: #fff; font-size: 2.5rem; font-weight: 400; margin-bottom: 1.5em; line-height: 1.15; max-width: 600px; text-align: left;
}
@media (max-width: 768px) {
    .logo-desktop img:first-of-type {
    height: 40px;
    width: auto;
}
.logo-desktop img:nth-of-type(2), .logo-desktop img:nth-of-type(3) {
    height: 40px;
    width: auto;
}
    #light-candle-img {
        width: 130px;
    }
    .light-text {
        font-size: 1.5rem;
        text-align: center;
        margin: 0 auto;
        margin-bottom: 1em;
    }
    .light-btn.center {
        display: block;
        margin: 1em auto 0 auto;

    }
    .light-btn {
        font-size: 1.2rem;
        padding: 0.4em 1.5em;
    }
    .logo-desktop {
    display: flex;
}
    .mobile{
        display: block;
    }
    .desktop {
        display: none;
    }
    .footer-logos {
        display: flex;
    }
    .pledge-main {
        min-height: 100vh;
    }
    .commandments-main {
        min-height: 100vh;
    }
    .commandments-part-1,
    .commandments-part-3 {
        display: none;
    }

    .commandments-part-2 {
        flex: 0 0 100%;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    /* switch to mobile hero on smaller screens */
    .home-main.desktop { display: none; }
    .home-main.mobile { display: block;    min-height: 100vh }

    /* Pledge: show only left side on mobile */
    .pledge-container { flex-direction: column; gap: 0; }
    .pledge-part-1 { display: none;flex: 0 0 100%; width: 100%; padding: 0;}

    .content-wrapper {
        flex-direction: column;
    }

    .image-container, .text-content {
        width: 100%;
    }

    .text-content h2 {
        text-align: center;
        font-size: 2rem;
    }

    .pledge-title {
        font-size: 2rem;
    }

    .pledge-form {
        padding: 0 10px;
        background-color: #000;
    }

    .submit-btn {
        width: 100%;
    }
}


.preview-container {
            position: relative;
            width: 100vw;
            min-height: 100vh;
            overflow: hidden;
            background: rgb(230 230 230 / 0%);
        }
        .preview-container .mask-area {
            position: relative;
            width: 100vw;
            max-width: 600px;
            margin: 0 auto;
        }
        .preview-container .mask-bg {
            width: 100%;
            display: block;
            z-index: 2;
            position: absolute;
            height: 90vh;
        }
        .preview-container .doctor-photo {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 69.5%; /* height of mask in % of image */
            object-fit: cover;
        }
        .preview-container .footer-content {
            margin-top: -260px;
            padding-top: 20px;
            text-align: center;
            position: relative;
            z-index: 3;
        }
        .preview-container .doctor-details {
            color: #fff;
            font-size: 1.17rem;
            text-align: left;
            padding-left: 30px;
            padding-top: 80px;
        }
        .preview-container .doctor-details .name {
            font-weight: bold;
            font-size: 1.2rem;
        }
        .preview-container .doctor-details .designation,
        .preview-container .doctor-details .location {
            font-size: 1rem;
        }
        .preview-container .preview-container .preview-social {
            margin: 18px 0 15px 0;
            display: flex;
            justify-content: center;
            gap: 10px;
        }
        .preview-container .preview-social a {
            width: 16px;
            height: 16px;
            display: inline-block;
        }
        .preview-container .preview-social img {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
        }
        .preview-container .preview-actions {
            display: flex;
            justify-content: center;
            gap: 680px;
            margin-bottom: 30px;
        }
        .preview-social {
    text-align: right;
    margin-right: 20px;
}
.mask-area {
            height: 88vh; max-width: 600px;
        }

        .footer-logos img {
            max-height: 80px;
            width: 100px;
            object-fit: contain;
            margin: 0 1.5em;
        }

        @media (max-width: 780px) {

            .footer-logos img {
                max-height: 50px;
                width: 85vw;
                object-fit: contain;
                margin: 0 0.2em;
            }
            .preview-container .footer-content {
            margin-top: -60px;
            padding-top: 20px;
            text-align: center;
            position: relative;
            z-index: 3;
        }
                    .preview-container .preview-actions {
            display: flex;
            justify-content: center;
            gap: 22px;
            margin-bottom: 30px;
        }
            .preview-container .mask-area {
                max-width: 100vw;
            }
            .preview-container .doctor-photo {
                height: 50vw;
            }
            .preview-container {
            position: relative;
            width: 100vw;
            min-height: 100vh;
            overflow: hidden;
            background: var(--primary-black);
        }
        .mask-area {
            height: 70vh; max-width: 600px;
        }
                .preview-container .mask-bg {
            width: 100%;
            display: block;
            z-index: 2;
            position: absolute;
            height: auto;
        }
        .pledge-part-1.share-light {
    display: block
}
img#share-light-candle-img {
    width: 211px;
    margin: 0 auto;
    display: block;
    border-radius: 50%;
}
        }

        @media (min-width: 780px) {
           .preview-container .doctor-details {
                padding-top: 130px;
                width: 600px;
                margin: 0 auto;
           }
           .preview-container .preview-actions {
                margin-bottom: 0;
    position: absolute;
    left: 20vw;
    bottom: 1%;
           }
           .preview-social {
                position: absolute;
    bottom: 0;
    right: 30px;
           }
           .preview-container .preview-social img,
           .preview-container .preview-social a {
            width: 40px;
            height: 40px;
           }
           .search-bar {
                display: grid;
                grid-template-columns: 1fr auto;
                align-items: center;
                margin-bottom: 20px;
                gap: 16px;
           }
           .doctor-count {
                text-align: right;
                margin-right: 0;
           }

           .heart-collage {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
    background: url(img/doc.png) no-repeat center;
    background-size: 38vw 750px;
    background-position: center;
}
.heart-collage .photo-container {
    width: 50px;
    height: 50px;
    margin: 0;
    position: relative;
    z-index: 1;
}
.preview-container .mask-bg {
    height: 850px;
    max-height: 850px;
}
.preview-container .doctor-photo {
    top: 0;
    height: 850px !important;
}
.preview-container .mask-area {
    height: 850px;
}
.preview-container .preview-actions {
    position: relative;
    left: 0;
}
                    /* Move only the Share button 20px left without affecting the other button */
                    .preview-actions .share-btn {
                        position: relative;
    left: -60px;
    bottom: 50px;
                    }
                     .preview-actions .view-collage-btn {
                        position: relative;
                        bottom: 50px;
                    }
                    .preview-social {
    position: absolute;
    bottom: 50px;
    right: 0;
}
        }

@media (max-height: 700px) {
    main {
        height: auto !important;
        overflow-y: auto !important;
        min-height: 780px !important;
    }
    .pledge-main {
        height: auto !important;
        overflow-y: auto !important;
        min-height: 780px;
    }
    body {
        overflow-y: auto !important;
        height: auto !important;
    }
    .pledge-container {
        min-height: auto !important;
    }
}