@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #8ab4f8;
    --primary-hover: #5b86f5;
    --secondary-color: #e2e8f0;
    --accent-color: #f59e0b;
    --background-color: #1f2937;
    --surface-color: #232f3e;
    --surface-soft: #2b3747;
    --text-main: #f8fafc;
    --text-muted: #cbd5e0;
    --border-color: rgba(148, 163, 184, 0.18);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.22);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at top, rgba(138, 180, 248, 0.09), transparent 25%),
                linear-gradient(180deg, #19212c 0%, #1f2937 40%, #1c2430 100%);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: rgba(20, 27, 37, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

nav .logo {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

nav .logo span {
    color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

.nav-cta {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Main Content Area */
main {
    flex: 1;
}

/* Common Layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--secondary-color);
    background-color: var(--surface-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(138, 180, 248, 0.14), transparent 28%),
                linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(20, 27, 37, 0.96) 100%);
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Flash Messages */
.flash-messages {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    animation: slideInDown 0.5s ease-out forwards;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    border-left: 4px solid #22c55e;
}

.alert-danger {
    background-color: rgba(248, 113, 113, 0.12);
    color: #fee2e2;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.12);
    color: #dbebff;
    border-left: 4px solid #3b82f6;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    background-color: #111827;
    color: rgba(255, 255, 255, 0.68);
    padding: 3rem 5%;
    text-align: center;
    margin-top: auto;
}

/* About Us Page Styles */
.about-hero {
    background: radial-gradient(circle at top left, rgba(138, 180, 248, 0.16), transparent 32%),
                linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(20, 27, 37, 0.96) 100%);
    padding: 6rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.about-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.about-hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.about-hero-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    font-weight: 300;
}

.about-section {
    padding: 5rem 2rem;
    background-color: var(--surface-soft);
}

.about-section.alt-bg {
    background-color: rgba(255, 255, 255, 0.04);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: #1f2a38;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(138, 180, 248, 0.16);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        order: 1;
    }

    .about-image {
        order: 2;
    }

    .about-hero-content h1 {
        font-size: 2.2rem;
    }
}

footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* Form Styles */
.form-container {
    background: #1f2a38;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #1f2a38;
    color: var(--text-main);
}

.form-control::placeholder {
    color: rgba(203, 213, 224, 0.65);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #212b3a;
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.18);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Property Cards */
.property-card {
    background: #1f2a38;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.property-image {
    height: 220px;
    background-color: #15202b;
    position: relative;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.no-image {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.property-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.property-info .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.property-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.property-info .location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.property-info .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.property-info .description {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
    margin-top: auto;
}

/* Sell Property Section */
.sell-property-section {
    padding: 5rem 2rem;
    background-color: var(--surface-color);
    text-align: center;
}

.sell-content {
    max-width: 800px;
    margin: 0 auto;
}

.sell-content h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.sell-content>p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.sell-content .features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-item .icon {
    font-size: 2.5rem;
}

.feature-item p {
    font-weight: 600;
    color: var(--secondary-color);
}

.contact-cta {
    background-color: #1f2a38;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    gap: 8px;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: white;
}

/* Mobile Navigation Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul.nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(18, 25, 39, 0.96);
        backdrop-filter: blur(12px);
        padding: 2rem;
        box-shadow: var(--shadow-md);
        gap: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    nav ul.nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    nav ul.nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-cta {
        display: block;
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Admin Panel */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }

    .admin-header .btn {
        width: 100%;
        text-align: center;
    }

    .table-responsive {
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        border: 1px solid var(--border-color);
        margin-bottom: 15px;
        border-radius: 8px;
        padding: 10px;
    }

    .table-responsive td {
        border: none !important;
        position: relative;
        padding-left: 50% !important;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 40px;
    }

    .table-responsive td:before {
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--text-muted);
        content: attr(data-label);
        display: flex;
        align-items: center;
        height: 100%;
        top: 0;
    }

    .table-responsive td:last-child {
        justify-content: flex-end !important;
    }

    /* Form Container Adjustments */
    .form-container {
        padding: 1.5rem;
        margin: 0 10px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Custom Home Button Style */
.btn-white {
    background-color: #1f2a38;
    color: #f8fafc;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-white:hover {
    background-color: rgba(138, 180, 248, 0.14);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Dark theme overrides for template-specific sections */
.quick-search,
.map-section,
.services-section,
.why-us-section,
.testimonials-section,
.agents-section,
.property-detail-container {
    background: #1f2a38 !important;
}

.search-input {
    background: #1f2a38 !important;
    color: var(--text-main) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.18) !important;
}

.service-card,
.why-card,
.testimonial-card,
.agent-card,
.property-detail-container {
    background: #192433 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.service-card:hover,
.why-card:hover,
.testimonial-card:hover,
.agent-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: var(--shadow-md) !important;
}

.testimonial-text,
.author-info h4,
.author-info p,
.service-card h3,
.why-card h3 {
    color: rgba(248, 250, 252, 0.88) !important;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(138, 180, 248, 0.18) !important;
}

.btn-outline:hover {
    background: rgba(138, 180, 248, 0.16) !important;
    color: #f8fafc !important;
}

.stats-section {
    background: linear-gradient(135deg, rgba(41, 80, 155, 0.95), rgba(25, 42, 68, 0.95)) !important;
    color: white !important;
}

.no-image-large {
    background: #22303f !important;
    color: rgba(203, 213, 224, 0.72) !important;
}

.table-responsive {
    background: #1f2a38 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
}

.table-responsive table,
.table-responsive thead,
.table-responsive tbody,
.table-responsive th,
.table-responsive td,
.table-responsive tr {
    color: #cbd5e0 !important;
}

.table-responsive tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.table-responsive th,
.table-responsive td {
    background: transparent !important;
}

.table-responsive th {
    color: #cbd5e0 !important;
}

.table-responsive td {
    color: #e2e8f0 !important;
}
