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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #1e3a5f;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.15);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

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

.logo-img {
    height: 150px;
    width: auto;
    max-width: 200px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.btn-secondary {
    background: transparent;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.btn-secondary:hover {
    background-color: #1e3a5f;
    color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, #4a7c59 0%, #5d9c6c 30%, #6bb77b  60%, #7bc97f  100%);
    clip-path: polygon(
        0% 100%,
        2% 85%,
        4% 90%,
        6% 80%,
        8% 95%,
        10% 75%,
        12% 85%,
        14% 70%,
        16% 90%,
        18% 65%,
        20% 80%,
        22% 75%,
        24% 95%,
        26% 70%,
        28% 85%,
        30% 60%,
        32% 90%,
        34% 75%,
        36% 85%,
        38% 65%,
        40% 80%,
        42% 90%,
        44% 70%,
        46% 95%,
        48% 65%,
        50% 85%,
        52% 75%,
        54% 90%,
        56% 60%,
        58% 80%,
        60% 85%,
        62% 70%,
        64% 95%,
        66% 75%,
        68% 80%,
        70% 65%,
        72% 90%,
        74% 75%,
        76% 85%,
        78% 70%,
        80% 95%,
        82% 60%,
        84% 85%,
        86% 75%,
        88% 90%,
        90% 65%,
        92% 80%,
        94% 85%,
        96% 70%,
        98% 90%,
        100% 75%,
        100% 100%
    );
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1e3a5f;
    text-align: center;
    line-height: 1.2;
}

.text-line {
    display: block;
    position: relative;
    z-index: 2;
}

.text-line:first-child {
    margin-bottom: -37px;
}

.text-line:last-child {
    margin-top: -43px;
}

.image-line {
    display: block;
    text-align: center;
    position: relative;
    z-index: 1;
}

.forsale-img {
    height: 4.5em;
    width: auto;
    display: inline-block;
}

.hero p {
    font-size: 1.25rem;
    color: #4a6b8a;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Word Animation Styles */
.word-animate {
    display: inline-block;
    margin-right: 0.3em;
    transform: translateX(0);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.word-animate.slide-out {
    transform: translateX(100vw);
    opacity: 0;
}

.word-animate.animate-in {
    transform: translateX(0);
    opacity: 1;
}

/* Crash effect */
.word-animate.crash {
    animation: crash-bounce 0.4s ease-out;
}

@keyframes crash-bounce {
    0% { transform: translateX(0) scale(1); }
    50% { transform: translateX(-10px) scale(1.2); }
    100% { transform: translateX(0) scale(1); }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #1e3a5f;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #162d47;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-success:hover {
    background-color: #e55a2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Content Sections */
.content-section {
    padding: 3rem 0;
    display: none;
}

.content-section.active {
    display: block;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3a5f;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #e8eef5;
}

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

.listing-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8eef5, #d1dde8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a6b8a;
    font-size: 1.1rem;
}

.listing-content {
    padding: 1.5rem;
}

.listing-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1e3a5f;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 0.5rem;
}

.listing-location {
    color: #4a6b8a;
    margin-bottom: 1rem;
}

.btn-outline {
    background: transparent;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background-color: #1e3a5f;
    color: white;
}

/* Search Bar */
.search-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px solid #e8eef5;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #1e3a5f;
}

.form-input, .form-select {
    padding: 0.75rem;
    border: 2px solid #d1dde8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #ffffff;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #ff6b35;
}

.radius-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radius-slider {
    flex: 1;
}

/* Resource Cards */
.resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.resource-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #e8eef5;
}

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

.resource-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b35, #e55a2e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1e3a5f;
}

.resource-description {
    color: #4a6b8a;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.cta-section {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #162d47 100%);
    border-radius: 12px;
    color: white;
}

.cta-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffffff;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: #b8cce5;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (min-width: 320px) {
    .hero h1 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .header-content {
        justify-content: center;
        gap: 3rem;
    }
    
    .logo {
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: row;
        max-width: 600px;
    }

    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }

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

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

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

    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    position: relative;
    z-index: 101;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #2c5aa0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover .hamburger-line {
    background-color: #ff6b35;
}

/* Mobile-first header adjustments */
@media (max-width: 767px) {
    .header {
        padding: 0.5rem 0;
        min-height: 60px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 0 1rem;
        min-height: 50px;
    }

    .logo {
        flex: 1;
        text-align: left;
    }
    
    .logo-img {
        height: 56px;
        width: auto;
    }

    .auth-buttons {
        display: none;
    }
    
    .hamburger-menu {
        display: flex !important;
        order: 2;
        margin-left: 1rem;
    }
    
    /* Optimize hero section for smaller header */
    .hero {
        padding: 2rem 0 3rem 0;
        margin-top: 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
}

/* Mobile Menu Optimizations */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.mobile-menu.open {
    right: 0;
    display: block;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1) !important;
}

.mobile-menu-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-items {
    padding: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
    font-weight: 500;
}

.mobile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    text-decoration: none;
}

.mobile-menu-item span:first-child {
    font-size: 1.2rem;
}

/* Desktop and Tablet adjustments */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none !important;
    }
    
    .auth-buttons {
        display: flex !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .hamburger-menu {
        display: none !important;
    }
    
    .auth-buttons {
        display: flex !important;
    }
}