/* Custom styles for Paras Meerut Plots */

/* Base styles */
body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Animation for fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animation for scale-in */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Animation for slide-in-right */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Animation for pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Floor plan tabs */
.floor-btn.active {
    color: #1e40af;
    border-color: #1e40af;
    background-color: #dbeafe;
}

/* Gallery lightbox overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.lightbox-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    box-sizing: border-box;
}

.lightbox-nav-btn {
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Popup Enquiry Form */
#popup-form {
    transition: opacity 0.3s ease;
}

#popup-form:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

#popup-form .bg-white {
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: scaleIn 0.4s ease-out;
}

#close-popup {
    transition: transform 0.3s ease, color 0.2s ease;
}

#close-popup:hover {
    transform: rotate(90deg);
    color: #1e40af;
}

/* Focus styles for keyboard navigation */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Keyboard accessibility - make popup close on ESC key */
body:has(#popup-form:not(.hidden)) {
    position: relative;
}

/* Form styling */
.form-control {
    margin-bottom: 20px;
}

.form-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control input, 
.form-control textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-control input:focus, 
.form-control textarea:focus {
    border-color: #1e40af;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
    padding-left: 6px;
    border-left: 2px solid #e53e3e;
    animation: errorShake 0.3s ease-in-out;
}

.input-error {
    border-color: #e53e3e !important;
    background-color: rgba(229, 62, 62, 0.05);
    box-shadow: 0 0 0 1px rgba(229, 62, 62, 0.25);
}

.input-error:focus {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.25) !important;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Sticky header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 15;
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.sticky-header.visible {
    transform: translateY(0);
}

/* Custom CTA button hover effects */
.cta-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background-color: #1e40af;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.2);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.cta-button:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive image ratios */
.aspect-ratio-3-2 {
    aspect-ratio: 3/2;
    object-fit: cover;
}

/* Custom styles for mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.mobile-menu.active {
    display: block;
    transform: translateX(0);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #1e40af;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

/* Form input customizations */
input::placeholder, textarea::placeholder {
    color: #a0aec0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .popup-content {
        width: 95%;
        padding: 20px;
    }
}
