/*
Theme Name: CT Community
Description: Lightweight, responsive real estate community theme.
Version: 1.0.2
Author: CT Community
Text Domain: ct-community
*/

/* GLOBAL DESIGN SETTINGS */

:root {
    --navy: #142b45;
    --blue: #2463a0;
    --white: #ffffff;
    --background: #f5f7fa;
    --text: #263445;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

h1, h2, h3, h4 {
    color: var(--navy);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 48px);
}

h2 {
    font-size: clamp(24px, 3vw, 34px);
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    height: auto;
}

iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

/* HEADER AND NAVIGATION */

.site-header {
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 85px;
}

.site-brand,
.site-brand a {
    color: var(--white);
    font-size: 24px;
    font-weight: 750;
    line-height: 1.2;
}

.site-brand:hover,
.site-brand a:hover {
    color: var(--white);
    text-decoration: none;
}

.site-brand small {
    display: block;
    color: #b9cce0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 5px;
}

.site-nav ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-nav a {
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
    color: #b9d9f7;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline-color: #b9d9f7;
}

.menu-toggle {
    display: none;
}

/* HOMEPAGE HERO */

.hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    background-color: var(--navy);
    background-size: cover;
    background-position: center;
    color: var(--white);
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 45, 0.55);
    z-index: -1;
}

.hero-content {
    padding: 60px 0;
    max-width: 750px;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 16px;
}

.hero p {
    font-size: 19px;
    margin-bottom: 28px;
}

/* BUTTONS */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    text-align: center;
    transition: background 0.2s ease;
}

.button:hover {
    background: var(--blue);
    color: var(--white);
    text-decoration: none;
}

.button-light {
    background: var(--white);
    color: var(--navy);
}

