@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://www.onlinewebfonts.com/download/355274112f5cb0c7ac7dbad75f2f5430');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('../images/barangay_front_pic.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f9f9f9;
    text-align: center;
    color: #333;
    padding: 20px;
}

.container {
    position: relative;
    width: 900px;
    height: 600px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
    margin: 20px;
    overflow: hidden;
}

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

.container.active .form-box {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
}

.container.active .form-box.register {
    visibility: visible;
}

form {
    width: 100%;
}

.container h1 {
    font-size: 36px;
    margin: -10px 0;
    color: #40916C;
}

.input-box {
    position: relative;
    margin: 12px 0;
}

.input-box input {
    width: 100%;
    padding: 12px 12px 12px 12px;
    background: #f7f7f7;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.input-box input::placeholder {
    color: #999;
    font-weight: 400;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #40916C;
}

.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-size: 14.5px;
    color: #40916C;
    text-decoration: none;
    font-weight: 600;
}

.btn {
    width: 100%;
    height: 38px;
    background: #40916C;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #357d5a;
    transform: scale(1.02);
}

.container p {
    font-size: 14.5px;
    margin: 15px 0;
}

.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 24px;
    color: #40916C;
    text-decoration: none;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    border-color: #40916C;
    background: rgba(64, 145, 108, 0.08);
}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
}

.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, #dbeade, #40916C);
    border-radius: 150px;
    transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: .6s ease-in-out;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel .btn {
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

/* Enhanced Pop-up Modal Styling */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 16px;
    overflow-y: auto;
}

.popup-content {
    position: relative;
    margin: 30px auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    max-width: 700px;
    width: 85%;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 15px;
    position: relative;
}

.popup-header h2 {
    color: #40916C;
    font-size: 28px;
    margin: 0;
    font-weight: 700;
}

.popup-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.6;
}

.popup-body::-webkit-scrollbar {
    width: 8px;
}

.popup-body::-webkit-scrollbar-thumb {
    background-color: #c1e3d6;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 10px;
}

.popup-body h3 {
    color: #40916C;
    margin-top: 0;
    font-size: 22px;
}

.popup-body h4 {
    color: #40916C;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
    border-left: 4px solid #40916C;
    padding-left: 12px;
}

.popup-body p {
    margin: 10px 0;
    color: #444;
    text-align: justify;
}

.popup-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.popup-body li {
    margin-bottom: 8px;
    color: #444;
    text-align: left;
}

.terms-date {
    color: #777;
    font-style: italic;
    font-size: 14px;
    margin-bottom: 20px !important;
}

.close-popup {
    position: absolute;
    top: 0;
    right: 0;
    background-color: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #40916C;
    padding: 0 8px;
    transition: all 0.2s;
}
.popup-body h4 {
    text-align: left;
}


.input-box input[type="checkbox"] {
    float: left;
    margin-right: 8px;
}

.close-popup:hover {
    color: #357d5a;
    transform: scale(1.1);
}

.popup-footer {
    margin-top: 25px;
    text-align: right;
    border-top: 2px solid #e8f5e9;
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.accept-button, .decline-button {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.accept-button {
    background-color: #40916C;
    color: white;
    border: none;
}

.accept-button:hover {
    background-color: #357d5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.decline-button {
    background-color: white;
    color: #777;
    border: 1px solid #ddd;
}

.decline-button:hover {
    background-color: #f9f9f9;
    color: #555;
}

.input-box {
    font-size: 12px;
}

.input-box input[type="checkbox"] {
    vertical-align: middle;
    accent-color: #40916C;
}

.input-box i {
    top: 50%;
    transform: translateY(-50%);
}

.input-box input[type="checkbox"] + i {
    margin-left: 5px;
}

.checkbox-group {
    font-size: 13px;
    padding-bottom: 10px;
    text-align: left;
}

.input-box a {
    color: #40916C;
    text-decoration: none;
    font-weight: 600;
}

.input-box a:hover {
    text-decoration: underline;
}

.input-box input[type="text"],
.input-box input[type="password"],
.input-box input[type="email"] {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.input-box input[type="text"]:focus,
.input-box input[type="password"]:focus,
.input-box input[type="email"]:focus {
    box-shadow: 0 4px 8px rgba(62, 122, 101, 0.3);
}

/* Checkbox styling */
.input-box input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
}

.input-box input[type="checkbox"]:checked {
    box-shadow: 0 1px 3px rgba(62, 122, 101, 0.5);
}

.btn {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.btn:hover {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.btn:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.toggle-panel .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-panel .btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.forgot-link{
   margin-left: 230px;
}
.forgot-link a,
#terms-link,
#privacy-link {
    transition: text-shadow 0.3s ease;
}

.forgot-link a:hover,
#terms-link:hover,
#privacy-link:hover {
    text-shadow: 0 0 1px rgba(62, 122, 101, 0.5);
}

#forgot-password-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

#forgot-password-popup .popup-content {
    position: relative;
    margin: 10% auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 85%;
    animation: fadeIn 0.3s ease-out;
}

#forgot-password-popup .popup-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 15px;
    position: relative;
}

#forgot-password-popup .popup-header h2 {
    color: #40916C;
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

#forgot-password-popup .popup-body {
    padding: 10px 0;
    line-height: 1.6;
}

#forgot-password-popup .popup-body p {
    margin: 0 0 15px 0;
    color: #444;
}

#forgot-password-popup .popup-body .input-box {
    margin: 20px 0;
}

#forgot-password-popup .popup-footer {
    margin-top: 25px;
    text-align: right;
    border-top: 2px solid #e8f5e9;
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}
#otp-verification-popup .popup-content,
#reset-password-popup .popup-content {
    position: relative;
    margin: 10% auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 85%;
    animation: fadeIn 0.3s ease-out;
}

#otp-verification-popup .popup-header,
#reset-password-popup .popup-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 15px;
    position: relative;
}

#otp-verification-popup .popup-header h2,
#reset-password-popup .popup-header h2 {
    color: #40916C;
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

#otp-verification-popup .popup-body,
#reset-password-popup .popup-body {
    padding: 10px 0;
    line-height: 1.6;
}

#otp-verification-popup .popup-body p,
#reset-password-popup .popup-body p {
    margin: 0 0 15px 0;
    color: #444;
}

#otp-verification-popup .popup-body .input-box,
#reset-password-popup .popup-body .input-box {
    margin: 20px 0;
}

#otp-verification-popup .popup-footer,
#reset-password-popup .popup-footer {
    margin-top: 25px;
    text-align: right;
    border-top: 2px solid #e8f5e9;
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

#otp-code {
    letter-spacing: 8px;
    font-size: 18px;
    text-align: center;
    font-weight: 600;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .popup-content {
        padding: 20px;
        width: 90%;
        margin: 20px auto;
    }
    
    .popup-body {
        max-height: 50vh;
    }
    
    .popup-header h2 {
        font-size: 24px;
    }
    
    .popup-body h3 {
        font-size: 20px;
    }
    
    .popup-body h4 {
        font-size: 16px;
    }
}

@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: 70%;
    }

    .container.active .form-box {
        right: 0;
        bottom: 30%;
    }

    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }

    .container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .toggle-panel {
        width: 100%;
        height: 30%;
    }

    .toggle-panel.toggle-left {
        top: 0;
    }

    .container.active .toggle-panel.toggle-left {
        left: 0;
        top: -30%;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }

    .container.active .toggle-panel.toggle-right {
        bottom: 0;
    }
}

@media screen and (max-width: 100px) {
    .form-box {
        padding: 20px;
    }

    .toggle-panel h1 {
        font-size: 30px;
    }
}