
/* 
   PANNALA PRADESHIYA SABHA
   STREET LIGHT COMPLAINTS PAGE
 */

* {
    box-sizing: border-box;
}

:root {
    --complaint-dark: #2d3346;
    --complaint-gold: #dda66c;
    --complaint-white: #ffffff;
}

/*  PAGE BANNER */

.complaints-banner {
    position: relative;
    width: 100%;
    height: 510px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    overflow: hidden;
}

/* BANNER IMAGE */

.complaints-banner-bg {
    position: absolute;
    inset: 0;

    background-image: url("../images/community2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    animation: complaintBannerZoom 14s ease-in-out infinite alternate;
}

/* IMAGE OVERLAY */

.complaints-banner-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.22);
}

/* BANNER TITLE */

.complaints-banner-content {
    position: relative;
    z-index: 2;

    width: 95%;
    max-width: 1150px;
    margin: 0 auto;
}

.complaints-banner-content h1 {
    margin: 0;

    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: clamp(34px, 5.2vw, 75px);
    font-weight: 800;
    line-height: 1.55;

    color: var(--complaint-white);

    animation: complaintTitleEntrance 1.2s ease both;
}

/* BREADCRUMB */

.complaints-breadcrumb {
    position: absolute;
    bottom: 18px;
    left: 0;

    width: 100%;
    z-index: 3;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;

    padding: 0 15px;

    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 15px;

    animation: complaintFadeUp 1.5s ease both;
}

.complaints-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.complaints-breadcrumb a:hover {
    color: var(--complaint-gold);
}

.complaints-breadcrumb i {
    color: #ffffff;
    font-size: 12px;
}

.complaints-breadcrumb span {
    color: var(--complaint-gold);
}

/* DECORATIVE DIVIDER */

