/* Custom styles for PersaHome - Airbnb-inspired rental property website */

/* Font faces for Airbnb Cereal font family */
@font-face {
    font-family: 'AirbnbCereal';
    src: url('../assets/fonts/AirbnbCereal_W_Lt.otf') format('opentype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'AirbnbCereal';
    src: url('../assets/fonts/AirbnbCereal_W_Md.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'AirbnbCereal';
    src: url('../assets/fonts/AirbnbCereal_W_Bd.otf') format('opentype');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'AirbnbCereal';
    src: url('../assets/fonts/AirbnbCereal_W_Blk.otf') format('opentype');
    font-weight: 800;
    font-display: swap;
}

/* Custom variables for brand colors */
:root {
    --primary-color: #FF5A5F;
    --background-dark: #000000;
    --background-light: #FEFEFE;
    --text-main: #222222;
    --text-secondary: #717171;
    --border-light: #DDDDDD;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Base styles - Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'AirbnbCereal', 'Circular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--background-light);
    padding-bottom: 80px; /* Account for sticky footer on mobile */
}

/* Remove padding on desktop */
@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
}

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

/* Professional Card Styles - Airbnb-like */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-light);
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
}

.feature-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.info-card {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-light);
}

.info-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

/* Professional welcome card */
.welcome-card {
    background: linear-gradient(135deg, #FF5A5F 0%, #FF787D 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.welcome-card > * {
    position: relative;
    z-index: 2;
}

/* Clean icon styling */
.icon-circle {
    background: #f7f7f7;
    color: var(--text-main);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 1px solid #f0f0f0;
}

/* Professional amenity and rule items */
.manual-section {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
}

.manual-section:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.rule-item {
    border-left: 3px solid #FF5A5F;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.amenity-item {
    border-left: 3px solid #00A699;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

/* Carousel Styles - Mobile First */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f7f7f7;
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow-light);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 250px; /* Mobile height */
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 1;
    visibility: visible;
    background-color: #f7f7f7;
}

/* Tablet and desktop carousel adjustments */
@media (min-width: 768px) {
    .carousel-slide img {
        height: 400px;
    }
}

/* Image loading fallback */
.carousel-slide img[src=""],
.carousel-slide img:not([src]),
.carousel-slide img[src="#"] {
    background-color: #f7f7f7;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="150" viewBox="0 0 200 150"><rect width="200" height="150" fill="%23f7f7f7"/><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="Arial" font-size="14" fill="%23999">Loading...</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Carousel Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-medium);
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-large);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

/* Hide navigation on very small screens */
@media (max-width: 480px) {
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.25);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Sticky Footer Styles - Mobile Only */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #f0f0f0;
    padding: 16px;
    z-index: 50;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), 
                opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (min-width: 1024px) {
    .sticky-footer {
        display: none;
    }
}

/* Professional button styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 16px;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background-color: #e04348;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid #ddd;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 16px;
    box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: #f7f7f7;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Professional card shadows */
.property-card {
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.property-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* Navigation styling */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 22px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f7f7f7;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* Mobile menu styles */
@media (max-width: 767px) {
    #mobile-menu {
        background: white;
        border-top: 1px solid #f0f0f0;
        animation: slideDown 0.3s ease;
    }
    
    #mobile-menu.hidden {
        animation: slideUp 0.3s ease;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Amenity items responsive design */
.amenity-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    background: white;
}

.amenity-item:last-child {
    border-bottom: none;
}

.amenity-item:hover {
    background-color: #f9f9f9;
}

.amenity-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .amenity-icon {
        width: 24px;
        height: 24px;
    }
}

/* Loading animation for images */
.img-loading {
    background: linear-gradient(90deg, #f7f7f7 25%, #e0e0e0 50%, #f7f7f7 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Star rating styles */
.star-rating {
    color: #FFB400;
    font-size: 14px;
}

/* Price highlight */
.price-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Custom scrollbar - Desktop only */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
    }

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

    ::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #bbb;
    }
}

/* Focus styles for accessibility */
.carousel-nav:focus,
.carousel-indicator:focus,
button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .carousel-nav {
        background: white;
        border: 2px solid black;
    }
    
    .carousel-indicator {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        transition: none;
    }
    
    .carousel-nav,
    .carousel-indicator,
    .btn-primary,
    .btn-secondary {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .sticky-footer,
    .carousel-nav,
    .carousel-indicators,
    nav {
        display: none !important;
    }
    
    .carousel-slide {
        break-inside: avoid;
    }
}

/* Professional highlight boxes */
.highlight-box {
    background: #f7f7f7;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.highlight-box.primary {
    background: #fef7f7;
    border-color: #fecaca;
}

.highlight-box.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.highlight-box.warning {
    background: #fffbeb;
    border-color: #fed7aa;
}

.highlight-box.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

