/* ============================================
   KotaBuddy - Main Stylesheet
   ============================================ */

:root {
    --primary: #FF6B35;
    --primary-dark: #E5502A;
    --navy: #16213E;
    --navy-light: #1F2E52;
    --text-dark: #1A1A2E;
    --text-gray: #666B7A;
    --bg-light: #F7F8FA;
    --border: #E5E7EB;
    --success: #16A34A;
    --white: #FFFFFF;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(22,33,62,0.08);
    --shadow-hover: 0 8px 24px rgba(22,33,62,0.14);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* ---------- Entrance Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.fade-in-up { animation: fadeInUp 0.7s ease both; }

/* ---------- Scroll Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s cubic-bezier(0.2,0.6,0.3,1), transform 0.65s cubic-bezier(0.2,0.6,0.3,1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---------- Button Ripple ---------- */
.btn { position: relative; overflow: hidden; }
.btn-ripple {
    position: absolute;
    width: 8px; height: 8px;
    background: rgba(255,255,255,0.55);
    border-radius: 50%;
    transform: translate(-50%,-50%) scale(0);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes rippleEffect {
    to { transform: translate(-50%,-50%) scale(22); opacity: 0; }
}

/* ---------- Sticky header shrink ---------- */
.site-header { transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(22,33,62,0.12); }


a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(255,107,53,0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,107,53,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-dark); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}
.logo span { color: var(--primary); }
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}
.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.header-cta { display: flex; align-items: center; gap: 16px; }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(to bottom, rgba(15,20,45,0.75), rgba(22,33,62,0.88)), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center bottom;
    color: #fff;
    padding: 64px 0 90px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,107,53,0.18) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatUp 6s ease-in-out infinite;
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
/* ---------- Liquid Glass Effect (inspired, adapted to KotaBuddy navy/orange theme) ---------- */
.liquid-glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}
.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.2px;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 25%,
        rgba(255,255,255,0) 50%, rgba(255,255,255,0) 65%,
        rgba(255,107,53,0.25) 85%, rgba(255,107,53,0.4) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 44px;
    font-weight: 800;
    max-width: 600px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero h1 .highlight { color: var(--primary); }
.hero h1 .char { display: inline-block; opacity: 0; transform: translateX(-18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.hero h1 .char.visible { opacity: 1; transform: translateX(0); }
.hero p {
    font-size: 17px;
    color: #C5CAE0;
    max-width: 520px;
    margin-bottom: 28px;
}
.hero-trust {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.hero-trust span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #E5E8F5;
    padding: 7px 14px;
    border-radius: 20px;
}

/* Search box */
.search-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-hover);
    max-width: 900px;
}
.search-box select, .search-box input {
    flex: 1;
    min-width: 140px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    background: #fff;
}
.search-box .btn { flex: 0 0 auto; }

/* Stats strip */
.stats-strip {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.stat-item .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-item .label { font-size: 13px; color: #C5CAE0; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
}
.section-sub { color: var(--text-gray); margin-bottom: 32px; font-size: 15px; }
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}
.view-all { color: var(--primary); font-weight: 600; font-size: 14px; }

/* ---------- Areas Grid ---------- */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.area-card {
    text-align: center;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
/* ---------- 3D Tilt Cards ---------- */
.tilt-card { transform-style: preserve-3d; transition: transform 0.15s ease-out, box-shadow 0.3s ease; will-change: transform; }
.tilt-card .thumb, .tilt-card .img-wrap { transform: translateZ(20px); }
.tilt-card .body, .tilt-card .info { transform: translateZ(10px); }

/* ---------- Floating decorative blobs ---------- */
.blob-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: floatBlob 8s ease-in-out infinite;
}
@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -25px) scale(1.08); }
}

/* ---------- Wave section divider ---------- */
.wave-divider { display: block; width: 100%; line-height: 0; margin-top: -2px; }
.wave-divider svg { width: 100%; height: 60px; display: block; }