.complaints-divider {
    width: 100%;
    min-height: 105px;

    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-design {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    color: var(--complaint-gold);
}

.divider-design span {
    display: block;
    width: 39px;
    height: 2px;
    background: var(--complaint-gold);
}

.divider-design i {
    font-size: 21px;
}

/* FORM SECTION BACKGROUND */

.complaints-section {
    position: relative;
    width: 100%;

    padding: 25px 0 70px;

    background-image: url("../images/building.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    overflow: hidden;
}

/* LIGHT IMAGE OVERLAY */

.complaints-section-overlay {
    position: absolute;
    inset: 0;

    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* CONTENT CONTAINER */

.complaints-container {
    position: relative;
    z-index: 2;

    width: 87%;
    max-width: 1170px;
    margin: 0 auto;
}

/* FORM HEADING */

.complaints-heading {
    text-align: center;
    margin-bottom: 85px;
}

.complaints-heading h2 {
    margin: 0 0 20px;

    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: clamp(30px, 4.2vw, 58px);
    font-weight: 800;
    line-height: 1.6;

    color: var(--complaint-dark);
}

.complaints-heading .divider-design {
    margin-top: 10px;
}

/* COMPLAINT FORM */

.complaints-form {
    width: 100%;
    margin: 0 auto;
}

/* TWO COLUMN LAYOUT */

.complaints-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    column-gap: 42px;
    row-gap: 40px;

    margin-bottom: 40px;
}

.form-group {
    width: 100%;
}

/* INPUT FIELDS */

.complaints-form input,
.complaints-form textarea {
    display: block;
    width: 100%;

    background: #ffffff;
    color: #344055;

    border: 1px solid transparent;
    border-radius: 0;
    outline: none;

    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 16px;
    font-weight: 400;

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.complaints-form input {
    height: 52px;
    padding: 10px 20px;
}

.complaints-form textarea {
    min-height: 270px;
    padding: 15px 20px;
    resize: vertical;
}

/* PLACEHOLDERS */

.complaints-form input::placeholder,
.complaints-form textarea::placeholder {
    color: #8094ae;
    opacity: 1;
}

/* FOCUS ANIMATION */

.complaints-form input:focus,
.complaints-form textarea:focus {
    border-color: var(--complaint-gold);

    box-shadow:
        0 0 0 3px rgba(221, 166, 108, 0.14);

    transform: translateY(-2px);
}

/* MESSAGE FIELD */

.message-group {
    width: 100%;
    margin-bottom: 40px;
}

/* SUBMIT BUTTON */

.complaints-submit {
    position: relative;
    display: block;

    width: 100%;
    min-height: 51px;

    padding: 12px 20px;

    border: none;
    border-radius: 3px;

    background: var(--complaint-gold);
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;

    cursor: pointer;
    overflow: hidden;

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.complaints-submit:hover {
    background: #c88d51;
    transform: translateY(-3px);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.16);
}

.complaints-submit:active {
    transform: translateY(0);
}

/* BUTTON SHINE ANIMATION */

.complaints-submit::before {
    content: "";

    position: absolute;
    top: 0;
    left: -120%;

    width: 60%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );

    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.complaints-submit:hover::before {
    left: 150%;
}

/* FORM MESSAGES */

.form-alert {
    padding: 15px 20px;
    margin-bottom: 25px;

    font-family: 'Noto Sans Sinhala', sans-serif;
    font-size: 15px;
}

.form-alert.error {
    background: #fff0f0;
    border-left: 4px solid #d94a4a;
    color: #a02c2c;
}

.form-alert.success {
    background: #edf9ef;
    border-left: 4px solid #3b9b55;
    color: #246a35;
}

/* SCROLL REVEAL ANIMATION */

.reveal {
    opacity: 0;
    transform: translateY(55px);

    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* KEYFRAME ANIMATIONS */

@keyframes complaintBannerZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

@keyframes complaintTitleEntrance {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes complaintFadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BACK TO TOP BUTTON */

#complaintsBackToTop {
    position: fixed;
    right: 40px;
    bottom: 35px;

    z-index: 1000;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #85858b;
    color: #ffffff;

    border: none;
    border-radius: 0;

    font-size: 16px;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        background 0.3s ease,
        transform 0.3s ease;
}

#complaintsBackToTop.visible {
    opacity: 1;
    visibility: visible;
}

#complaintsBackToTop:hover {
    background: var(--complaint-gold);
    transform: translateY(-5px);
}

/* RESPONSIVE - TABLET */

@media (max-width: 992px) {

    .complaints-banner {
        height: 430px;
    }

    .complaints-container {
        width: 92%;
    }

    .complaints-heading {
        margin-bottom: 55px;
    }

    .complaints-form-grid {
        column-gap: 25px;
        row-gap: 25px;
    }

    .complaints-section {
        background-attachment: scroll;
    }
}

/* RESPONSIVE - MOBILE */

@media (max-width: 768px) {

    .complaints-banner {
        height: 330px;
    }

    .complaints-banner-content h1 {
        font-size: 34px;
        line-height: 1.6;
    }

    .complaints-breadcrumb {
        bottom: 15px;
        font-size: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .complaints-divider {
        min-height: 75px;
    }

    .complaints-section {
        padding: 30px 0 50px;
    }

    .complaints-container {
        width: 92%;
    }

    .complaints-heading {
        margin-bottom: 35px;
    }

    .complaints-heading h2 {
        font-size: 29px;
    }

    .complaints-form-grid {
        grid-template-columns: 1fr;
        row-gap: 20px;
        margin-bottom: 20px;
    }

    .complaints-form input {
        height: 52px;
    }

    .complaints-form textarea {
        min-height: 220px;
    }

    .message-group {
        margin-bottom: 25px;
    }

    .complaints-submit {
        font-size: 17px;
    }

    #complaintsBackToTop {
        right: 15px;
        bottom: 15px;
        width: 43px;
        height: 43px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* 
   COMPLAINTS PAGE
   REMOVE BLACK RECTANGLE BORDERS
   KEEP ALL ANIMATIONS AND BACKGROUND IMAGES
 */

/* 1. REMOVE BORDER AROUND HEADING */

.complaints-heading,
.complaints-heading.reveal,
.complaints-heading h2,
.complaints-heading .divider-design {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 2. REMOVE BORDER AROUND FORM */

.complaints-form,
.complaints-form.reveal,
#complaintsForm {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* 3. REMOVE BORDER FROM FORM CONTAINERS */

.complaints-container,
.complaints-form-grid,
.complaints-form .form-group,
.complaints-form .message-group {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 4. REMOVE EXTRA RECTANGLES FROM PSEUDO ELEMENTS */

.complaints-heading::before,
.complaints-heading::after,
.complaints-form::before,
.complaints-form::after,
.complaints-container::before,
.complaints-container::after {
    content: none !important;
    display: none !important;
}

/* 5. KEEP FORM INPUTS WHITE */

.complaints-form input,
.complaints-form textarea {
    background: #ffffff !important;
    border: none !important;
    outline: none;
    border-radius: 0;
    box-shadow: none;
}

/* 6. INPUT FOCUS ANIMATION */

.complaints-form input:focus,
.complaints-form textarea:focus {
    border: none !important;
    outline: none !important;

    box-shadow:
        0 0 0 2px rgba(221, 166, 108, 0.35) !important;

    transform: translateY(-2px);
}

/* 7. KEEP BACKGROUND IMAGE */

.complaints-section {
    position: relative;
    width: 100%;

    background-image: url("../images/building.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 8. KEEP HEADING CENTERED */

.complaints-heading {
    width: 100%;
    text-align: center;
    margin-bottom: 85px;
}

.complaints-heading h2 {
    color: #2d3346;
    font-family: 'Noto Sans Sinhala', sans-serif;
    font-weight: 800;
}

/* 9. KEEP FORM CENTERED */

.complaints-form {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 10. KEEP TWO COLUMN FORM */

.complaints-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 42px;
    row-gap: 40px;
}

/* 11. KEEP GOLD SUBMIT BUTTON */

.complaints-submit {
    background: #dda66c;
    color: #ffffff;

    border: none !important;
    outline: none !important;

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.complaints-submit:hover {
    background: #c88d51;
    transform: translateY(-3px);
}

/* 12. KEEP SCROLL ANIMATIONS */

.complaints-heading.reveal,
.complaints-form.reveal {
    opacity: 0;
    transform: translateY(55px);

    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.complaints-heading.reveal.active,
.complaints-form.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 13. RESPONSIVE MOBILE */

@media (max-width: 768px) {

    .complaints-form-grid {
        grid-template-columns: 1fr;
        row-gap: 20px;
    }

    .complaints-heading {
        margin-bottom: 35px;
    }

    .complaints-container {
        width: 92%;
    }

    .complaints-section {
        background-attachment: scroll;
    }
}
