/* Sri Lankan Celebrity Archive - Main Styles */

/* CSS Variables */
:root {
    /* Wes Anderson inspired color palette */
    --primary-color: #c98b7b;       /* Dusty rose/terracotta */
    --secondary-color: #e9c46a;     /* Mustard yellow */
    --accent-color: #81b29a;        /* Seafoam green */
    --text-primary: #3d405b;        /* Muted navy */
    --text-secondary: #5c5d6d;      /* Warm gray */
    --text-light: #8e8e9a;          /* Light lavender gray */
    --bg-primary: #fefae0;          /* Warm cream */
    --bg-secondary: #faedcd;        /* Pale wheat */
    --bg-tertiary: #e9edc9;         /* Soft sage */
    --border-color: #d4c4a8;
    --footer-bg: #3d405b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Noto Sans Sinhala', 'Noto Sans Tamil', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

a:hover {
    color: var(--secondary-color);
}

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

ul, ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--bg-tertiary);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a67c6b 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.search-box input:focus {
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(218, 165, 32, 0.3);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Category Pills */
.categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.category-pill {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.category-pill:hover {
    background: rgba(255,255,255,0.3);
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.view-all {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Celebrity Cards */
.celebrity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.celebrity-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.celebrity-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.celebrity-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.celebrity-card-name {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.celebrity-card-dates {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.celebrity-card-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.celebrity-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.tag.era {
    background: var(--primary-color);
    color: white;
}

/* Filters */
.filters {
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

/* Celebrity Profile Page */
.profile-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a67c6b 100%);
    color: white;
    padding: 3rem 0;
}

.profile-hero-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-image {
    width: 250px;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.profile-name-local {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.profile-dates {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-tags .tag {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.profile-bio h2 {
    margin-bottom: 1rem;
}

.profile-bio p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.sidebar-card ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-card li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    position: relative;
}

.sidebar-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

/* Placeholder Image */
.placeholder-image {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

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

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

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #b07a6a;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover,
.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Related Celebrities */
.related-celebrities {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-celebrities h2 {
    margin-bottom: 1.5rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.hidden { display: none; }
