/* Variables and Reset */
:root {
    --primary-red: #D61C26;
    --primary-blue: #1E3B7B;
    --white: #ffffff;
}

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

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

/* Header Styles */
header {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--white);
    border-bottom: 1px solid #eee;
    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-red);
    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-red);
    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-red);
    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-red);
    padding: 20px;
    display: flex;
    position: relative;
}

.content-wrapper-home {
    background-color: var(--primary-red);
    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(--white);
}

.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-red);
}

button, .submit-btn, .upload-btn, .pledge-btn {
    background-color: #183676;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    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;
}

.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-red);
    font-weight: bold;
}

/* Doctors Page Styles */
.doctors-main {
    background-color: var(--primary-red);
    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-red);
    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-red);
    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;
}

.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 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(--white);
    text-align: center;
    font-size: 3rem;
    margin-bottom: 40px;
    font-weight: 800;
}

.pledge-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid var(--primary-blue);
    background-color: white;
    border-radius: 1px;
    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-red);
    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 */
}

.commandment.select-all {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.commandment.select-all span {
    font-size: 1.3rem;
    color: #fff;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}
.mobile,
.logo-mobile {
    display: none;
}
.logo-desktop {
    display: flex;
}
.footer-logos {
    display: none;
}
.desktop {
    display: block;
}
.home-main.desktop {
    min-height: 100vh;
}
.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;
}

@media (max-width: 768px) {
    .mobile,
    .logo-mobile {
        display: block;
    }
    .logo-mobile {
        display: none;
    }
    .desktop {
        display: none;
    }
    .footer-logos {
        display: flex;
    }
    .pledge-main {
        min-height: calc(100vh - 225px);
    }
    .commandments-main {
        min-height: calc(100vh - 200px);
    }
    .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; }

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

    .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;
    }

    .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;
        }
        @media (max-width: 780px) {
            .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-red);
        }
        .mask-area {
            height: 70vh; max-width: 600px;
        }
                .preview-container .mask-bg {
            width: 100%;
            display: block;
            z-index: 2;
            position: absolute;
            height: auto;
        }
        }

        @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: 900px;
    max-height: 900px;
}
.preview-container .doctor-photo {
    top: 0;
    height: 900px !important;
}
.preview-container .mask-area {
    height: 900px;
}
.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;
}
        }