/**
 * Payla Real Estate - Custom CSS
 * Additional styles, animations, and responsive adjustments
 * Built to complement Tailwind CSS
 */

/* ============================================
   Root Variables
   ============================================ */
:root {
    --forest-green: #3A6B1F;
    --forest-green-dark: #2D5016;
    --forest-green-light: #4A7C2E;
    --warm-orange: #E67E22;
    --warm-orange-dark: #D35400;
}

/* ============================================
   Global Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2C3E50;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   Navigation Styles
   ============================================ */
.nav-link {
    position: relative;
    font-weight: 500;
    color: #2C3E50;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--warm-orange);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--forest-green);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    color: #2C3E50;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: #F8F9FA;
    color: var(--forest-green);
    padding-left: 1.5rem;
}

/* Sticky navbar effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Property Card Styles
   ============================================ */
.property-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.property-card .property-image {
    transition: transform 0.5s ease;
}

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

/* ============================================
   Blog Card Styles
   ============================================ */
.blog-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.blog-card .blog-image {
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.1);
}

/* ============================================
   Feature Card Styles
   ============================================ */
.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================
   Team Card Flip Effect
   ============================================ */
.team-card {
    perspective: 1000px;
    height: 450px;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.team-card-back {
    transform: rotateY(180deg);
}

/* ============================================
   Floating Action Buttons
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.call-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--warm-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.call-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(230, 126, 34, 0.6);
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--forest-green);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(58, 107, 31, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.scroll-top-btn.show {
    display: flex;
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(58, 107, 31, 0.6);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   Footer Styles
   ============================================ */
.footer-link {
    color: #9CA3AF;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--warm-orange);
    padding-left: 4px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--warm-orange);
    transform: translateY(-4px);
}

/* ============================================
   Hero Section Animations
   ============================================ */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 1s ease-out;
}

/* ============================================
   Category Filter Buttons
   ============================================ */
.category-filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    background-color: white;
    color: #4B5563;
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
}

.category-filter-btn:hover {
    background-color: var(--forest-green-light);
    color: white;
    border-color: var(--forest-green-light);
}

.category-filter-btn.active {
    background-color: var(--forest-green);
    color: white;
    border-color: var(--forest-green);
}

/* ============================================
   View Toggle Buttons
   ============================================ */
.view-toggle {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background-color: #F3F4F6;
    color: #6B7280;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle:hover {
    background-color: var(--forest-green-light);
    color: white;
}

.view-toggle.active {
    background-color: var(--forest-green);
    color: white;
}

/* ============================================
   Article Content Styling
   ============================================ */
.article-content {
    color: #374151;
}

.article-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--warm-orange);
    background-color: #F9FAFB;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4B5563;
    border-radius: 0.5rem;
}

.article-content .info-box {
    background-color: #DBEAFE;
    border-left: 4px solid #3B82F6;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.article-content a {
    color: var(--forest-green);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--warm-orange);
}

/* ============================================
   Loading Animation
   ============================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 4px solid #F3F4F6;
    border-top-color: var(--forest-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
    }
    
    .property-card,
    .blog-card {
        margin-bottom: 1rem;
    }
    
    .whatsapp-float,
    .call-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    .call-float {
        bottom: 80px;
    }
    
    .scroll-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .no-print,
    header,
    footer,
    .whatsapp-float,
    .call-float,
    .scroll-top-btn,
    nav {
        display: none !important;
    }
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: var(--forest-green);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--forest-green-dark);
}

/* ============================================
   Admin Sign-in Modal Styles
   ============================================ */
.login-and-register-form.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.login-and-register-form.modal.active,
.login-and-register-form.modal:not([style*="display: none"]) {
    display: flex !important;
}

.main-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.main-register-holder {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.main-register {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-reg {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.close-reg:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.close-reg i {
    color: #374151;
    font-size: 18px;
}

.main-register h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.main-register h3 span {
    color: #3A6B1F;
}

.custom-form {
    width: 100%;
}

.custom-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.custom-form input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.custom-form input[type="text"]:focus {
    outline: none;
    border-color: #3A6B1F;
    box-shadow: 0 0 0 3px rgba(58, 107, 31, 0.1);
}

.log-submit-btn {
    background: #3A6B1F;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.log-submit-btn:hover {
    background: #2D5016;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 107, 31, 0.3);
}

#error_messages {
    margin-bottom: 1rem;
    min-height: 24px;
}

#error_messages .alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

#error_messages .alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.phone_div,
.otp_div {
    margin-bottom: 1rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.bg-gradient-green {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-light) 100%);
}

.bg-gradient-orange {
    background: linear-gradient(135deg, var(--warm-orange) 0%, var(--warm-orange-dark) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--warm-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* ============================================
   Accessibility
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--forest-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--warm-orange);
    outline-offset: 2px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

/* ============================================
   Hero Section Premium Animations
   ============================================ */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatUp {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(230, 126, 34, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(230, 126, 34, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.hero-section {
    position: relative;
}

/* Animated gradient text */
.hero-section h1 span {
    animation: floatUp 3s ease-in-out infinite;
}

.hero-section h1 span:nth-child(2) {
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite, floatUp 3s ease-in-out infinite;
}

/* Glassmorphism enhanced hover effects */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Button glow effects */
.hero-section a[href*="whatsapp"] {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Smooth hover transitions for all buttons */
.hero-section a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll indicator smooth animation */
@keyframes scrollIndicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-section .animate-bounce {
    animation: scrollIndicator 2s ease-in-out infinite;
}

/* Badge pulse animation */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.hero-section .bg-green-400 {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Decorative blob animations */
@keyframes blobFloat1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes blobFloat2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    66% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

@keyframes blobFloat3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(15px, 15px) scale(1.05);
    }
}

.hero-section > div:nth-of-type(3) {
    animation: blobFloat1 20s ease-in-out infinite;
}

.hero-section > div:nth-of-type(4) {
    animation: blobFloat2 25s ease-in-out infinite;
}

.hero-section > div:nth-of-type(5) {
    animation: blobFloat3 30s ease-in-out infinite;
}

/* Feature cards staggered entrance */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section .backdrop-blur-lg:nth-child(1) {
    animation: cardEntrance 0.6s ease-out 0.1s both;
}

.hero-section .backdrop-blur-lg:nth-child(2) {
    animation: cardEntrance 0.6s ease-out 0.3s both;
}

.hero-section .backdrop-blur-lg:nth-child(3) {
    animation: cardEntrance 0.6s ease-out 0.5s both;
}

/* Text shimmer effect on hover */
.hero-section a:hover {
    background-image: linear-gradient(
        120deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Parallax enhancement */
@media (prefers-reduced-motion: no-preference) {
    .hero-section {
        transform-style: preserve-3d;
    }
}

