/* =========================================================
   ANJANEYA NAGAR WELFARE ASSOCIATION
   style.css
========================================================= */

:root {
    /* ANWA purple palette */
    --primary: #7B3FC0;
    --primary-light: #D1C4E9;
    --accent: #9B7FD8;
    --dark: #3D0075;

    --navy-deep: #3D0075;
    --navy-soft: #5A0FAF;
    --cream: #FAF8FC;
    --white: #FFFFFF;
    --lavender: #514A71;
    --text: #172447;
    --muted: #6F7486;
    --blue-soft: #CFEAF3;
    --border: rgba(6, 24, 74, 0.12);

    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 12px;

    --shadow: 0 20px 50px rgba(6, 24, 74, 0.10);
    --shadow-hover: 0 25px 60px rgba(6, 24, 74, 0.16);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img {
    width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea {
    font-family: "Poppins", sans-serif;
}

button {
    cursor: pointer;
}

.container {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: 110px 0;
}

.centered {
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #5a199b;
    font-size: var(--font-14);
    font-weight: var(--weight-500);
}

.section-label::before {
    content: "";
    width: 25px;
    height: 2px;
    background: #5a199b;
}

.section-title {
    max-width: 750px;
    color: var(--dark);
    font-family: "Poppins", sans-serif;
    font-size: var(--font-40);
    font-weight: var(--weight-600);
    line-height: 1.05;
}

.section-title em {
    color: #5a199b;
    font-style: italic;
}

.section-description {
    max-width: 620px;
    margin-top: 20px;
    color: var(--muted);
    font-size: var(--font-14);
    line-height: 1.8;
}




.floating-shape {
    position: absolute;
    left: 0;
    bottom: 35px;
    width: 150px;
    height: 150px;
    border-radius: 45px 75px 75px 20px;
    background: #5a199b;
    transform: rotate(-8deg);
    opacity: .9;
    z-index: 1;
}

.floating-card {
    position: absolute;
    top: 50px;
    left: 25px;
    width: 180px;
    padding: 20px;
    border-radius: 20px;
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow);
    z-index: 5;
}

.floating-card strong {
    display: block;
    font-family: "Poppins", sans-serif;
    font-size: var(--font-32);
    line-height: 1;
}

.floating-card span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: var(--font-12);
    line-height: 1.5;
}


/* STATS */

.stats-wrapper {
    position: relative;
    z-index: 10;
    margin-top: -45px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 30px;
    border-radius: 25px;
    background: white;
    box-shadow: var(--shadow);
}

.stat {
    padding: 12px 25px;
    border-right: 1px solid var(--border);
}

.stat:last-child {
    border-right: none;
}

.stat-number {
    margin-bottom: 5px;
    color: var(--dark);
    font-family: "Poppins", sans-serif;
    font-size: var(--font-40);
    line-height: 1;
}

.stat-title {
    font-size: var(--font-12);
    font-weight: var(--weight-700);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-text {
    margin-top: 3px;
    color: var(--muted);
    font-size: var(--font-12);
}


/* ABOUT */

.about {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;
    gap: 90px;
}

.about-image {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    /* border-radius: 12px; */
    /* Replace with your actual image */
    background:linear-gradient(rgba(5,53,53,.08), rgba(5,53,53,.2)), url("../images/about-community.jpg") center / cover no-repeat;
}

.about-image::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -60px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: var(--accent);
}

.about-card {
    position: absolute;
    right: 25px;
    bottom: 25px;
    width: 220px;
    padding: 22px;
    /* border-radius: 12px; */
    background: white;
    box-shadow: var(--shadow);
}

.about-card strong {
    display: block;
    color: var(--dark);
    font-family: "Poppins", sans-serif;
    font-size: var(--font-18);
    font-weight: var(--weight-600);
    line-height: 1.1;
}

.about-card p {
    margin-top: 10px;
    color: var(--muted);
    font-size: var(--font-14);
    line-height: 1.6;
}

.about-content p {
    margin-top: 20px;
    color: var(--muted);
    font-size: var(--font-14);
    line-height: 1.8;
}

.about-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}

.about-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6f7486;
    font-size: var(--font-14);
    font-weight: var(--weight-400);
}

.check {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f7f7f7;
    color: #6f7486;
    font-size: var(--font-12);
}


