/* ==========================================================================
   Pret2.co.za - Mobile-First Performance Stylesheet
   ========================================================================== */

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e94560;
    --accent-hover: #c73a52;
    --gold: #d4a373;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #dee2e6;
    --dark: #212529;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --container-max: 1200px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   Navbar - Mobile First
   ========================================================================== */
.navbar {
    background: var(--primary);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.navbar-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
}
.brand-text { color: var(--gold); }
.navbar-toggler {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.toggler-icon {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}
.navbar-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 12px;
}
.navbar-menu.open { display: flex; }
.nav-link {
    color: rgba(255,255,255,0.85);
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
    text-decoration: none;
}
.nav-link:hover, .nav-link.active {
    color: var(--gold);
}
.nav-link--admin { color: var(--accent); }
.nav-user { display: flex; flex-direction: column; }

/* ==========================================================================
   Flash Messages
   ========================================================================== */
.flash-message {
    padding: 12px 16px;
    margin: 8px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.flash-success { background: #d4edda; color: #155724; }
.flash-error, .flash-danger { background: #f8d7da; color: #721c24; }
.flash-warning { background: #fff3cd; color: #856404; }
.flash-info { background: #d1ecf1; color: #0c5460; }
.flash-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.main-content { min-height: 60vh; }

/* Page Headers */
.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 32px 0;
    text-align: center;
}
.page-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.7); font-size: 1rem; }

/* Section Titles */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

/* ==========================================================================
   Profile Cards - Mobile First Grid
   ========================================================================== */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 0;
}
.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}
.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.profile-card__image {
    aspect-ratio: 3/4;
    overflow: hidden;
    position: relative;
}
.profile-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.profile-card__info {
    padding: 10px;
}
.profile-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-card__area {
    font-size: 0.8rem;
    color: var(--gray);
}
.profile-card__available {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid var(--white);
}

/* ==========================================================================
   Home Page Sections
   ========================================================================== */
.home-section {
    padding: 24px 0;
}
.home-section:nth-child(even) { background: var(--white); }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.section-header .view-all {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* Search Toggle */
.search-toggle {
    background: var(--white);
    padding: 16px;
    margin: 16px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.search-toggle input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}
.search-toggle input:focus {
    border-color: var(--accent);
    outline: none;
}

/* Banner Section */
.banner-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 16px 0;
}
.banner-section img {
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Areas, Services, Venues Pages
   ========================================================================== */
.area-grid, .service-grid, .venue-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 0;
}
.area-card, .service-card, .venue-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.area-card:hover, .service-card:hover, .venue-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.area-card h3, .service-card h3, .venue-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--primary);
}
.area-card .count, .service-card .count, .venue-card .count {
    font-size: 0.8rem;
    color: var(--gray);
}
.area-card--empty {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
}
.area-card--empty h3 { color: var(--white); }
.area-card--empty .cta-text { color: var(--gold); font-size: 0.85rem; margin-top: 8px; }

/* ==========================================================================
   Profile Detail Page
   ========================================================================== */
.profile-detail { padding: 16px 0; }
.profile-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}
.profile-hero img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.profile-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.profile-gallery__thumb {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}
.profile-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.profile-gallery__thumb:hover img { transform: scale(1.05); }
.profile-info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.profile-info-card h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--primary);
}
.profile-attributes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.profile-attr {
    padding: 8px;
    background: var(--light);
    border-radius: var(--radius);
}
.profile-attr__label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.profile-attr__value { font-weight: 600; font-size: 0.9rem; }
.profile-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}
.profile-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}
.profile-contact a:hover { background: var(--accent-hover); color: var(--white); }

/* ==========================================================================
   Comments Section
   ========================================================================== */
.comments-section { margin-top: 24px; }
.comment {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}
.comment__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.comment__author { font-weight: 600; font-size: 0.9rem; }
.comment__date { font-size: 0.8rem; color: var(--gray); }
.comment__content { font-size: 0.95rem; line-height: 1.5; }
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
}
.comment-form textarea:focus { border-color: var(--accent); outline: none; }

/* ==========================================================================
   Forum / Lounge
   ========================================================================== */
