/* ============================================
   HIGH STAR REAL ESTATE - CUSTOM STYLES
   ============================================

   TABLE OF CONTENTS:
   1. CSS Custom Properties (Design Tokens)
   2. Base Styles
   3. Typography
   4. Header & Navigation
   5. Breadcrumb Navigation
   6. Back to Top Button
   7. Hero Section
   8. Card Styles
   9. Button Styles
   10. Form Styles
   11. Search Form
   12. Section Styles
   13. Grid Layouts
   14. Footer
   15. Testimonials
   16. Mobile Menu
   17. Utility Classes
   18. Animations
   19. Responsive Helpers
   20. Accessibility
   21. Focus Styles
   ============================================ */

/* ============================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */

:root {
    /* Color Palette */
    --primary: #1e3a5f;           /* Deep Blue */
    --primary-light: #2a4a75;      /* Lighter Blue for hover */
    --secondary: #c9a961;         /* Gold */
    --secondary-light: #d4b873;     /* Lighter Gold for hover */
    --accent: #f8f9fa;             /* Light Gray */
    --text: #212529;               /* Dark Gray */
    --text-light: #6b7280;         /* Medium Gray */
    --white: #ffffff;               /* White */
    --success: #28a745;             /* Green */
    --error: #dc3545;               /* Red */
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;         /* 4px */
    --spacing-sm: 0.5rem;          /* 8px */
    --spacing-md: 1rem;            /* 16px */
    --spacing-lg: 1.5rem;           /* 24px */
    --spacing-xl: 2rem;            /* 32px */
    --spacing-2xl: 3rem;           /* 48px */
    --spacing-section: 5rem;        /* 80px mobile */
    --spacing-section-lg: 6rem;    /* 96px desktop */
    
    /* Border Radius */
    --radius-sm: 8px;              /* Small elements, inputs */
    --radius-md: 12px;             /* Cards */
    --radius-lg: 16px;             /* Larger containers */
    
    /* Box Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

/* ============================================
   2. BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
}

/* Responsive font sizing - larger text on desktop */
@media (min-width: 1024px) {
    body {
        font-size: 18px;
    }
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

/* Responsive heading sizes */
@media (min-width: 640px) {
    h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
    h2 {
        font-size: 2.5rem;
    }
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary);
}

.nav-link.active {
    color: var(--secondary);
    font-weight: 600;
}

/* ============================================
   5. BREADCRUMB NAVIGATION
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.breadcrumb span {
    color: #9ca3af;
}

.breadcrumb-current {
    color: var(--primary);
    font-weight: 500;
}

@media (max-width: 480px) {
    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }
}

/* ============================================
   6. BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--secondary) 0%, #d4b873 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}

@media (max-width: 639px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   7. HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 90vh;
    background-image: url('https://images.unsplash.com/photo-1582407947304-fd86f028f716?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.85) 0%, rgba(30, 58, 95, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 2rem;
    max-width: 1200px;
}

/* ============================================
   8. CARD STYLES
   ============================================ */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

/* ============================================
   9. BUTTON STYLES
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2a4a75 100%);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #d4b873 100%);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
    filter: brightness(1.1);
}

/* ============================================
   10. FORM STYLES
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

/* ============================================
   11. SEARCH FORM
   ============================================ */
.search-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================
   12. SECTION STYLES
   ============================================ */
.section {
    padding: 5rem 1rem;
}

.section-gray {
    background-color: var(--accent);
}

@media (min-width: 1024px) {
    .section {
        padding: 6rem 2rem;
    }
}

/* ============================================
   13. GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   14. FOOTER
   ============================================ */
.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 1rem 2rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.footer-link:hover {
    color: var(--secondary);
}

.social-icon {
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* ============================================
   15. TESTIMONIALS
   ============================================ */
.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.testimonial-quote {
    font-style: italic;
    color: var(--text);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-quote::before {
    content: '"';
    font-size: 3rem;
    color: var(--secondary);
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-family: 'Playfair Display', serif;
}

/* ============================================
   16. MOBILE MENU
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    z-index: 999;
    padding: 2rem;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   17. UTILITY CLASSES
   ============================================ */
.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-secondary {
    background-color: var(--secondary);
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   19. RESPONSIVE HELPERS
   ============================================ */
@media (max-width: 639px) {
    .desktop-only {
        display: none;
    }
}

@media (min-width: 640px) {
    .mobile-only {
        display: none;
    }
}

/* ============================================
   20. ACCESSIBILITY
   ============================================ */
.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;
}

/* ============================================
   21. FOCUS STYLES
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}
