/* ========================================
   REAL ESTATE WEBSITE - STYLES
   Mobile-first responsive design
   ======================================== */

/* ----------------------------------------
   CSS Custom Properties
   ---------------------------------------- */
:root {
    /* Colors */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-teal: #2A505D;
    --color-gray: #F1F1F1;
    --color-gray-dark: #666666;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Quicksand', 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 60px;
    --container-padding: 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;

    /* Header */
    --header-height: 70px;
}

/* Tablet and up */
@media (min-width: 768px) {
    :root {
        --section-padding: 80px;
        --container-padding: 40px;
        --header-height: 80px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    :root {
        --section-padding: 100px;
    }
}

/* ----------------------------------------
   CSS Reset
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ----------------------------------------
   Typography
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

.section__title {
    font-size: 1.75rem;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: 1rem;
    color: var(--color-gray-dark);
    text-align: center;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .section__title {
        font-size: 2.25rem;
        letter-spacing: 4px;
    }

    .section__subtitle {
        font-size: 1.125rem;
    }
}

/* ----------------------------------------
   Layout
   ---------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding) 0;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 32px;
    border: none;
    border-radius: 0;
    transition: all var(--transition-medium);
    min-width: 44px;
    min-height: 44px;
}

.btn--primary {
    background-color: var(--color-teal);
    color: var(--color-white);
    border: 2px solid var(--color-teal);
}

.btn--primary:hover {
    background-color: transparent;
    color: var(--color-teal);
}

.btn--outline-white {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn--outline-white:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

.btn--full {
    width: 100%;
}

/* ----------------------------------------
   Header & Navigation
   ---------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-medium);
}

/* Default state: transparent on hero */
.header {
    background-color: transparent;
}

/* Scrolled state: white background */
.header.scrolled {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    z-index: 1001;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--color-white);
    transition: color var(--transition-medium);
}

.header.scrolled .logo-text {
    color: var(--color-black);
}

/* Mobile Navigation */
.nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right var(--transition-medium);
    z-index: 1000;
}

.nav__menu.show {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-black);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-teal);
    transition: width var(--transition-fast);
}

.nav__link:hover::after {
    width: 100%;
}

/* Nav Toggle (Hamburger) */
.nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.nav__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: all var(--transition-fast);
}

.header.scrolled .nav__toggle span {
    background-color: var(--color-black);
}

/* Nav Close Button */
.nav__close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 30px;
    height: 30px;
}

.nav__close span {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-black);
}

.nav__close span::before,
.nav__close span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
}

.nav__close span::before {
    transform: rotate(45deg);
}

.nav__close span::after {
    transform: rotate(-45deg);
}

/* Language Switcher */
.nav__lang--desktop {
    display: none;
}

.nav__lang--mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang__link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--color-gray-dark);
    transition: color var(--transition-fast);
}

.lang__link:hover {
    color: var(--color-teal);
}

.lang__link--active {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lang__divider {
    color: var(--color-gray-dark);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        gap: 0;
    }

    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .nav__link {
        font-size: 0.875rem;
        color: var(--color-white);
    }

    .header.scrolled .nav__link {
        color: var(--color-black);
    }

    .nav__toggle,
    .nav__close,
    .nav__lang--mobile {
        display: none;
    }

    .nav__lang--desktop {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: 2rem;
    }

    .nav__lang--desktop .lang__link {
        color: var(--color-white);
    }

    .header.scrolled .nav__lang--desktop .lang__link {
        color: var(--color-gray-dark);
    }

    .nav__lang--desktop .lang__link:hover {
        color: var(--color-teal);
    }

    .nav__lang--desktop .lang__link--active {
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    .nav__lang--desktop .lang__divider {
        color: rgba(255, 255, 255, 0.5);
    }

    .header.scrolled .nav__lang--desktop .lang__divider {
        color: var(--color-gray-dark);
    }
}

/* Pages without hero (listings, etc.) - header starts with dark text */
.page-listings .header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-listings .logo-text {
    color: var(--color-black);
}

.page-listings .nav__toggle span {
    background-color: var(--color-black);
}

@media (min-width: 1024px) {
    .page-listings .nav__link {
        color: var(--color-black);
    }

    .page-listings .nav__link:hover {
        color: var(--color-teal);
    }

    .page-listings .nav__lang--desktop .lang__link {
        color: var(--color-gray-dark);
    }

    .page-listings .nav__lang--desktop .lang__link:hover {
        color: var(--color-teal);
    }

    .page-listings .nav__lang--desktop .lang__divider {
        color: var(--color-gray-dark);
    }
}

/* ----------------------------------------
   Hero Section
   ---------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero__slide.active {
    opacity: 1;
}

.hero__slide--video video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero__content {
    position: relative;
    text-align: center;
    color: var(--color-white);
    padding: 0 var(--container-padding);
    z-index: 3;
}

.hero__title {
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero__title {
        font-size: 3rem;
        letter-spacing: 6px;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .hero__title {
        font-size: 3.5rem;
        letter-spacing: 8px;
    }
}

/* ----------------------------------------
   About Section
   ---------------------------------------- */
.about__grid {
    display: grid;
    gap: 3rem;
}

.about__image-wrapper {
    display: flex;
    justify-content: center;
}

.about__image {
    width: 100%;
    max-width: 400px;
    object-fit: cover;
}

.about__content {
    text-align: center;
}

.about__content .section__title {
    text-align: left;
}

.about__text {
    margin-bottom: 1.5rem;
    color: var(--color-gray-dark);
}

.about__credentials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.credential {
    text-align: center;
}

.credential__number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-teal);
}

