/* ============================================
   Global Styles
   ============================================ */

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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-gray: #ecf0f1;
    --dark-gray: #34495e;
    --text-color: #2c3e50;
    --heading-color: #2c3e50;
    --bg-color: #fff;
    --surface-color: #fff;
    --input-bg: #fff;
    --border-color: #ddd;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    color-scheme: light;
}

/* Dark theme (default; set on <html data-theme="dark">) */
:root[data-theme="dark"] {
    --light-gray: #18202a;
    --dark-gray: #a9b4bf;
    --text-color: #dde3e9;
    --heading-color: #eef2f5;
    --bg-color: #11161c;
    --surface-color: #1f2933;
    --input-bg: #11161c;
    --border-color: #364352;
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: var(--border-radius);
}

.brand-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Show the icon for the theme you'd switch to */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(52, 73, 94, 0.85)), url('Longshot01.jpg') center/cover no-repeat;
    color: white;
    padding: 120px 20px;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================
   Portfolio Section
   ============================================ */

.portfolio {
    padding: 80px 20px;
    background-color: var(--light-gray);
}

.portfolio h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--heading-color);
}

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

.portfolio-section {
    margin-bottom: 3rem;
}

.portfolio-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.portfolio-section-header .section-icon {
    font-size: 2rem;
}

.portfolio-section-header h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1.3rem;
}

.portfolio-section-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.owned-header {
    background: linear-gradient(135deg, var(--primary-color), #3d5470);
    color: white;
}

.managed-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.property-image-wrapper {
    position: relative;
}

.ownership-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ownership-badge.owned {
    background: var(--primary-color);
    color: white;
}

.ownership-badge.managed {
    background: #27ae60;
    color: white;
}

.property-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

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

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

.property-info {
    padding: 1.5rem;
}

.property-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.property-price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.property-quick-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.property-quick-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.view-btn:hover {
    background-color: #2980b9;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--surface-color);
    margin: 30px auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--heading-color);
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: var(--secondary-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-gallery {
    position: relative;
    max-width: 350px;
    width: 100%;
    flex-shrink: 0;
}

#modalImage {
    width: 100%;
    border-radius: var(--border-radius);
    display: block;
    max-height: 400px;
    object-fit: cover;
}

#unitImage {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 350px !important;
    object-fit: cover !important;
    border-radius: var(--border-radius);
    display: block;
}

.gallery-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.gallery-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.gallery-btn:hover {
    background-color: var(--secondary-color);
}

.modal-details h2 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.property-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.spec .label {
    font-weight: 600;
    color: var(--dark-gray);
    display: block;
    margin-bottom: 0.3rem;
}

.spec .value {
    color: var(--heading-color);
    font-size: 1.1rem;
}

.property-description {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.property-units-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 2px solid var(--light-gray);
    border-bottom: 2px solid var(--light-gray);
}

.property-units-section h3 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.property-units-section > p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

/* Removed - Units now displayed in property modal */

.unit-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.unit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.unit-info {
    padding: 1rem;
}

.unit-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.unit-quick-info {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.unit-quick-info span {
    display: flex;
    align-items: center;
    gap: 2px;
}

.unit-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.amenities-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.amenities-list li {
    padding: 0.5rem 0;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
}

.amenities-list li:before {
    content: "✓";
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.75rem;
}

.unit-description {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
    padding: 80px 20px;
    background-color: var(--bg-color);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--heading-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
}

.form-honeypot {
    display: none;
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: none;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.contact-info {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.info-item p {
    opacity: 0.95;
}

.info-item a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        height: auto;
    }
}

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

.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    border-top: 3px solid var(--secondary-color);
}

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

@media (max-width: 768px) {
    .nav-menu ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .portfolio h2,
    .contact h2 {
        font-size: 2rem;
    }

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

    .modal-content {
        width: 95%;
        margin: 60px auto;
    }
}

@media (max-width: 600px) {
    /* Keep the toggle top-right; nav links drop to their own row */
    .navbar .container {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .nav-right {
        display: contents;
    }

    .logo {
        flex: 1;
        min-width: 0;
    }

    .theme-toggle {
        order: 2;
        margin-left: auto;
    }

    .nav-menu {
        order: 3;
        width: 100%;
    }

    .nav-menu ul {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 34px;
        height: 34px;
    }

    .logo img {
        height: 40px;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .nav-menu ul {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 60px 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
