/**
 * Baan Pool Villa Pattaya - Modern CSS
 * แหล่งรวมบ้านพูลวิลล่าพัทยา
 */

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Navbar */
.navbar {
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--dark) !important;
}

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Form */
.search-section {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    padding-bottom: 4rem;
}

.search-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.search-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.btn-search {
    background: linear-gradient(135deg, var(--secondary), #f97316);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    width: 100%;
    transition: var(--transition);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: white;
}

/* Quick Select Cards */
.quick-select {
    padding: 4rem 0;
    background: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.quick-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 180px;
    cursor: pointer;
    transition: var(--transition);
}

.quick-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

.quick-card:hover img {
    transform: scale(1.1);
}

.quick-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Villa Grid */
.villa-section {
    padding: 4rem 0;
}

.villa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.villa-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.villa-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.villa-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.villa-card:hover .villa-image img {
    transform: scale(1.05);
}

.villa-price-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.villa-info {
    padding: 1.25rem;
}

.villa-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.villa-features {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.villa-features span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.villa-features i {
    color: var(--primary);
}

.villa-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.villa-price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray);
}

/* Villa Carousel */
.villa-carousel .carousel-item {
    height: 220px;
}

.villa-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.villa-carousel .carousel-control-prev,
.villa-carousel .carousel-control-next {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
}

.villa-card:hover .carousel-control-prev,
.villa-card:hover .carousel-control-next {
    opacity: 1;
}

.villa-carousel .carousel-control-prev {
    left: 10px;
}

.villa-carousel .carousel-control-next {
    right: 10px;
}

.villa-carousel .carousel-control-prev-icon,
.villa-carousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
    filter: invert(1) grayscale(100);
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 3rem;
}

.page-link {
    border: none;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius);
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
}

/* Why Choose Us Section */
.why-choose-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0ea5e9 100%);
    position: relative;
    overflow: hidden;
}

.why-choose-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.why-choose-section .container {
    position: relative;
    z-index: 1;
}

.why-choose-section .section-title {
    color: white;
}

.why-choose-section .section-subtitle {
    color: rgba(255,255,255,0.8);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

.feature-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    height: 100%;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    transition: var(--transition);
}

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

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.7;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 992px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
}

/* Popular Locations Section */
.locations-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.location-card {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 280px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.location-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.location-card:hover img {
    transform: scale(1.15);
}

.location-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(0,0,0,0.85) 100%);
    color: white;
    transition: var(--transition);
}

.location-card:hover .location-overlay {
    background: linear-gradient(180deg, rgba(14,165,233,0.3) 0%, rgba(0,0,0,0.9) 100%);
}

.location-overlay h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.location-overlay p {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.location-wide {
    height: 220px;
}

@media (max-width: 768px) {
    .location-card {
        height: 220px;
    }
    
    .location-wide {
        height: 180px;
    }
    
    .location-overlay h3 {
        font-size: 1.4rem;
    }
}

/* SEO Content */
.seo-section {
    padding: 4rem 0;
    background: var(--light);
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h1,
.seo-content h2 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.seo-content h1 {
    font-size: 2rem;
}

.seo-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

.seo-content p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.seo-content ul {
    color: var(--gray);
    padding-left: 1.5rem;
}

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

/* Footer */
.footer-section {
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
    color: white;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.7);
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

.contact-info a {
    color: rgba(255,255,255,0.7);
}

.contact-info a:hover {
    color: white;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Floating LINE Button */
.floating-line-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00c300, #00e676);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(0, 195, 0, 0.4);
    z-index: 1000;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.floating-line-btn:hover {
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 195, 0, 0.5); }
    50% { box-shadow: 0 0 0 15px rgba(0, 195, 0, 0); }
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray);
    font-size: 0.7rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-cta {
    color: white;
    background: var(--success);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: -15px;
    justify-content: center;
}

.mobile-nav-cta:hover {
    color: white;
    transform: scale(1.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Detail Page */
.villa-detail-hero {
    height: 60vh;
    position: relative;
}

.villa-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    height: 100%;
}

.villa-gallery-main {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.villa-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile gallery badge */
.mobile-gallery-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.villa-gallery-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0.5rem;
}

.villa-gallery-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-more-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.95);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.villa-detail-content {
    padding: 2rem 0;
}

.villa-detail-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.villa-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.villa-detail-location {
    color: var(--gray);
    margin-bottom: 1rem;
}

.villa-detail-location i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.price-card {
    background: linear-gradient(135deg, var(--secondary), #f97316);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.price-card .price {
    font-size: 2rem;
    font-weight: 700;
}

.price-card small {
    opacity: 0.9;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
    width: 24px;
}

.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.facility-item i,
.facility-item svg {
    color: var(--primary);
    width: 20px;
}

/* Calendar */
.calendar-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.calendar-wrapper iframe {
    width: 100%;
    height: 520px;
    border: none;
    background: #f9fafb;
}

/* Blog */
.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.25rem;
}

.blog-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Contact Page */
.contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-method:hover {
    background: rgba(14, 165, 233, 0.1);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
}

.contact-method-line {
    background: linear-gradient(135deg, rgba(0,195,0,0.1), rgba(0,230,118,0.1));
}

.contact-method-line i {
    color: #00c300;
}

/* Responsive */
@media (max-width: 991.98px) {
    .floating-line-btn {
        bottom: 90px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 767.98px) {
    .hero {
        min-height: 70vh;
    }
    
    .search-section {
        margin-top: -40px;
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .villa-grid {
        grid-template-columns: 1fr;
    }
    
    .villa-gallery {
        grid-template-columns: 1fr;
    }
    
    .villa-gallery-side {
        display: none;
    }
    
    .villa-detail-hero {
        height: 40vh;
    }
    
    .quick-card {
        height: 140px;
    }
}

/* Print */
@media print {
    .navbar,
    .mobile-nav,
    .floating-line-btn,
    .footer-section {
        display: none !important;
    }
}
