/* ========================================
   VIVASVAN HOMES — REVAMPED STYLES
   ======================================== */

/* Variables */
:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fed7aa;
    --accent: #1e293b;
    --accent-light: #334155;
    --gold: #fbbf24;
    --text-dark: #0f172a;
    --text-mid: #374151;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-warm: #fff7ed;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --shadow-orange: 0 8px 30px rgba(249,115,22,.25);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled {
    box-shadow: var(--shadow);
}
.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    position: relative;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.logo-image {
    height: 110px;
    width: auto;
    max-width: 420px;
    object-fit: contain;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: none;
}
.logo-image[style*="display: none"] ~ .logo-text { display: block; }
.nav-center-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.center-image {
    height: 70px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    width: 24px; height: 2.5px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
    display: block;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.btn-outline-white {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.8);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    transform: translateY(-2px);
}
.btn-full { width: 100%; }

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 90px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.75) 0%, rgba(30,41,59,0.65) 50%, rgba(249,115,22,0.3) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    padding: 2rem;
    animation: heroFadeIn 1s ease both;
}
.hero-badge {
    display: inline-block;
    background: rgba(249,115,22,0.2);
    border: 1px solid rgba(249,115,22,0.5);
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero-accent {
    color: var(--gold);
}
.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.75rem;
}
.hero-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2rem;
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}
.hero-stat-lbl {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}
.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.scroll-dot {
    width: 8px; height: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ========================================
   SECTION COMMON
   ======================================== */
section { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}
.title-underline {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 2px;
    margin: 0 auto 1rem;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 580px;
    margin: 0 auto;
}

/* ========================================
   ABOUT
   ======================================== */
.about { background: var(--bg-white); }
.about-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
    align-items: start;
}
.about-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.stat-card {
    background: var(--bg-warm);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-orange);
    border-color: var(--primary);
    background: white;
}
.stat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.4rem;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.3;
}

/* ========================================
   PROJECT FILTERS
   ======================================== */
.project-filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.55rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-orange);
}

/* ========================================
   PROJECTS GRID
   ======================================== */
.projects { background: var(--bg-light); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.projects-loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1rem;
}
.no-projects {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Project Card */
.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.project-image-wrap {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gold) 0%, var(--primary) 100%);
    flex-shrink: 0;
}
.project-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-image-wrap img { transform: scale(1.06); }
.project-image-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}
.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-current {
    background: rgba(34,197,94,0.15);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,0.4);
    backdrop-filter: blur(4px);
}
.badge-upcoming {
    background: rgba(249,115,22,0.15);
    color: #ea580c;
    border: 1px solid rgba(249,115,22,0.4);
    backdrop-filter: blur(4px);
}
.project-body { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.project-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
}
.project-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.project-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.project-details { margin-bottom: 1.5rem; }
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.detail-label { color: var(--text-light); min-width: 85px; flex-shrink: 0; }
.detail-value { color: var(--text-dark); font-weight: 500; }
.project-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}
.project-actions .btn {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
}

/* ========================================
   FEATURES
   ======================================== */
.features { background: white; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
}
.feature-card {
    padding: 2.25rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-warm);
    border: 1px solid var(--primary-light);
    text-align: center;
    transition: var(--transition);
}
.feature-card:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-orange);
}
.feature-icon-wrap {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    display: block;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}
.feature-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   CONTACT
   ======================================== */
.contact { background: var(--bg-light); }
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-orange);
    transform: translateX(4px);
}
.info-icon { font-size: 1.8rem; flex-shrink: 0; }
.info-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}
.info-card p a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
}
.info-card p a:hover { color: var(--primary); }
.whatsapp-card { border-color: rgba(37,211,102,0.3); }
.whatsapp-card:hover { border-color: #25d366; box-shadow: 0 8px 30px rgba(37,211,102,.2); }

/* Contact Form */
.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: border-color 0.25s, box-shadow 0.25s;
    -webkit-appearance: none;
    appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}
.form-status.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.form-status.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--accent);
    color: rgba(255,255,255,0.85);
    padding: 4rem 0 1.5rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-logo {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1) opacity(0.9);
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.25rem;
}
.footer-contact-quick {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-contact-quick a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.footer-contact-quick a:hover { color: var(--gold); }
.footer-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
}
.footer-section ul li {
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}
.footer-section ul li a {
    color: rgba(255,255,255,0.65);
    transition: color 0.2s;
}
.footer-section ul li a:hover { color: var(--gold); }
.footer-section ul li:not(:has(a)) { color: rgba(255,255,255,0.65); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}

/* ========================================
   FLOATING ELEMENTS
   ======================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px; height: 56px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
    z-index: 999;
    transition: var(--transition);
}
.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,.65);
}
.whatsapp-fab svg { width: 26px; height: 26px; }

.scroll-top {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    width: 44px; height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-orange);
}
.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE — TABLET
   ======================================== */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .about-content { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    section { padding: 4rem 0; }

    /* Nav */
    .logo-image { height: 80px; max-width: 280px; }
    .center-image { height: 55px; }
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        background: white;
        padding: 5rem 2rem 2rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.35s ease;
        z-index: 998;
    }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.1rem; display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .nav-link::after { display: none; }

    /* Hero */
    .hero-stats { gap: 1rem; padding: 1rem 1.25rem; }
    .hero-stat-divider { display: none; }
    .hero-stat-num { font-size: 1.3rem; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 0.75rem; }
    .hero-buttons .btn { width: 100%; max-width: 300px; }

    /* About */
    .about-stats { grid-template-columns: 1fr 1fr; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; }

    /* Features */
    .features-grid { grid-template-columns: 1fr 1fr; }

    /* Contact */
    .contact-content { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: 1.75rem; }

    /* Footer */
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand { grid-column: auto; }
}

@media (max-width: 480px) {
    .logo-image { height: 65px; max-width: 240px; }
    .center-image { height: 45px; }
    .features-grid { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: 1fr 1fr; }
    .hero-badge { font-size: 0.72rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 16px; min-height: 46px; }
    .btn { min-height: 46px; }
    .whatsapp-fab { bottom: 1.25rem; right: 1.25rem; }
    .scroll-top { bottom: 4.75rem; right: 1.25rem; }
}