.button-outline {
    background: transparent;
    border-color: currentColor;
    color: inherit;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* PAGE SECTIONS */

.section {
    padding: 60px 0;
}

.section-light {
    background: var(--background);
}

.page-content {
    padding: 40px 0 60px;
    overflow-wrap: break-word;
}

.section-heading {
    text-align: center;
    margin-bottom: 32px;
}

/* COMMUNITY CARDS */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.community-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.community-card h3 {
    margin-bottom: 12px;
}

/* FEATURED LISTING */

.featured-listing {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

/* SELLER SECTION */

.seller-section {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}

.seller-section h2 {
    color: var(--white);
}

/* CONTACT FORMS */

input,
select,
textarea,
button {
    font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

textarea {
    min-height: 120px;
}

/* WEBSITE FOOTER */

.site-footer {
    background: var(--navy);
    color: var(--white);
    padding: 40px 0 100px;
    overflow-wrap: break-word;
}

.site-footer a,
.site-footer h2,
.site-footer h3 {
    color: var(--white);
}

.site-footer a:hover {
    color: #b9d9f7;
}

.ctc-footer-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,.2);
    margin: 30px 0 20px;
}

.ctc-footer-legal {
    font-size: 13px;
    color: #d5e0eb;
    line-height: 1.6;
}

.ctc-footer-legal p {
    margin: 10px 0;
}

.ctc-association-disclaimer {
    font-size: 13px;
    color: #d5e0eb;
    line-height: 1.6;
    margin-top: 15px;
}

/* FLOATING CONTACT BAR - DESKTOP */

.mobile-contact {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    background: var(--navy);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    box-shadow: 0 5px 22px rgba(0,0,0,.22);
    overflow: hidden;
    z-index: 9999;
}

.mobile-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 14px 22px;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.mobile-contact a.floating-call {
    background: var(--blue);
    color: var(--white);
}

.mobile-contact a.floating-inquiry {
    background: var(--navy);
    color: var(--white);
}

.mobile-contact a:hover {
    background: #326fa8;
    color: var(--white);
    text-decoration: none;
}

.mobile-contact a:focus-visible {
    outline: 3px solid #b9d9f7;
    outline-offset: -4px;
}

.ctc-call-desktop {
    display: inline;
}

.ctc-call-mobile {
    display: none;
}

/* TABLETS */

@media (max-width: 1024px) {

    .header-inner {
        flex-wrap: wrap;
    }

    .site-nav ul {
        gap: 16px;
    }

    .hero {
        min-height: 400px;
    }

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

/* MOBILE DEVICES */

@media (max-width: 767px) {

    body {
        padding-bottom: calc(
            56px + env(safe-area-inset-bottom, 0px)
        );
    }

    html {
        scroll-padding-bottom: calc(
            64px + env(safe-area-inset-bottom, 0px)
        );
    }

    .header-inner {
        min-height: 72px;
        gap: 12px;
    }

    .site-brand,
    .site-brand a {
        font-size: 20px;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        color: var(--white);
        border: 1px solid rgba(255,255,255,.35);
        border-radius: 6px;
        padding: 8px 12px;
        cursor: pointer;
    }

    .site-nav {
        display: none;
        width: 100%;
        padding-bottom: 20px;
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .site-nav a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,.15);
    }

    .hero {
        min-height: 360px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .hero p {
        font-size: 16px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .button {
        width: 100%;
    }

    .section {
        padding: 36px 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .community-card {
        padding: 22px;
    }

    /* MOBILE FOOTER */

    .site-footer {
        padding: 32px 0;
    }

    .ctc-footer-legal,
    .ctc-association-disclaimer {
        font-size: 12px;
        line-height: 1.6;
    }

    /* FLOATING CONTACT BAR - MOBILE */

    .mobile-contact {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        border: 0;
        border-radius: 0;
        background: var(--navy);
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        margin: 0;
        box-shadow: 0 -3px 15px rgba(0,0,0,.15);
    }

    .mobile-contact a {
        flex: 1 1 0;
        min-width: 0;
        min-height: 52px;
        padding: 10px 6px;
        font-size: 14px;
        gap: 6px;
        white-space: nowrap;
    }

    .ctc-call-desktop {
        display: none;
    }

    .ctc-call-mobile {
        display: inline;
    }
}

/* ACCESSIBILITY */

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

    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}/* ==========================================
   CT COMMUNITY - FOOTER & STICKY CONTACT
   ========================================== */

/* Keep association disclaimer in normal footer */

body .ctc-association-disclaimer {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 12px 0 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    opacity: 0.8;
}

/* Hide previous floating contact bar */

.mobile-contact {
    display: none !important;
}

/* New sticky contact bar */

.ctc-sticky-contact {
    display: none;
}

@media (max-width: 767px) {

    body:has(.ctc-sticky-contact) {
        padding-bottom: calc(
            105px + env(safe-area-inset-bottom)
        ) !important;
    }

    .ctc-sticky-contact {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 9999;
        background: #142b45;
        padding: 10px 16px
            calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    }

    .ctc-sticky-heading {
        color: #ffffff;
        text-align: center;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.3px;
        margin-bottom: 8px;
    }

    .ctc-sticky-buttons {
        display: flex;
        gap: 10px;
    }

    .ctc-sticky-buttons a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none !important;
        box-sizing: border-box;
    }

    .ctc-sticky-call {
        background: #ffffff;
        color: #142b45 !important;
        border: 1px solid #ffffff;
    }

    .ctc-sticky-inquiry {
        background: transparent;
        color: #ffffff !important;
        border: 1px solid #ffffff;
    }

}/* STICKY CONTACT BAR - DESKTOP */

@media (min-width: 768px) {

    .ctc-sticky-contact {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 340px;
        z-index: 9999;
        background: #142b45;
        padding: 12px 16px;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,.20);
    }

    .ctc-sticky-heading {
        color: #ffffff;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 10px;
    }

    .ctc-sticky-buttons {
        display: flex;
        gap: 10px;
    }

    .ctc-sticky-buttons a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
    }

    .ctc-sticky-call {
        background: #ffffff;
        color: #142b45 !important;
    }

    .ctc-sticky-inquiry {
        border: 1px solid #ffffff;
        color: #ffffff !important;
    }
}