/* TOIPAN PROPERTIES - Professional Stylesheet - FINAL VERSION */
:root {
    --navy: #06163a;
    --green: #1a472a; 
    --gold: #800000;
    --smoke: #f4f7f6;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin:0; padding:0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; color: var(--navy); overflow-x: hidden; scroll-behavior: smooth; line-height: 1.6; }

.container { max-width: 1200px; margin: auto; padding: 0 20px; }
/* Improved Min Widths for Desktop Grid Clarity */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; } 
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 50px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.align-center { align-items: center; }

/* Typography */
h1, h2, h3, .title { font-family: 'Playfair Display', serif; font-weight: 900; }
.text-gold { color: var(--gold); }
.sub-title { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: var(--gold); font-size: 0.8rem; display: block; margin-bottom: 10px; }
.section-header { margin-bottom: 50px; text-align: center; }
.title { font-size: 2.8rem; line-height: 1.2; margin-bottom: 20px; }

/* Navbar */
.navbar { position: fixed; width:100%; top:0; z-index: 1000; padding: 5px 0; transition: var(--transition); }
.navbar.scrolled { background: var(--navy); padding: 15px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: white; letter-spacing: 1px; }
.logo span { color: var(--gold); }
.nav-links { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-links li a { text-decoration: none; color: white; font-weight: 600; font-size: 0.85rem; transition: 0.3s; }

/* Logo Base */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

/* Image Logo */
.logo-img {
    height: 100px;
    transition: all 0.3s ease;
}

/* Text Logo */
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    display: none;
}

/* ===== Transparent Header (Top of Page) ===== */
.navbar:not(.scrolled) .logo-img {
    display: block;
}

.navbar:not(.scrolled) .logo-text {
    display: none;
}

/* ===== Scrolled Header ===== */
.navbar.scrolled .logo-img {
    display: none;
}

.navbar.scrolled .logo-text {
    display: block;
}

/* Active/Hover Styles */
.nav-links li a:not(.btn-gold):hover {
    color: var(--gold);
    text-decoration: none; 
}
.nav-links li.current a:not(.btn-gold) {
    color: var(--gold);
    border-bottom: 2px solid var(--gold); /* Underline the active link */
    padding-bottom: 5px;
}

.menu-toggle {
    display: none;
    position: relative;
    width: 35px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
}

/* Buttons */
.btn-gold { background: var(--gold); color: white; padding: 10px 20px; border-radius: 4px; text-decoration: none; font-weight: 700; }
.btn-main { background: var(--gold); color: white; padding: 18px 35px; border-radius: 4px; text-decoration: none; font-weight: 700; display: inline-block; }
.btn-main:hover { background: var(--navy); }
.btn-outline-white { border: 2px solid white; color: white; padding: 16px 35px; border-radius: 4px; text-decoration: none; font-weight: 700; margin-left: 15px; }
.btn-gold-full { width: 100%; background: var(--navy); color: white; border: none; padding: 15px; border-radius: 4px; font-weight: 700; cursor: pointer; transition: 0.3s; border: 1px solid var(--gold); }
.btn-gold-full:hover { background: var(--gold); }

/* Hero */
.hero { height: 100vh; background: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1500&q=80') center/cover; position: relative; display: flex; justify-content: flex-end;  align-items: center; color: white; }
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to right, rgba(6,22,58,0.95), rgba(26, 71, 42, 0.4)); }
.hero-flex { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 350px; }
.hero-text h1 { font-size: 4rem; margin: 20px 0; }
.hero-text p { font-size: 1.1rem; max-width: 600px; margin-bottom: 30px; opacity: 0.9; }
.badge { background: var(--gold); color: white; padding: 6px 15px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }

/* Form Card */
.hero-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.2); padding: 30px; border-radius: 20px; width: 300px; }
.hero-card h3 { margin-bottom: 25px; font-size: 1.5rem; text-align: center; color: var(--navy); }
.input-group { background: white; margin-bottom: 15px; padding: 12px 15px; border-radius: 4px; display: flex; align-items: center; gap: 10px; }
.input-group i { color: var(--gold); }
.input-group select { border: none; outline: none; width: 100%; background: transparent; font-family: inherit; font-weight: 600; }

