/* ==========================================================
   Kinipopo Village
   Responsive Website
   ========================================================== */

:root {
    --blue: #0068c9;
    --blue-dark: #004d99;
    --blue-light: #1686ed;

    --orange: #f58220;
    --teal: #00bfa5;

    --text: #263746;
    --muted: #617487;

    --white: #ffffff;
    --background: #f5f8fb;

    --container-width: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
}

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


/* ==========================================================
   Site Background
   ========================================================== */

.site-background {
    min-height: 100vh;

    background-image: url('/assets/images/bkg.jpg');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

    padding: 20px 20px 50px;
}

.site-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;

    background: var(--white);

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.18);
}


/* ==========================================================
   Architectural Header
   ========================================================== */

.site-header {
    position: relative;
    z-index: 10;
}

.building {
    position: relative;
    width: 100%;
    line-height: 0;
}

.roofline {
    width: 100%;
    height: auto;
}


/* ==========================================================
   Logo
   ========================================================== */

.logo-link {
    position: absolute;

    left: 50%;
    top: 39%;

    width: clamp(140px, 23%, 250px);

    transform: translateX(-50%);

    z-index: 20;
}

.village-logo {
    width: 100%;
    height: auto;

    filter: drop-shadow(
        0 4px 4px rgba(0, 0, 0, 0.12)
    );
}


/* ==========================================================
   Navigation
   ========================================================== */

.main-navigation {
    position: relative;

    background: var(--blue);
    min-height: 52px;

    z-index: 15;
}

.navigation-links {
    display: grid;
    grid-template-columns: repeat(6, 1fr);

    align-items: center;

    min-height: 52px;
}

.navigation-links a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 12px 8px;

    color: white;
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;

    transition: background 0.2s ease;
}

.navigation-links a:nth-child(3) {
    margin-right: 45px;
}

.navigation-links a:nth-child(4) {
    margin-left: 45px;
}

.navigation-links a:hover,
.navigation-links a.active {
    background: var(--blue-dark);
}

.menu-toggle {
    display: none;
}


/* ==========================================================
   Main Content
   ========================================================== */

.site-main {
    background: white;
}


/* ==========================================================
   Welcome Section
   ========================================================== */

.welcome-section {
    padding: 30px 35px 35px;
}

.welcome-content {
    display: grid;

    grid-template-columns: 1.1fr 1fr;

    gap: 35px;

    align-items: center;
}

.eyebrow {
    color: var(--orange);

    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;

    font-size: 12px;

    margin: 0 0 8px;
}