/* INITIATIVES */

.initiatives-section {
    position: relative;
    overflow: hidden;
    background: #D1C4E940;
}

.initiatives-section::before {
    content: "COMMUNITY";
    position: absolute;
    top: 40px;
    right: -100px;
    color: rgba(5,53,53,.035);
    font-size: var(--font-128);
    font-weight: var(--weight-700);
    line-height: 1;
}

.initiatives-heading {
    position: relative;
    z-index: 2;
    margin-bottom: 55px;
    text-align: center;
}

.initiatives-heading .section-title {
    margin: 0 auto;
}

.initiative-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.initiative {
    overflow: hidden;
    border-radius: 12px;
    background: white;
    box-shadow: 0 15px 40px rgba(5,53,53,.01);
    transition: transform .35s ease, box-shadow .35s ease;
}

.initiative:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.initiative-image {
    height: 220px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.cleanliness-image {
    background-image:
        linear-gradient(rgba(5,53,53,.05), rgba(5,53,53,.15)),
        url("../images/cleanliness.jpg");
}

.security-image {
    background-image:
        linear-gradient(rgba(5,53,53,.05), rgba(5,53,53,.15)),
        url("../images/security.jpg");
}

.events-image {
    background-image:
        linear-gradient(rgba(5,53,53,.05), rgba(5,53,53,.15)),
        url("../images/events.jpg");
}

.greenery-image {
    background-image:
        linear-gradient(rgba(5,53,53,.05), rgba(5,53,53,.15)),
        url("../images/greenery.jpg");
}

.initiative-content {
    padding: 24px;
}

.initiative-content h3 {
    color: var(--dark);
    font-family: "Poppins", sans-serif;
    font-size: var(--font-18);
    line-height: 1.15;
    font-weight: var(--weight-600);
}

.initiative-content p {
    margin-top: 10px;
    color: var(--muted);
    font-size: var(--font-14);
    line-height: 1.6;
}

.learn-more {
    display: inline-block;
    margin-top: 15px;
    color: #7B3Fc0;
    font-size: var(--font-14);
    font-weight: var(--weight-500);
}


/* STORY */

.story-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 45px;
}

.text-link {
    flex-shrink: 0;
    color: #5a199b;
    font-size: var(--font-14);
    font-weight: var(--weight-500);
}

.story-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 20px;
}

.story-main {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    /* border-radius: 12px; */
    background: linear-gradient(transparent 35%, rgba(61,0,117,.7)), url("../images/community-event.jpg") center / cover no-repeat;
}

.story-text {
    position: absolute;
    right: 30px;
    bottom: 30px;
    left: 30px;
    color: white;
}

.story-tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 30px;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(8px);
    font-size: var(--font-12);
    font-weight: var(--weight-700);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.story-text h3 {
    max-width: 600px;
    font-family: "Poppins", sans-serif;
    font-size: var(--font-28);
    font-weight: var(--weight-600);
    line-height: 1.05;
}

.story-text p {
    max-width: 550px;
    margin-top: 12px;
    color: rgba(255,255,255,.75);
    font-size: var(--font-14);
}

.story-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

.story-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    /* border-radius: 12px; */
    background: #5A0FAF;
    color: white;
}

.story-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 150px;
    right: -70px;
    bottom: -70px;
    border-radius: 50%;
    background: #5a199b;
    opacity: .15;
}

.story-card.accent-card {
    background: #5A0FAF;
    color: #ffffff;
    font-weight: var(--weight-500);
    
    font-size: var(--font-24);
    line-height: 1.05;
}

.story-card.accent-card::after {
    background: white;
    opacity: .25;
}

.story-label {
    position: relative;
    z-index: 2;
    display: block;
    margin-bottom: 25px;
    font-size: var(--font-14);
    font-weight: var(--weight-500);
    /* opacity: .5; */
}

.story-card h3 {
    position: relative;
    z-index: 2;
    max-width: 340px;
    font-family: "Poppins", sans-serif;
    font-size: var(--font-24);
    line-height: 1.05;
    font-weight: var(--weight-500);
}

.story-card p {
    position: relative;
    z-index: 2;
    max-width: 340px;
    margin-top: 15px;
    font-size: var(--font-14);
    line-height: 1.5;
    font-weight: var(--weight-400);
    opacity: .7;
}


