/* 
   Chennai Reseller Properties Style Sheet
   Author: Antigravity Code Assistant
   Description: Premium Custom Stylesheet built with Bootstrap 5
*/

/* --- Design Tokens / CSS Variables --- */
:root {
    --primary-color: #0f5132;       /* Emerald Green */
    --primary-hover: #082d1c;       /* Dark Emerald */
    --primary-light: #e8f5e9;       /* Light Sage green background */
    --accent-color: #fb8500;        /* Sunset Orange */
    --accent-hover: #ffb703;        /* Golden Yellow */
    --accent-light: #fff3cd;        /* Warm gold light background */
    --accent-dark: #856404;         /* Text gold dark */
    --dark-color: #1e1e1e;          /* Rich Charcoal */
    --dark-muted: #4e4e4e;          /* Slate Grey */
    --light-bg: #fcfaf6;            /* Warm Off-White / Cream */
    --white: #ffffff;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 15px 35px rgba(15, 81, 50, 0.15);
    --transition-fast: all 0.25s ease;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- General Reset & Typography --- */
body {
    font-family: var(--font-sans);
    background-color: var(--light-bg);
    color: var(--dark-color);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
}

.font-serif {
    font-family: var(--font-serif);
}

.text-accent {
    color: var(--accent-color) !important;
}

.text-accent-dark {
    color: var(--accent-dark) !important;
}

.bg-accent-light {
    background-color: var(--accent-light) !important;
}

.bg-success-light {
    background-color: var(--primary-light) !important;
}

.bg-dark-semi {
    background-color: rgba(30, 30, 30, 0.6) !important;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.leading-relaxed {
    line-height: 1.8;
}

.max-width-700 {
    max-width: 700px;
}

.max-width-600 {
    max-width: 600px;
}

/* --- Section Dividers --- */
.h-divider {
    width: 60px;
    height: 4px;
    border-radius: 2px;
}

/* --- Custom Spacing --- */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.py-7 {
    padding-top: 7rem;
    padding-bottom: 7rem;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--dark-color);
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-accent:hover, .btn-accent:focus, .btn-accent:active {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- Top Info Bar --- */
.top-bar {
    background-color: var(--primary-hover);
    font-size: 0.85rem;
    font-weight: 400;
}

.social-icon {
    font-size: 1rem;
    opacity: 0.8;
    transition: var(--transition-fast);
}

.social-icon:hover {
    opacity: 1;
    color: var(--accent-color) !important;
}

/* --- Sticky Header / Navbar --- */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    z-index: 1030;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 1rem;
    background-color: var(--accent-color);
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 2rem);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* --- Hero Slider Section --- */
.hero-section-slider {
    position: relative;
    z-index: 1;
    height: 70vh;
    min-height: 520px;
}

.carousel, .carousel-inner, .carousel-item {
    height: 100%;
}

.carousel-item {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 30, 60, 0.85) 0%, rgba(15, 81, 50, 0.7) 100%);
    z-index: 2;
}

.carousel-caption-custom {
    position: relative;
    z-index: 3;
    max-width: 850px;
    padding: 0 15px;
}

.slide-subtitle {
    letter-spacing: 3px;
    font-weight: 700;
}

.text-shadow {
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-outline-white {
    color: var(--white);
    border: 2px solid var(--white);
    background-color: transparent;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-hover);
    transform: translateY(-2px);
}

.carousel-control-prev, .carousel-control-next {
    width: 6%;
    z-index: 4;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(15, 81, 50, 0.5);
    border-radius: 50%;
    padding: 20px;
    background-size: 40%;
    transition: var(--transition-fast);
}

.carousel-control-prev-icon:hover, .carousel-control-next-icon:hover {
    background-color: var(--primary-color);
}

/* Animations for active slide content */
.carousel-item-next.carousel-item-start .carousel-caption-custom .slide-subtitle,
.carousel-item-prev.carousel-item-end .carousel-caption-custom .slide-subtitle,
.carousel-item.active .carousel-caption-custom .slide-subtitle {
    animation: fadeInUp 0.8s ease-out both;
}

.carousel-item-next.carousel-item-start .carousel-caption-custom h1,
.carousel-item-prev.carousel-item-end .carousel-caption-custom h1,
.carousel-item.active .carousel-caption-custom h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.carousel-item-next.carousel-item-start .carousel-caption-custom p,
.carousel-item-prev.carousel-item-end .carousel-caption-custom p,
.carousel-item.active .carousel-caption-custom p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.carousel-item-next.carousel-item-start .carousel-caption-custom .d-flex,
.carousel-item-prev.carousel-item-end .carousel-caption-custom .d-flex,
.carousel-item.active .carousel-caption-custom .d-flex {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero-section-slider {
        height: 60vh;
        min-height: 480px;
    }
    .carousel-caption-custom h1 {
        font-size: 2.2rem;
    }
    .carousel-caption-custom p {
        font-size: 0.95rem;
    }
}

/* --- Interactive Search Section --- */
.search-filter-section {
    margin-top: -80px;
}