.welcome-text h1 {
    margin: 0 0 20px;

    color: var(--blue);

    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

.welcome-text p {
    margin: 0 0 16px;
}

.welcome-photo {
    overflow: hidden;
    border-radius: 6px;
}

.welcome-photo img {
    width: 100%;
    height: 350px;

    object-fit: cover;
}


/* ==========================================================
   Buttons
   ========================================================== */

.primary-button,
.secondary-button {
    display: inline-block;

    padding: 12px 24px;

    border-radius: 4px;

    text-decoration: none;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.primary-button {
    background: var(--blue);
    color: white;

    margin-top: 10px;
}

.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.secondary-button {
    background: white;
    color: var(--blue);
}

.secondary-button:hover {
    background: #e8f3ff;
    transform: translateY(-2px);
}


/* ==========================================================
   Directory
   ========================================================== */

.directory-section {
    padding: 45px 35px 55px;

    background:
        linear-gradient(
            135deg,
            #0068c9 0%,
            #0054a6 100%
        );

    color: white;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading .eyebrow {
    color: #ffd1a5;
}

.section-heading h2 {
    margin: 0 0 10px;

    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-heading p:last-child {
    margin: 0;
    opacity: 0.9;
}

.business-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 22px;
}

.business-card {
    display: block;

    background: white;
    color: var(--text);

    text-decoration: none;

    border-radius: 6px;
    overflow: hidden;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.business-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);
}

.business-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.business-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.business-card:hover .business-image img {
    transform: scale(1.04);
}

.business-info {
    padding: 20px;
}

.business-category {
    display: block;

    color: var(--orange);

    text-transform: uppercase;
    letter-spacing: 1px;

    font-size: 11px;
    font-weight: 700;

    margin-bottom: 8px;
}

.business-info h3 {
    margin: 0 0 15px;

    color: var(--blue);
    font-size: 20px;
    line-height: 1.3;
}

.card-link {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================
   Location Callout
   ========================================================== */

.location-callout {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 45px 35px;

    background: #e9f6f4;
}

.location-callout h2 {
    color: var(--blue);
    margin: 0 0 10px;
}

.location-callout p:last-child {
    margin: 0;
}


/* ==========================================================
   Footer
   ========================================================== */

.site-footer {
    background: var(--blue-dark);
    color: white;

    padding: 25px 35px;

    text-align: center;
}

.footer-content p {
    margin: 5px 0;
    font-size: 13px;
}

.footer-divider {
    padding: 0 8px;
    opacity: 0.5;
}


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 900px) {

    .site-background {
        padding: 10px;
    }

    .logo-link {
        width: 22%;
    }

    .navigation-links a {
        font-size: 12px;
    }

    .navigation-links a:nth-child(3) {
        margin-right: 25px;
    }

    .navigation-links a:nth-child(4) {
        margin-left: 25px;
    }

    .welcome-content {
        gap: 25px;
    }

    .business-grid {
        gap: 15px;
    }

}


/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 700px) {

    .site-background {
        padding: 0;
        background-attachment: scroll;
    }

    .site-container {
        box-shadow: none;
    }

    .building {
        background: white;
    }

    .roofline {
        width: 100%;
    }

    .logo-link {
        top: 20%;

        width: clamp(90px, 25%, 150px);
    }

    .main-navigation {
        min-height: 50px;
    }

    .menu-toggle {
        display: flex;

        width: 100%;
        min-height: 50px;

        align-items: center;
        justify-content: space-between;

        padding: 10px 20px;

        background: var(--blue);
        color: white;

        border: 0;

        font-weight: 700;
        text-transform: uppercase;

        cursor: pointer;
    }

    .menu-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .menu-icon span {
        display: block;

        width: 22px;
        height: 2px;

        background: white;
    }

    .navigation-links {
        display: none;

        grid-template-columns: 1fr;

        min-height: auto;
    }

    .navigation-links.open {
        display: grid;
    }

    .navigation-links a {
        justify-content: flex-start;

        min-height: 45px;

        padding: 12px 20px;

        font-size: 14px;

        border-top:
            1px solid rgba(255, 255, 255, 0.15);
    }

    .navigation-links a:nth-child(3),
    .navigation-links a:nth-child(4) {
        margin: 0;
    }

    .welcome-section {
        padding: 45px 20px 30px;
    }

    .welcome-content {
        grid-template-columns: 1fr;
    }

    .welcome-photo img {
        height: 260px;
    }

    .directory-section {
        padding: 35px 20px 45px;
    }

    .business-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .business-info {
        padding: 15px;
    }

    .business-info h3 {
        font-size: 17px;
    }

    .location-callout {
        flex-direction: column;
        align-items: flex-start;

        padding: 35px 20px;
    }

}


/* ==========================================================
   Small Mobile
   ========================================================== */

@media (max-width: 420px) {

    .logo-link {
        width: 95px;
        top: 15%;
    }

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

    .business-image {
        aspect-ratio: 16 / 9;
    }

    .welcome-photo img {
        height: 220px;
    }

}


/* ==========================================================
   Navigation Geometry Correction
   Reserve center column for Kinipopo logo
   ========================================================== */

@media (min-width: 701px) {

    .navigation-links {
        display: grid;

        grid-template-columns:
            1fr 1fr 1fr
            minmax(180px, 230px)
            1fr 1fr 1fr;

        align-items: center;
    }

    .navigation-links a:nth-child(1) {
        grid-column: 1;
    }

    .navigation-links a:nth-child(2) {
        grid-column: 2;
    }

    .navigation-links a:nth-child(3) {
        grid-column: 3;
    }

    .navigation-links a:nth-child(4) {
        grid-column: 5;
    }

    .navigation-links a:nth-child(5) {
        grid-column: 6;
    }

    .navigation-links a:nth-child(6) {
        grid-column: 7;
    }

    /* Remove previous spacing adjustments */

    .navigation-links a:nth-child(3),
    .navigation-links a:nth-child(4) {
        margin: 0;
    }

}

@media (min-width: 701px) and (max-width: 900px) {

    .navigation-links {
        grid-template-columns:
            1fr 1fr 1fr
            minmax(140px, 22%)
            1fr 1fr 1fr;
    }

}

/* Allow tropical background to show through transparent roof */
.site-container {
    background: transparent;
}

@media (max-width: 700px) {
    .building {
        background: transparent;
    }
}


/* ==========================================================
   Tenant Directory
   ========================================================== */

.tenant-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.tenant-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tenant-card .business-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f2f4f6;
}

.tenant-card .business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tenant-card .business-info {
    flex: 1;
    padding: 14px 12px 18px;
}

.tenant-card .business-category {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tenant-card h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
}

/* Tablet */

@media (max-width: 900px) {

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

}

/* Mobile */

@media (max-width: 600px) {

    .tenant-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tenant-card .business-info {
        padding: 12px;
    }

    .tenant-card h3 {
        font-size: 14px;
    }

}

/* Narrow mobile */

@media (max-width: 360px) {

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

}


/* ==========================================================
   Category Directory — Compact Layout
   ========================================================== */

