/* ===================================
   iAM Capital - Investment Properties CSS
   Professional corporate design system
   =================================== */

/* Screen reader only (SEO h1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================
   CSS Variables - Design System
   =================================== */
:root {
    /* Brand Colors */
    --color-navy: #19375F;
    --color-gold: #D4AF37;
    --color-lime: #FFFFFF;
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Grays */
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-700: #374151;
    --color-gray-900: #111827;

    /* Typography */
    --font-family: 'Overpass', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1400px;
    --container-padding: 2rem;

    /* Transitions */
    --transition-base: 0.3s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-gray-700);
    background: var(--color-white);
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
    background: var(--color-white);
    color: var(--color-navy);
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Overpass', sans-serif;
}

.header__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav {
    margin-left: auto;
    margin-right: 3rem;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #19375F;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.nav__link {
    color: #19375F;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    font-family: 'Overpass', sans-serif;
}

/* ===================================
   Hero Section
   =================================== */
.investments-hero {
    background:
        linear-gradient(135deg, rgba(25, 55, 95, 0.4) 0%, rgba(15, 42, 63, 0.5) 100%),
        url('images/hero/milan-cathedral-hero.webp') center center/cover no-repeat;
    color: var(--color-white);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
}

.investments-hero__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    text-align: center;
}

.investments-hero__label {
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.investments-hero__title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.investments-hero__subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Map Section
   =================================== */
.map-section {
    background: var(--color-gray-50);
    padding: 0;
}

.map-section__container {
    position: relative;
    width: 100%;
    height: 600px;
}

.map-section__map {
    width: 100%;
    height: 100%;
}

.map-section__loading,
.map-section__error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-50);
    z-index: 10;
}

.map-section__loading p,
.map-section__error p {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--color-gray-700);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray-200);
    border-top-color: var(--color-navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Filter Pills (floating overlay on map) */
.filter-pills {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 200px;
    max-height: 500px;
    overflow-y: auto;
}

.filter-toggle {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background: #D4AF37;
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
}

.filter-toggle:hover {
    background: var(--color-black);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.filter-toggle svg {
    stroke: var(--color-white);
}

.filter-toggle svg {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.filter-pills__group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.filter-pills__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-pill {
    padding: 0.375rem 0.75rem;
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    color: var(--color-gray-700);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: 20px;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--color-navy);
    color: var(--color-navy);
}

.filter-pill--active {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: var(--color-white);
}

.filter-pill--active:hover {
    background: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-navy);
}

/* ===================================
   Properties Section
   =================================== */
.properties-section {
    background: var(--color-white);
    padding: 5rem 0;
}

.properties-section__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.properties-section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-navy);
    text-align: center;
    margin-bottom: 2rem;
}

.properties-section__description {
    max-width: 900px;
    margin: 0 auto 3rem;
    text-align: center;
}

.properties-section__description p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-gray-700);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto 3rem;
    max-width: 900px;
}

.category-filters__group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-filters__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #999999;
    margin-right: 0.25rem;
}

.category-filter-btn {
    background: var(--color-white);
    color: #666666;
    border: 1px solid var(--color-gray-200);
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: 6px;
    text-transform: none;
}

.category-filter-btn:hover {
    border-color: var(--color-gray-300);
    color: #444444;
    background: var(--color-gray-50);
}

.category-filter-btn--active {
    background: #F0F0F0;
    color: #333333;
    border-color: #E0E0E0;
}

.category-filter-btn--active:hover {
    background: #E8E8E8;
    border-color: #D5D5D5;
    color: #333333;
}

.properties-section__loading,
.properties-section__error {
    text-align: center;
    padding: 3rem 0;
    font-size: 1rem;
    color: var(--color-gray-700);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* ===================================
   Property Cards (Image-Based Design)
   =================================== */
.property-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.property-card:hover {
    border-color: var(--color-gray-300);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* Image Container */
.property-card__image {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
}

.property-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark Overlay for Text Readability */
.property-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
}

/* Property Name on Image Overlay */
.property-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

/* Location Badge on Image Overlay */
.property-card__location-badge {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

/* Card Body Below Image */
.property-card__body {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Category Badge - subtle gray pill */
.property-card__category {
    background: #F0F0F0;
    color: #444444;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: 0.01em;
}

/* Sold Badge - muted */
.property-card__sold-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
    z-index: 10;
}

/* Acquisition Date */
.property-card__date {
    font-size: 0.8125rem;
    color: #999999;
}

/* View Property Button */
.property-card__view-btn {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--color-navy);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-family);
    border-radius: 6px;
    transition: all var(--transition-base);
}