.search-container {
    background: var(--white);
    border: 1px solid rgba(15, 81, 50, 0.08);
    transition: var(--transition-smooth);
}

.search-container:hover {
    box-shadow: 0 20px 40px rgba(15, 81, 50, 0.08) !important;
}

.filter-tabs .nav-link {
    background-color: var(--light-bg);
    color: var(--dark-muted);
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.filter-tabs .nav-link.active {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

.form-select, .form-control {
    border: 1.5px solid #eaeaea;
    font-size: 0.95rem;
    color: var(--dark-color);
    transition: var(--transition-fast);
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(15, 81, 50, 0.1);
}

/* --- Trusted Partner Section --- */
.image-box img {
    transition: var(--transition-smooth);
    border: 4px solid var(--white);
}

.image-box:hover img {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

/* --- Property Cards --- */
.property-card {
    transition: var(--transition-smooth);
    background: var(--white);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow) !important;
}

.card-image-wrapper {
    overflow: hidden;
    height: 180px;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.property-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.btn-card-contact {
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-weight: 800;
}

/* --- Marina Beach CTA Section --- */
.beach-cta-section {
    background: url('../images/marina_beach_banner.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    z-index: 1;
}

.beach-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 81, 50, 0.9) 0%, rgba(30, 30, 30, 0.7) 100%);
    z-index: 2;
}

.video-preview-container {
    background-size: cover;
    background-position: center center;
    aspect-ratio: 16/9;
    width: 100%;
}

.video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.play-btn-circle {
    width: 70px;
    height: 70px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: var(--transition-smooth);
    animation: pulsePlay 2s infinite;
}

.video-preview-link:hover .play-btn-circle {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

.video-preview-link:hover .video-preview-overlay {
    background: rgba(0, 0, 0, 0.25);
}

@keyframes pulsePlay {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 133, 0, 0.5);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(251, 133, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 133, 0, 0);
    }
}

/* Micro-animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 133, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(251, 133, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 133, 0, 0);
    }
}

.CTA-pulse {
    animation: pulse 2s infinite;
}

/* --- Stats & Approach Section --- */
.stat-card {
    background: var(--white);
    border: 1.5px solid #f2efea !important;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-5px);
    box-shadow: var(--card-shadow) !important;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-hover);
    font-size: 0.95rem;
}

.footer h5 {
    color: var(--white) !important;
}

.footer .form-control {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
}

.footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.65) !important;
}

.footer .form-control:focus {
    background-color: rgba(255, 255, 255, 0.18) !important;
    border-color: var(--accent-hover) !important;
    box-shadow: none !important;
}

.footer-links li a {
    transition: var(--transition-fast);
}

.footer-links li a:hover {
    color: var(--accent-hover) !important;
    padding-left: 5px;
}

.social-links-footer a {
    transition: var(--transition-fast);
}

.social-links-footer a:hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--dark-color) !important;
}

/* --- Media Queries for Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--white);
        padding: 1.5rem;
        border-radius: 1rem;
        margin-top: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-nav .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .search-filter-section {
        margin-top: -50px;
    }
}

@media (max-width: 575.98px) {
    .search-filter-section {
        margin-top: -30px;
    }
    
    .search-container {
        padding: 1.5rem !important;
    }
    
    .py-6 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
    
    .py-7 {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }
}

/* --- About Us Page Specific Styles --- */
.about-page-banner {
    background: url('../images/chennai_about_banner.jpg') no-repeat center center;
    background-size: cover;
    height: 300px;
    position: relative;
    z-index: 1;
}

.ongoing-page-banner {
    background: url('../images/marina_beach_banner.jpg') no-repeat center center;
    background-size: cover;
    height: 300px;
    position: relative;
    z-index: 1;
}

.about-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.9) 0%, rgba(30, 30, 30, 0.7) 100%);
    z-index: 2;
}

.about-image-collage {
    max-width: 420px;
    height: 380px;
}

.collage-main-img {
    width: 75%;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.collage-sub-img {
    position: absolute;
    bottom: 20px;
    right: 0;
    width: 55%;
    border: 6px solid var(--white);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.about-image-collage:hover .collage-main-img {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
}

.about-image-collage:hover .collage-sub-img {
    transform: translate(8px, 8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
}

@media (max-width: 991.98px) {
    .about-page-banner {
        height: 220px;
    }
    .about-image-collage {
        height: 320px;
        max-width: 350px;
    }
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    z-index: 1000;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 32px;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #fff;
    transform: translateY(-5px) scale(1.05);
}

/* Pulsing effect for WhatsApp */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.5;
    z-index: -1;
    animation: waPulse 2s infinite;
}

@keyframes waPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* --- Responsive Growth Driver Cards --- */
.growth-driver-card {
    height: 100%;
}

.growth-img-col {
    height: 200px;
    position: relative;
}

.growth-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .growth-img-col {
        height: 100%;
        min-height: 180px;
        align-self: stretch;
    }
}

/* --- 5-Column Responsive Properties Grid --- */
.properties-grid-5 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .properties-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .properties-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .properties-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    .properties-grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Sequential transition delays for grid cards */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