.category-directory {
    padding: 30px 35px 45px;
}

.category-directory .section-heading {
    margin-bottom: 20px;
}

.category-directory .section-heading .eyebrow {
    margin: 0 0 8px;
}

.category-directory .section-heading h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.category-directory .section-heading p:last-child {
    margin: 0;
    opacity: 0.9;
}

@media (max-width: 700px) {

    .category-directory {
        padding: 25px 20px 35px;
    }

    .category-directory .section-heading {
        margin-bottom: 18px;
    }

}

/* ==========================================================
   Category Directory — Centered Tenant Cards
   ========================================================== */

.category-directory .tenant-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.category-directory .tenant-card {
    flex: 0 0 210px;
    width: 210px;
}

@media (max-width: 600px) {

    .category-directory .tenant-grid {
        gap: 12px;
    }

    .category-directory .tenant-card {
        flex: 0 1 calc(50% - 6px);
        max-width: 210px;
    }

}

@media (max-width: 360px) {

    .category-directory .tenant-card {
        flex-basis: 100%;
    }

}

/* Center category descriptions above tenant cards */

.category-directory .section-heading p:last-child {
    text-align: center;
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: #f5f8ff;
}


/* ==========================================================
   Location Page
   ========================================================== */

.location-page {
    background: #fff;
}

/* Architectural banner */

.location-banner {
    padding: 15px 35px 0;
    background: #fff;
}

.location-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Location description */

.location-intro {
    padding: 25px 35px 35px;
}

.location-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    gap: 30px;
    align-items: start;
    background: var(--blue);
    color: #fff;
    border-radius: 5px;
    overflow: hidden;
}

.location-text {
    padding: 30px;
}

.location-text h1 {
    margin: 0 0 25px;
    color: #fff;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.location-text p {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.65;
}

.location-text p:last-child {
    margin-bottom: 0;
}

/* Original vertical entrance photograph */

.location-photo {
    width: 100%;
}

.location-photo img {
    display: block;
    width: 100%;
    height: auto;
}

/* Google Maps section */

.location-map-section {
    padding: 35px;
    background: #f4f7fa;
}

.location-map-heading {
    text-align: center;
    margin-bottom: 25px;
}

.location-map-heading h2 {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: clamp(26px, 3vw, 34px);
}

.location-map-heading p:last-child {
    margin: 0;
    color: var(--text);
}

.location-map {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.location-map iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: 0;
}

.location-directions {
    text-align: center;
    margin-top: 20px;
}

/* Tablet */

@media (max-width: 900px) {

    .location-content {
        grid-template-columns: minmax(0, 1fr) 200px;
        gap: 15px;
    }

    .location-text {
        padding: 25px;
    }

}

/* Mobile */

@media (max-width: 700px) {

    .location-banner {
        padding: 15px 20px 0;
    }

    .location-intro {
        padding: 20px;
    }

    .location-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .location-text {
        padding: 25px 20px;
    }

    .location-photo {
        text-align: center;
        padding: 0 20px 20px;
    }

    .location-photo img {
        width: auto;
        max-width: 100%;
        max-height: 400px;
        margin: 0 auto;
    }

    .location-map-section {
        padding: 30px 20px;
    }

    .location-map iframe {
        height: 320px;
    }

}


/* Location page promotional description */

.location-map-heading p:last-child,
.friendly-description {
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: #365b7d;
}


/* Services directory: three cards per row, centered */

@media (min-width: 701px) {
    .category-directory:has(.tenant-card:nth-child(5)) .tenant-grid {
        max-width: 740px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* Clickable tenant directory cards */

.tenant-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tenant-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.tenant-card-link:focus-visible {
    outline: 3px solid #ff8c00;
    outline-offset: 3px;
}


/* ==========================================================
   Tenant Detail Pages
   ========================================================== */

.tenant-detail-page {
    background: #fff;
    padding: 15px 35px 45px;
}

.tenant-detail-banner {
    margin-bottom: 30px;
}

.tenant-detail-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.tenant-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    gap: 35px;
    align-items: start;
}

.tenant-detail-content {
    min-width: 0;
}

.tenant-detail-content h1 {
    margin: 5px 0 25px;
    color: #244f77;
    font-size: clamp(28px, 3vw, 38px);
}

.tenant-detail-content h2 {
    margin: 25px 0 10px;
    color: #244f77;
    font-size: 22px;
}

.tenant-detail-content p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 18px;
}

.tenant-detail-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.tenant-detail-back {
    margin-top: 30px !important;
}

.tenant-detail-back a {
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 700px) {

    .tenant-detail-page {
        padding: 15px 20px 35px;
    }

    .tenant-detail-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tenant-detail-photo {
        text-align: center;
    }

    .tenant-detail-photo img {
        width: auto;
        max-width: 100%;
        max-height: 450px;
        margin: 0 auto;
    }

}

