/* assets/css/style.css */
:root {
    /* Brand Colors */
    --primary-blue: #004aad;
    /* Royal Blue - Trust */
    --secondary-green: #2eb82e;
    /* Fresh Green - Growth/Nature */
    --accent-orange: #ff9f1c;
    /* Sun Orange - Warmth/Energy */

    /* Functional Colors */
    --whatsapp-green: #25d366;
    --text-dark: #1a1a2e;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;

    /* Spacing & Layout */
    --spacing-unit: 1rem;
    --border-radius: 8px;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-blue);
    margin-bottom: 0.5em;
    font-weight: 600;
}

/* Tamil Typography */
.tamil-text {
    font-family: 'Kavivanar', cursive;
    font-size: 1.1em;
}

.tamil-highlight {
    font-family: 'Coiny', system-ui;
    color: var(--accent-orange);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.logo span {
    color: var(--primary-yellow);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

/* Mobile Menu Button - Hidden on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--primary-blue);
}

.mobile-menu-btn:hover {
    color: var(--accent-orange);
}

/* Mobile Menu Overlay */
.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: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--bg-light);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    color: var(--accent-orange);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--bg-light);
}

.mobile-nav a {
    display: block;
    padding: 16px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s, color 0.2s;
}

.mobile-nav a:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue);
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px 10px;
    justify-content: space-around;
    gap: 8px;
}

.btn-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 0;
}

.btn-cta svg,
.btn-cta .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.btn-loan {
    background: linear-gradient(135deg, var(--accent-orange), #f37b1d);
    color: var(--white);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.jpg');
    /* Need placeholder or generate */
    background-color: var(--primary-blue);
    /* Fallback */
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    color: var(--white);
    font-size: 2.5rem;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 100%;
    gap: 20px;
    padding: 40px 0;
}

/* Limit to max 3 columns on desktop */
@media (min-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, calc(33.333% - 14px)));
    }
}

.property-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--bg-light);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.property-img {
    height: 200px;
    background-color: #ddd;
    object-fit: cover;
    width: 100%;
}

/* Gradient overlay on property card images */
.property-card a>div[style*="position: relative"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
    z-index: 1;
}

.property-info {
    padding: 15px;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--accent-orange);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.property-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--primary-blue);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Different colors for property types */
.property-type-badge.plot {
    background-color: var(--secondary-green);
}

.property-type-badge.house {
    background-color: var(--primary-blue);
}

.badge-negotiable {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--secondary-green);
    color: var(--white);
    font-size: 0.7em;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Form Styles */
input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;

    box-sizing: border-box;
    /* Important for padding */
}

/* Icons */
.icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    /* Force constraint */
    max-height: 20px !important;
    /* Force constraint */
    vertical-align: middle;
    display: inline-block;
    margin-right: 5px;
    flex-shrink: 0;
    /* Prevent squishing in flex containers */
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-md {
    width: 24px;
    height: 24px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-primary {
    color: var(--primary-blue);
}

.icon-accent {
    color: var(--accent-orange);
}

button[type="submit"] {
    background: linear-gradient(to right, var(--primary-blue), #003380);
    color: var(--white);
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    border-radius: var(--border-radius);
    transition: opacity 0.2s;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    /* Space for mobile sticky CTA */
}

/* Media Queries */
@media (max-width: 768px) {

    /* Show mobile menu button, hide desktop nav */
    .mobile-menu-btn {
        display: block;
    }

    .desktop-nav {
        display: none;
    }

    /* Show mobile sticky CTA */
    .mobile-sticky-cta {
        display: flex;
    }

    /* Add padding to body to account for sticky CTA */
    body {
        padding-bottom: 70px;
    }

    /* Reduce hero title size on mobile */
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero h2 {
        font-size: 1.1rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    /* Stack search filters vertically on mobile */
    .hero form>div {
        flex-direction: column !important;
    }

    .hero form select,
    .hero form button {
        width: 100% !important;
        flex: none !important;
    }

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