/* Stats */
.stats-bar { background: var(--navy); color: white; padding: 60px 0; position: relative; z-index: 5; }
.stat-box { text-align: center; }
.stat-box h2 { font-size: 3rem; color: var(--gold); margin-bottom: 5px; }
.stat-box p { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Leadership */
.about-section { padding: 100px 0; background: white; }
.leader-card { background: var(--smoke); padding: 30px; border-left: 4px solid var(--gold); }
.leader-info h4 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 5px; }
.leader-info p { font-size: 0.85rem; margin-top: 10px; }

/* Services */
.services { padding: 100px 0; background: var(--smoke); }
.service-item { background: white; padding: 40px 30px; text-align: center; transition: var(--transition); border-radius: 8px; }
.service-item:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.icon-circle { width: 80px; height: 80px; background: var(--navy); color: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; font-size: 2rem; }
.service-item h3 { margin-bottom: 15px; font-size: 1.2rem; }
.service-item p { font-size: 0.9rem; color: #666; }

/* Property Cards */
.property-grid-section { padding: 100px 0; }
.prop-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.05); }
.prop-image { height: 230px; background-size: cover; background-position: center; position: relative; }
.status-tag { position: absolute; top: 15px; right: 15px; background: var(--green); color: white; padding: 5px 15px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; }
.prop-content { padding: 25px; }
.loc-tag { color: var(--gold); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.prop-price { font-size: 1.4rem; font-weight: 900; margin: 10px 0; color: var(--navy); }
.prop-footer { display: flex; gap: 10px; margin-top: 20px; }
.btn-wa { flex: 1; background: #25d366; color: white; text-align: center; padding: 10px; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 0.8rem; }
.btn-call { flex: 1; border: 1px solid var(--navy); color: var(--navy); text-align: center; padding: 10px; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 0.8rem; }

/* Journey Step */
.journey-section { padding: 100px 0; background: var(--navy); color: white; }
.journey-wrapper { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; }
.journey-step { text-align: center; flex: 1; }
.step-icon { width: 70px; height: 70px; border: 2px solid var(--gold); color: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-weight: 900; font-size: 1.5rem; }
.journey-step h4 { margin-bottom: 10px; color: var(--gold); }
.journey-step p { font-size: 0.85rem; opacity: 0.8; }

/* Contact Section */
.contact-section { padding: 100px 0; background: var(--smoke); }
.contact-links { margin-top: 30px; }
.c-link { margin-bottom: 20px; font-weight: 700; display: flex; align-items: center; gap: 15px; }
.c-link i { color: var(--gold); font-size: 1.2rem; }
.contact-form-card { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.contact-form-card input, .contact-form-card select, .contact-form-card textarea { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; }

/* Footer */
.footer { background: #040d21; color: white; padding: 80px 0 30px; }
.footer h4 { color: var(--gold); margin-bottom: 25px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: white; text-decoration: none; opacity: 0.7; transition: 0.3s; }
.footer-links a:hover { opacity: 1; color: var(--gold); }
.footer-bottom { margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom a {color: #22B5E7; }
.footer-bottom a:hover{ color:#800000;}

/* Footer Contact and Social Style */
.footer-contact-info li { display: flex; align-items: center; gap: 10px;}
.footer-contact-info li i { color: var(--gold); font-size: 0.9rem;}
.social-links a { color: white; font-size: 1.5rem; margin-right: 15px; opacity: 0.8; transition: 0.3s;}
.social-links a:hover { color: var(--gold); opacity: 1;}

/* --- Back to Top Button Style (Enhanced) --- */
.back-to-top { 
    position: fixed; 
    bottom: 95px; 
    right: 30px; 
    background: var(--navy); 
    color: var(--gold); 
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 999; /* Below WhatsApp button */
    transition: all 0.3s ease; /* 👈 smooth magic */
}

/* Hover effect */
.back-to-top:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

@keyframes backtotop-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0,0,0,0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0,0,0,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0,0,0,0);
    }
}

.back-to-top {
    animation: backtotop-pulse 3s infinite;
}

/* WhatsApp Floating */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(37,211,102,0.3);
    font-weight: 700;
    transition: all 0.3s ease; /* 👈 important */
}

/* Hover effect */
.whatsapp-float:hover {
    background: #1ebe5d;              /* slightly darker green */
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 15px 40px rgba(37,211,102,0.5);
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37,211,102,0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37,211,102,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37,211,102,0);
    }
}

.whatsapp-float {
    animation: whatsapp-pulse 2s infinite;
}

/* --- COMPREHENSIVE MOBILE OPTIMIZATION --- */

    @media (max-width: 992px) {
    .hero-actions {
        display: flex !important;      /* Force flex layout */
        flex-direction: row !important;/* Make items horizontal */
        justify-content: center;       /* Center buttons horizontally */
        align-items: center;           /* Align buttons vertically */
        gap: 10px;                     /* Space between buttons */
        flex-wrap: nowrap;             /* Prevent wrapping */
    }

    .hero-actions .btn-main {
        display: inline-block !important; /* Ensure buttons are inline */
        padding: 10px 15px;               /* Smaller padding for mobile */
        font-size: 14px;                  /* Reduce font size */
        white-space: nowrap;              /* Prevent text wrapping */
        width: auto;                      /* Do not take full width */
        min-width: 0;                     /* Allow shrinking to fit */
    }
    /* --- Premium Hamburger Button --- */
    .menu-toggle {
        display: flex !important;
        width: 45px;
        height: 45px;
        background: transparent;
        border: 2px solid var(--gold);
        border-radius: 50%;
        position: relative;
        cursor: pointer;
        z-index: 1001; /* Higher than nav-links */
        align-items: center;
        justify-content: center;
        padding: 0;
        outline: none;
        transition: all 0.3s ease;
    }

    .menu-toggle span,
    .menu-toggle span::before,
    .menu-toggle span::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--gold);
        position: absolute;
        transition: all 0.3s ease-in-out;
        content: "";
        border-radius: 2px;
    }

    .menu-toggle span::before { top: -6px; }
    .menu-toggle span::after { top: 6px; }

    /* Animation to "X" */
    .menu-toggle.active {
        background: var(navy);
        transform: rotate(90deg);
    }
    .menu-toggle.active span { background: transparent; }
    .menu-toggle.active span::before {
        transform: rotate(45deg);
        top: 0;
    }
    .menu-toggle.active span::after {
        transform: rotate(-45deg);
        top: 0;
    }

    /* --- Vertical "Half-Screen" Dropdown --- */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        /* Starts from the bottom of your navbar */
        top: 75px; /* Adjust this to your navbar's height */
        left: 0;
        width: 100%;
        height: 50vh; /* Covers exactly half the vertical screen */
        background: var(navy);
        padding: 10px 10px;
        z-index: 999;
        text-align: center;
        overflow-y: auto;
        /* Animation: Slide down from top */
        transform: translateY(-150%); 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    }

    .nav-links.active {
        transform: translateY(0); /* Slides into place */
    }

    /* Dim the bottom half of the screen when menu is open */
    body.menu-open::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
        backdrop-filter: blur(2px);
        z-index: 998; /* Just below nav-links */
    }

    .nav-links li { width: 30%; }
    .nav-links li a { 
        font-size: 1rem; 
        display: block; 
        padding: 10px 0; 
        color: white;
        border-bottom: 1px solid rgba(193, 155, 100, 0.1);
    }
    .nav-links li.current a { border-bottom: 1px solid var(--gold); color: var(--gold); }

    /* --- Hero & Grid Resets --- */
    .hero { 
        height: auto; 
        min-height: 100vh; 
        padding: 120px 0 60px; 
    }
    .hero-flex { flex-direction: column; text-align: center; gap: 40px; }
    .hero-text h1 { font-size: 4rem; line-height: 1.1; }
    
    .hero-actions { display: flex; flex-direction: column; gap: 15px; align-items: center; }
    .btn-main, .btn-outline-white { width: 100%; max-width: 300px; margin: 0 !important; }

    .grid-2, .grid-3, .grid-4 { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }

    .about-section, .services, .property-grid-section, .contact-section, .journey-section {
        padding: 50px 0;
    }
    .title { font-size: 2rem; }
    .journey-wrapper { flex-direction: column; gap: 40px; }
    .footer-main-grid { text-align: center; }
    .footer-contact-info li { justify-content: center; }
}
    @media (max-width: 600px) {
    .hero-text h1 { font-size: 2.1rem; }
    .page-banner h1 { font-size: 1.8rem !important; }
    
    /* Property Card Adjustments */
    .prop-footer { flex-direction: column; }
    
    /* Float Buttons */
    .whatsapp-float { 
        bottom: 20px; 
        right: 20px; 
        padding: 12px 20px; 
        font-size: 0.9rem; 
    }
    .back-to-top {
        bottom: 85px;
        right: 20px;
    }

    /* Table/Process grid fixes */
    .process-grid-container {
        grid-template-columns: 1fr !important;
    }
}