/* ANNOUNCEMENT */

.announcement {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
    overflow: hidden;
    padding: 60px;
    border-radius: 35px;
    background: var(--dark);
    color: white;
}

.announcement::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    right: -100px;
    top: -100px;
    border-radius: 50%;
    background: #5a199b;
    opacity: .25;
}

.announcement h2 {
    position: relative;
    z-index: 2;
    max-width: 700px;
    font-family: "Poppins", sans-serif;
    font-size: clamp(var(--font-32), 4vw, var(--font-48));
    line-height: 1.05;
}

.announcement p {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin-top: 15px;
    color: rgba(255,255,255,.65);
    font-size: var(--font-12);
}

.announcement .btn {
    position: relative;
    z-index: 5;
    white-space: nowrap;
}


/* GALLERY */

.gallery-section {
    background: var(--cream);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 45px;
}

.gallery-header .section-description {
    margin-bottom: 3px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr .75fr;
    grid-template-rows: 250px 250px;
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    background-position: center;
    background-size: cover;
    transition: transform .3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 45%, rgba(5,53,53,.65));
}

.gallery-item span {
    position: absolute;
    left: 20px;
    bottom: 18px;
    z-index: 2;
    color: white;
    font-size: var(--font-12);
    font-weight: var(--weight-700);
}

.gallery-large {
    grid-row: span 2;
}

.gallery-one {
    background-image: url("../images/community-event.jpg");
}

.gallery-two {
    background-image: url("../images/events.jpg");
}

.gallery-three {
    background-image: url("../images/greenery.jpg");
}

.gallery-four {
    background-image: url("../images/security.jpg");
}

.gallery-five {
    background-image: url("../images/community.jpg");
}


/* TESTIMONIALS */

.testimonials {
    background: white;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.testimonial {
    padding: 35px;
    border: 1px solid var(--border);
    /* border-radius: 25px; */
    transition: transform .3s ease, box-shadow .3s ease;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.quote {
    color: #5a199b;
    font-family: "Poppins", sans-serif;
    font-size: var(--font-48);
    line-height: .5;
}

.testimonial p {
    margin-top: 20px;
    color: var(--muted);
    font-size: var(--font-14);
    line-height: 1.8;
}

.resident {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
}

.resident-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* border-radius: 50%; */
    background: #e0aafe;
    color: var(--dark);
    font-size: var(--font-12);
    font-weight: var(--weight-700);
}

.resident strong {
    display: block;
    color: var(--dark);
    font-size: var(--font-12);
}

.resident span {
    color: var(--muted);
    font-size: var(--font-12);
}


/* CONTACT */

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    padding-right: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.contact-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e0aafe;
    color: #5a199b;
    font-size: var(--font-18);
}

.contact-item strong {
    display: block;
    color: var(--dark);
    font-size: var(--font-12);
}

.contact-item span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: var(--font-12);
}

.contact-form {
    padding: 35px;
    border-radius: 30px;
    background: white;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--dark);
    font-size: var(--font-12);
    font-weight: var(--weight-700);
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--cream);
    color: var(--dark);
    font-size: var(--font-12);
    transition: border-color .3s ease, box-shadow .3s ease;
}

.form-group input {
    height: 48px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9BA7A5;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #5a199b;
    box-shadow: 0 0 0 3px rgba(29,192,93,.08);
}

.form-message {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: var(--font-12);
    font-weight: var(--weight-600);
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: #e0aafe;
    color: #245A9C;
}

.form-message.error {
    background: #fff0f0;
    color: #B04A55;
}



/* BACK TO TOP */

.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #5a199b;
    color: #ffffff;
    font-size: var(--font-20);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #7b2bbe;
    transform: translateY(-3px);
}


/* SCROLL REVEAL */

.reveal-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal-ready.visible {
    opacity: 1;
    transform: translateY(0);
}


/* TABLET */

@media (max-width: 1000px) {

    .container {
        width: min(100% - 32px, 1180px);
    }

    .hero-content {
        gap: 25px;
    }

    .about {
        gap: 45px;
    }

    .initiative-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 240px 240px 240px;
    }

    .gallery-large {
        grid-row: span 2;
    }
}


/* MOBILE NAVIGATION */

