/* Main Styles for HomeHaven Rental Website */

/* Hero Section with animated lines */
.hero-section {
    position: relative;
    overflow: hidden;
}

/* Grid Background for Hero Section (matching reference image) */
.grid-background {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.150) 1px, transparent 1px),
                     linear-gradient(to bottom, rgba(255, 255, 255, 0.150) 1px, transparent 1px);
    opacity: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(79, 70, 229, 0.4) 0%, transparent 70%);
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    z-index: 1;
}

/* Animated Lines */
.lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    margin: auto;
    width: 100%;
}

.line {
    position: absolute;
    width: 1px;
    height: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.line::after {
    content: '';
    display: block;
    position: absolute;
    height: 15vh;
    width: 100%;
    top: -50%;
    left: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 75%, rgba(255, 255, 255, 1) 100%);
    animation: drop 7s 0s infinite;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

.line:nth-child(1) {
    margin-left: 20%;
}

.line:nth-child(1)::after {
    animation-delay: 2s;
}

.line:nth-child(2) {
    margin-left: 40%;
}

.line:nth-child(2)::after {
    animation-delay: 0.5s;
}

.line:nth-child(3) {
    margin-left: 60%;
}

.line:nth-child(3)::after {
    animation-delay: 2.5s;
}

.line:nth-child(4) {
    margin-left: 80%;
}

.line:nth-child(4)::after {
    animation-delay: 1.5s;
}

.line:nth-child(5) {
    margin-left: 90%;
}

.line:nth-child(5)::after {
    animation-delay: 3.5s;
}

@keyframes drop {
    0% {
        top: -50%;
    }
    100% {
        top: 110%;
    }
}

/* Grid Lines Background for Contact Page */
.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(220, 220, 250, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(220, 220, 250, 0.1) 1px, transparent 1px);
    z-index: -1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Form Styles */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-error {
    border-color: #ef4444 !important;
}

/* Success and Error Messages */
.success-message {
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 0.375rem;
    padding: 1rem;
}

.error-message-box {
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 0.375rem;
    padding: 1rem;
}

/* Property Image Gallery */
.gallery-thumbnail {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    opacity: 1;
}

/* Sticky Header Styles */
.navbar-scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Custom Carousel Arrows */
.carousel-arrow {
    background-color: white;
    color: #4f46e5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-arrow:hover {
    background-color: #4f46e5;
    color: white;
}

/* Animation for FAQ Toggle */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-content.active {
    max-height: 500px;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

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

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    background: white;
    color: #4f46e5;
    border-left: 4px solid #4f46e5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #10b981;
    color: #065f46;
}

.toast.error {
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* Make sure images don't overflow on small devices */
img {
    max-width: 100%;
    height: auto;
}