.property-card__view-btn:hover {
    background: var(--color-black);
    color: var(--color-white);
}

/* Noscript Fallback (SEO) */
.properties-noscript {
    max-width: 800px;
    margin: 2rem auto;
    font-family: var(--font-family);
    line-height: 1.8;
}

.properties-noscript h3 {
    color: var(--color-navy);
    margin: 1.5rem 0 0.75rem;
}

.properties-noscript a {
    color: var(--color-navy);
}

/* ===================================
   Info Window Styles
   =================================== */
.info-window {
    font-family: var(--font-family);
    padding: 0;
    max-width: 250px;
    position: relative;
}

.info-window__image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0.5rem;
}

.info-window__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-window__sold-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.info-window__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-navy);
    margin: 0 0 0.5rem;
    padding: 0 0.75rem;
}

.info-window__address,
.info-window__type,
.info-window__size {
    font-size: 0.875rem;
    color: var(--color-gray-700);
    margin: 0.25rem 0;
    padding: 0 0.75rem;
}

.info-window__button {
    display: inline-block;
    margin: 0.75rem 0.75rem 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-navy);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-base);
}

.info-window__button:hover {
    background: var(--color-black);
    color: var(--color-white);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: #19375F;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 1.5rem;
    font-family: 'Overpass', sans-serif;
    font-size: 16px;
}

.footer__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer__column {
    text-align: left;
}

.footer__column h3 {
    color: var(--color-white);
    font-size: 16px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.footer__logo {
    width: 131px;
    height: auto;
    margin-bottom: 1rem;
}

.footer__address {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.footer__address p {
    margin: 0;
}

.footer__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    margin-top: 0.75rem;
}

.footer__button:hover {
    color: var(--color-white);
}

.footer__contact-link {
    display: block;
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 0.5rem;
    transition: color var(--transition-base);
}

.footer__contact-link:hover {
    color: var(--color-gold);
}

.footer__email-list {
    list-style: none;
    margin: 0.75rem 0;
}

.footer__email-list li {
    margin-bottom: 0.5rem;
}

.footer__email-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    transition: color var(--transition-base);
}

.footer__email-list a:hover {
    color: var(--color-white);
}

.footer__social {
    margin-top: 1rem;
}

.footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--color-white);
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer__social-link:hover {
    background: var(--color-white);
    color: var(--color-navy);
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 0.5rem;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    transition: color var(--transition-base);
}

.footer__links a:hover {
    color: var(--color-white);
}

.footer__copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .investments-hero__title {
        font-size: 2.5rem;
    }

    .map-section__container {
        height: 500px;
    }

    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 2rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .header__container {
        padding: 0 1rem;
    }

    .logo {
        margin-left: 0;
    }

    .logo img {
        height: 35px;
    }

    .nav {
        margin-right: 0;
    }

    .mobile-menu-toggle {
        display: block;
        right: 1rem;
    }

    .nav__list {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #19375F;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav__link {
        color: #FFFFFF;
    }

    .nav__list.active {
        transform: translateX(0);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .investments-hero {
        padding: 4rem 0 3rem;
    }

    .investments-hero__title {
        font-size: 2rem;
    }

    .investments-hero__subtitle {
        font-size: 1rem;
    }

    .map-section__container {
        height: 400px;
    }

    .filter-toggle {
        display: flex;
        align-items: center;
        background: #19375F;
        color: #FFFFFF;
    }

    .filter-toggle svg {
        stroke: #FFFFFF;
    }

    .filter-pills {
        display: none;
        left: 1rem;
        right: 1rem;
        top: 4rem;
        max-width: calc(100% - 2rem);
        width: calc(100% - 2rem);
        padding: 1rem;
        gap: 0.75rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }

    .filter-pills.active {
        display: flex;
    }

    .filter-pills__group {
        gap: 0.5rem;
    }

    .filter-pills__label {
        font-size: 0.875rem;
    }

    .filter-pill {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .properties-section {
        padding: 3rem 0;
    }

    .properties-section__title {
        font-size: 1.75rem;
    }

    .category-filters {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .category-filter-btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
    }

    .property-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Mobile Small (< 375px) */
@media (max-width: 374px) {
    .investments-hero__title {
        font-size: 1.75rem;
    }

    .properties-section__title {
        font-size: 1.5rem;
    }

    .property-card {
        padding: 1rem;
    }
}