@media (max-width: 800px) {

    .navbar {
        min-height: 75px;
    }

    .menu-button {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 75px;
        left: 15px;
        right: 15px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 25px;
        border-radius: 20px;
        background: var(--dark);
        box-shadow: 0 20px 50px rgba(0,0,0,.25);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 120px;
    }

    .hero {
        min-height: 950px;
    }

    .hero-content {
        min-height: 950px;
        align-items: start;
    }

    .hero-visual {
        height: 400px;
    }

    .hero-image {
        width: 82%;
        height: 350px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat:nth-child(2) {
        border-right: none;
    }

    .about {
        grid-template-columns: 1fr;
    }

    .about-image {
        min-height: 430px;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .contact {
        grid-template-columns: 1fr;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .gallery-header {
        display: block;
    }

    .gallery-header .section-description {
        margin-top: 20px;
    }
}


/* SMALL MOBILE */

@media (max-width: 600px) {

    .container {
        width: calc(100% - 28px);
    }

    .section {
        padding: 75px 0;
    }

    .hero-title {
        font-size: var(--font-48);
    }

    .hero-description {
        font-size: var(--font-12);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-visual {
        height: 350px;
    }

    .hero-image {
        width: 88%;
        height: 310px;
    }

    .floating-card {
        width: 145px;
        padding: 15px;
    }

    .floating-card strong {
        font-size: var(--font-28);
    }

    .floating-shape {
        width: 110px;
        height: 110px;
    }

    .stats {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .stat {
        padding: 17px 15px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .stat:last-child {
        border-bottom: none;
    }

    .about-image {
        min-height: 360px;
    }

    .about-list {
        grid-template-columns: 1fr;
    }

    .initiative-grid {
        grid-template-columns: 1fr;
    }

    .initiative-image {
        height: 210px;
    }

    .story-header {
        display: block;
    }

    .text-link {
        display: inline-block;
        margin-top: 20px;
    }

    .story-main {
        min-height: 400px;
    }

    .story-text h3 {
        font-size: var(--font-32);
    }

    .announcement {
        grid-template-columns: 1fr;
        padding: 35px 25px;
        gap: 25px;
    }

    .announcement h2 {
        font-size: var(--font-40);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 220px);
    }

    .gallery-large {
        grid-row: auto;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 44px;
        height: 44px;
    }
}


/* EXTRA SMALL */

@media (max-width: 380px) {

    .hero-title {
        font-size: var(--font-40);
    }

    .section-title {
        font-size: var(--font-32);
    }

    .hero {
        min-height: 900px;
    }

    .hero-content {
        min-height: 900px;
    }

    .hero-image {
        width: 85%;
        height: 280px;
    }

    .floating-card {
        left: 5px;
        width: 135px;
    }
}


/* ACCESSIBILITY */

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   REFERENCE IMAGE COLOR & VISUAL OVERRIDES
========================================================= */

.hero .btn-primary,
.nav-button,
.back-to-top {
    background: #5a199b;
    color: #ffffff;
    font-weight: 600;
}

.hero .btn-primary:hover,
.nav-button:hover {
    background: #D1C4E9;
}

.hero-title em,
.section-title em,
.section-label,
.learn-more,
.text-link {
    color: var(--accent);
}

.section-label::before {
    background: var(--accent);
}

.check,
.contact-icon {
    background: #6f748620;
    color: #6f7486;
}

.initiatives-section::before {
    color: rgba(6, 24, 74, .035);
}

.story-card {
    background: var(--navy-deep);
}

.story-card.accent-card {
    background: var(--accent);
}

.gallery-item::before {
    background: linear-gradient(
        transparent 42%,
        rgba(2, 13, 57, .72)
    );
}

.announcement {
    background:
        linear-gradient(
            120deg,
            var(--navy-deep),
            var(--dark)
        );
}

.announcement::after {
    background: var(--accent);
}

.hero-image {
    border-radius: 38px 38px 38px 75px;
}

.floating-shape {
    background: var(--accent);
}

.floating-card {
    border: 1px solid rgba(6, 24, 74, .05);
}

.initiative,
.testimonial,
.contact-form,
.stats {
    border-color: rgba(6, 24, 74, .08);
}

.footer-column h4 {
    color: var(--accent);
}