.area-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-hover); }
.area-card .img-wrap { height: 120px; background: linear-gradient(135deg, #FFB088, #FF6B35); overflow: hidden; }
.area-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.area-card:hover .img-wrap img { transform: scale(1.08); }
.area-card .info { padding: 14px; }
.area-card .info h4 { font-size: 15px; margin-bottom: 4px; }
.area-card .info span { font-size: 12px; color: var(--text-gray); }

/* ---------- Hostel Cards ---------- */
.hostel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.hostel-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.hostel-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.hostel-card .thumb {
    height: 180px;
    background: linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.15)), url('assets/hostel-placeholder.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease;
}
.hostel-card:hover .thumb { transform: scale(1.04); }
.hostel-card .thumb .badge-type {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(22,33,62,0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.hostel-card .thumb .verified-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--success);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.hostel-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.hostel-card h3 { font-size: 17px; margin-bottom: 4px; }
.hostel-card .location { font-size: 13px; color: var(--text-gray); margin-bottom: 8px; }
.hostel-card .rating { font-size: 13px; color: var(--text-gray); margin-bottom: 10px; }
.hostel-card .rating strong { color: var(--text-dark); }
.hostel-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hostel-card .tags span {
    font-size: 11px;
    background: var(--bg-light);
    color: var(--text-gray);
    padding: 4px 8px;
    border-radius: 6px;
}
.hostel-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
}
.hostel-card .price { font-size: 18px; font-weight: 800; color: var(--navy); }
.hostel-card .price small { font-size: 12px; font-weight: 400; color: var(--text-gray); }

/* ---------- Filters sidebar (listing page) ---------- */
.listing-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}
.filters-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}
.filters-box h3 { font-size: 16px; margin-bottom: 16px; }
.filter-group { margin-bottom: 20px; }
.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.listing-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ---------- Details page ---------- */
.details-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 32px;
    align-items: start;
}
.gallery-main {
    height: 380px;
    width: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #FFB088, #FF6B35);
    border-radius: var(--radius);
    margin-bottom: 12px;
    display: block;
}
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumbs img {
    height: 70px;
    width: 100%;
    flex: 1;
    object-fit: cover;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFCBA8, #FF8659);
    transition: opacity 0.2s ease;
}
.gallery-thumbs img:hover { opacity: 0.8; }
.gallery-thumbs div {
    height: 70px;
    flex: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFCBA8, #FF8659);
}
.details-sidebar {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}
.details-sidebar .price-big { font-size: 30px; font-weight: 800; color: var(--navy); }
.details-sidebar .price-big small { font-size: 14px; font-weight: 400; color: var(--text-gray); }
.amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}
.amenities-grid span { font-size: 14px; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.amenities-grid span::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ---------- Forms ---------- */
.form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radio-group { display: flex; gap: 20px; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.radio-group input { width: auto; }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.alert-success { background: #DCFCE7; color: #166534; }
.alert-error { background: #FEE2E2; color: #991B1B; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C5CAE0; padding: 56px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 14px; }
.footer-grid ul li a { color: inherit; }
.footer-grid ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ---------- Admin Layout ---------- */
.admin-body { background: #F4F5F9; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: var(--navy);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}
.admin-sidebar .logo { color: #fff; padding: 0 24px 24px; font-size: 20px; }
.admin-sidebar .logo span { color: var(--primary); }
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 14px;
    color: #C5CAE0;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,107,53,0.15); color: var(--primary); border-right: 3px solid var(--primary); }
.admin-main { flex: 1; padding: 28px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 22px; }

.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--navy); }
.stat-card .label { font-size: 13px; color: var(--text-gray); margin-top: 4px; }

.admin-table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.admin-table-card .card-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
table.admin-table th { color: var(--text-gray); font-weight: 600; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
table.admin-table td:hover { overflow: visible; white-space: normal; background: #fafafa; }
.status-pill { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-active, .status-pending-green { background: #DCFCE7; color: #166534; }
.status-inactive, .status-closed { background: #FEE2E2; color: #991B1B; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-contacted { background: #DBEAFE; color: #1E40AF; }
.table-actions a { margin-right: 12px; font-size: 13px; font-weight: 600; color: var(--primary); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); }
.login-card { background: #fff; padding: 40px; border-radius: var(--radius); width: 380px; box-shadow: var(--shadow-hover); }

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #25D366;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 999;
    transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 16px 24px;
        gap: 4px;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border);
    }
    .nav-links.mobile-open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .hero h1 { font-size: 32px; }
    .areas-grid { grid-template-columns: repeat(2, 1fr); }
    .listing-layout { grid-template-columns: 1fr; }
    .filters-box { position: static; }
    .details-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; padding: 10px 0; }
    .admin-sidebar .logo { padding: 0 16px 8px; font-size: 16px; }
    .admin-sidebar nav { display: flex; overflow-x: auto; gap: 2px; padding: 0 10px 6px; -webkit-overflow-scrolling: touch; }
    .admin-sidebar nav a { white-space: nowrap; padding: 8px 14px; border-right: none; border-bottom: 3px solid transparent; }
    .admin-sidebar nav a:hover, .admin-sidebar nav a.active { border-right: none; border-bottom: 3px solid var(--primary); }
    .admin-main { padding: 16px; }
    .stats-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    body { font-size: 14px; }
    .hero { padding: 40px 0 56px; }
    .hero h1 { font-size: 26px; line-height: 1.25; }
    .hero p { font-size: 15px; }
    .hero-badge { font-size: 12px; padding: 5px 12px; }
    .section-title { font-size: 22px; }
    .section-sub { font-size: 14px; }
    .search-box { padding: 14px; gap: 10px; }
    .search-box select, .search-box input { min-width: 100%; font-size: 14px; padding: 10px 12px; }
    .stats-strip { gap: 20px; }
    .stat-item .num { font-size: 22px; }
    .areas-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hostel-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .header-inner { padding: 12px 16px; }
    .logo { font-size: 20px; }
    .btn { font-size: 14px; padding: 10px 18px; }
    .details-sidebar .price-big { font-size: 24px; }
    .amenities-grid { grid-template-columns: 1fr; }
    .whatsapp-float { width: 48px; height: 48px; bottom: 16px; right: 16px; }
    .form-card { padding: 20px; }
    /* Admin tables: text ab wrap hoga instead of cut hone ke, kyunki mobile pe hover kaam nahi karta */
    table.admin-table th, table.admin-table td { white-space: normal; max-width: 140px; overflow: visible; text-overflow: clip; font-size: 12px; padding: 8px 10px; overflow-wrap: break-word; }
    .admin-main { padding: 14px; }
    .form-row { gap: 10px; }
}