.forum-categories { padding: 16px 0; }
.forum-category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.forum-category-card h3 {
    color: var(--primary);
    margin-bottom: 4px;
}
.forum-category-card p { font-size: 0.9rem; color: var(--gray); }
.forum-topic-list { list-style: none; }
.forum-topic-item {
    background: var(--white);
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.forum-topic-item:last-child { border-bottom: none; }
.forum-topic-title { font-weight: 500; }
.forum-topic-meta { font-size: 0.8rem; color: var(--gray); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); color: var(--white); }
.btn-secondary { background: var(--primary); color: var(--white); }
.btn-secondary:hover { background: var(--primary-light); color: var(--white); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #c49362; color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}
.form-control:focus { border-color: var(--accent); outline: none; }
.form-error { color: #dc3545; font-size: 0.8rem; margin-top: 4px; }

/* ==========================================================================
   CTA Banner
   ========================================================================== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}
.cta-banner strong { display: block; font-size: 1.2rem; margin-bottom: 12px; }
.cta-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
}
.cta-btn:hover { background: #c49362; color: var(--white); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 32px 0 16px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.footer-col h4 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1rem;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    padding: 3px 0;
    font-size: 0.9rem;
    text-decoration: none;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    text-align: center;
    font-size: 0.85rem;
}

/* ==========================================================================
   Login / Auth Pages
   ========================================================================== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 24px;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.auth-card h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 24px;
    font-size: 1.5rem;
}
.auth-divider {
    text-align: center;
    margin: 16px 0;
    color: var(--gray);
    font-size: 0.85rem;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--gray-light);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.btn-google {
    background: var(--white);
    border: 2px solid var(--gray-light);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-google:hover { border-color: var(--accent); color: var(--dark); }

/* ==========================================================================
   Admin Dashboard
   ========================================================================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: var(--primary);
    padding: 20px;
    flex-shrink: 0;
}
.admin-sidebar a {
    display: block;
    color: rgba(255,255,255,0.8);
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}
.admin-content {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
}
.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.admin-card .card-header {
    background: var(--light);
    color: var(--dark);
    padding: 12px 20px;
    border-bottom: 2px solid var(--gold);
}
.admin-card .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary);
}
.admin-card .card-body {
    padding: 20px;
}
.admin-card h2 { font-size: 1.2rem; margin-bottom: 16px; color: var(--primary); }
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
}
.admin-table th {
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    font-size: 0.8rem;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.admin-stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}
.admin-stat__value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.admin-stat__label { font-size: 0.85rem; color: var(--gray); }

/* Admin form errors — no bullets, red text */
.form-error-list {
    margin-top: 4px;
}
.form-error-message {
    color: #dc3545;
    font-size: 0.85rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}
.page-item {
    display: inline-block;
}
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.page-link:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.page-item.active .page-link {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.page-item.disabled .page-link {
    background: var(--light);
    color: var(--gray);
    cursor: not-allowed;
    border-color: var(--gray-light);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--gray); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.hidden { display: none; }

/* Lazy loading placeholder */
.lazy-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   Tablet Breakpoint (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    .container { padding: 0 24px; }
    .navbar-toggler { display: none; }
    .navbar-menu {
        display: flex !important;
        width: auto;
        flex-direction: row;
        padding-top: 0;
        gap: 4px;
    }
    .nav-link {
        border-bottom: none;
        padding: 6px 10px;
        font-size: 0.85rem;
        border-radius: var(--radius);
    }
    .nav-link:hover { background: rgba(255,255,255,0.1); }
    .nav-user { flex-direction: row; gap: 4px; }

    .profile-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .area-grid, .service-grid, .venue-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .profile-attributes { grid-template-columns: repeat(3, 1fr); }
    .admin-stats { grid-template-columns: repeat(4, 1fr); }
    .page-header h1 { font-size: 2.2rem; }
}

/* ==========================================================================
   Desktop Breakpoint (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .profile-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .area-grid, .service-grid, .venue-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .profile-gallery { grid-template-columns: repeat(6, 1fr); }
    .nav-link { font-size: 0.9rem; padding: 8px 12px; }
    .profile-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ==========================================================================
   Large Desktop (1200px+)
   ========================================================================== */
@media (min-width: 1200px) {
    .profile-grid { grid-template-columns: repeat(5, 1fr); }
}