.credential__label {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .about__grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 4rem;
    }

    .about__content {
        text-align: left;
    }

    .about__credentials {
        justify-content: flex-start;
    }
}

/* ----------------------------------------
   Testimonials Section
   ---------------------------------------- */
.testimonials {
    background-color: var(--color-gray);
}

.testimonials__grid {
    display: grid;
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--color-white);
    padding: 2rem;
    transition: transform var(--transition-medium);
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card__quote {
    font-style: italic;
    color: var(--color-gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-card__quote::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-teal);
    line-height: 0;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.testimonial-card__author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-card__name {
    font-weight: 600;
    color: var(--color-black);
}

.testimonial-card__location {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
}

@media (min-width: 768px) {
    .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ----------------------------------------
   Contact Section
   ---------------------------------------- */
.contact__grid {
    display: grid;
    gap: 3rem;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact__item {
    text-align: center;
}

.contact__label {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.contact__value {
    color: var(--color-gray-dark);
}

.contact__link {
    color: var(--color-teal);
}

.contact__link:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.form__input {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background-color: var(--color-white);
    transition: border-color var(--transition-fast);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-teal);
}

.form__input::placeholder {
    color: #aaa;
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Messages */
.form__message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.form__message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (min-width: 768px) {
    .contact__grid {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
        align-items: start;
    }

    .contact__item {
        text-align: left;
    }
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: var(--section-padding) 0 2rem;
}

.footer__grid {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer__brand .logo-text {
    color: var(--color-white);
    font-size: 1.5rem;
}

.footer__tagline {
    color: var(--color-gray-dark);
    margin-top: 0.5rem;
}

.footer__heading {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--color-gray-dark);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-teal);
}

.footer__text {
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
}

.footer__text a {
    color: var(--color-gray-dark);
    transition: color var(--transition-fast);
}

.footer__text a:hover {
    color: var(--color-teal);
}

/* Social Links */
.social__links {
    display: flex;
    gap: 1rem;
}

.social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-gray-dark);
    transition: color var(--transition-fast);
}

.social__link:hover {
    color: var(--color-teal);
}

/* Footer Bottom */
.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer__copyright {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* ----------------------------------------
   Listings Section (IDX Property Search)
   ---------------------------------------- */
.listings {
    padding-top: calc(var(--header-height) + 30px);
}

.listings .section__title {
    margin-bottom: 0.5rem;
}

.listings .section__subtitle {
    margin-bottom: 1rem;
}

/* Mobile: Show header and mobile CTA, hide iframe */
.listings__header {
    display: block;
}

.listings__mobile-cta {
    display: block;
    padding: 2rem 0 3rem;
    text-align: center;
}

.listings__mobile-text {
    color: var(--color-gray-dark);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.listings__mobile-note {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-style: italic;
}

.listings__iframe-container {
    display: none;
}

.listings__cta {
    display: none;
}

/* Desktop: Hide mobile CTA, show iframe */
@media (min-width: 768px) {
    .listings__header {
        display: block;
    }

    .listings__mobile-cta {
        display: none;
    }

    .listings__iframe-container {
        display: block;
        width: 100%;
        margin: 1rem 0;
        background-color: var(--color-gray);
    }

    .listings__iframe {
        width: 100%;
        height: 80vh;
        min-height: 600px;
        border: none;
        display: block;
    }

    .listings__cta {
        display: block;
        text-align: center;
        padding: 2rem 0;
        border-top: 1px solid var(--color-gray);
    }

    .listings__cta-text {
        color: var(--color-gray-dark);
        margin-bottom: 1.5rem;
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .listings__iframe {
        height: 85vh;
        min-height: 700px;
    }
}

/* ----------------------------------------
   Utilities
   ---------------------------------------- */
.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;
}
