/* Dar Alfnoon - Saudi/Arabic Design System */

/* Import Arabic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;500;600;700&display=swap');

/* Design Tokens & CSS Variables */
:root {
  /* Core Saudi Palette */
  --saudi-deep: #0C3B2E;     /* deep Saudi green */
  --saudi-olive: #1C5A43;    /* secondary green */
  --saudi-gold: #C5A14E;     /* accent gold */
  --saudi-beige: #EADFC8;    /* parchment sand */
  --saudi-cream: #FAF8F3;    /* off-white base */
  --saudi-ink: #1E1B16;      /* near black */
  --saudi-muted: #6E6A5E;    /* muted text */
  --saudi-card: #FFFFFF;     /* surfaces */
  --saudi-overlay: rgba(12,59,46,.06);

  /* State Colors */
  --success: #2E7D61;
  --danger: #C75B5B;
  --info: #1B6E8B;

  /* Typography Scale */
  --font-heading: 'Amiri', 'Scheherazade New', 'Times New Roman', serif;
  --font-body: 'Cairo', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Shadows */
  --shadow-subtle: 0 2px 8px var(--saudi-overlay);
  --shadow-medium: 0 6px 20px var(--saudi-overlay);
  --shadow-large: 0 12px 32px var(--saudi-overlay);
}

/* Base Styles */
body { 
  background: linear-gradient(180deg, var(--saudi-cream) 0%, #F6F2E7 100%);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(197,161,78,.18), rgba(197,161,78,0) 40%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><path d='M32 0l8 8-8 8-8-8 8-8zm0 48l8 8-8 8-8-8 8-8zM0 32l8 8 8-8-8-8-8 8zm48 0l8 8 8-8-8-8-8 8z' fill='%231C5A43' fill-opacity='.05'/></svg>");
  font-family: var(--font-body);
  color: var(--saudi-ink);
  line-height: 1.6;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--saudi-ink);
  line-height: 1.2;
}

h1 { font-size: clamp(36px, 4.5vw, 56px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; }
h5 { font-size: 16px; font-weight: 600; }
h6 { font-size: 14px; font-weight: 600; }

p, div, span {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
}

small {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--saudi-deep) 0%, var(--saudi-olive) 100%);
    color: white;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--saudi-gold);
}

.hero-section h1 {
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
}

.hero-section .lead {
    color: rgba(233, 242, 238, 0.9);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
}

.hero-section .text-muted {
    color: rgba(233, 242, 238, 0.8);
    font-family: var(--font-body);
}

/* Removed decorative ornament - was causing visible "0" character */

/* Featured Practice Cards */
.featured-practice {
    background: var(--saudi-card);
    border-radius: 20px;
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(12, 59, 46, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.featured-practice:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: var(--saudi-gold);
}

.featured-practice:hover .practice-image {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(12, 59, 46, 0.2);
}

.featured-practice.active {
    background: linear-gradient(135deg, var(--saudi-deep) 0%, var(--saudi-olive) 100%);
    color: white;
    border-color: var(--saudi-gold);
}

.featured-practice.active h4,
.featured-practice.active small {
    color: white !important;
}

.featured-practice.active::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--saudi-gold);
    border-radius: 1px;
}

.practice-icon {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
}

.practice-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--saudi-gold);
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s ease;
    object-fit: cover;
    object-position: center;
}

.featured-practice.active .practice-image {
    border-color: white;
}

/* Note: Real images are now used for Sculpture, Painting, and Calligraphy */

/* Fallback backgrounds for practices without images */
.photography-bg {
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    position: relative;
}

.photography-bg::before {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.mixed-media-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.mixed-media-bg::before {
    content: '🎨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.installation-bg {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    position: relative;
}

.installation-bg::before {
    content: '🏛️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Default practice */
.default-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.default-bg::before {
    content: '🎭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Artist Cards */
.artist-card {
    background: var(--saudi-card);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin-bottom: 0;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(12, 59, 46, 0.08);
    border-left: 4px solid var(--saudi-gold);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.artist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
    border-left-color: var(--saudi-deep);
}

/* Practice Badges */
.practice-badge {
    background: rgba(12, 59, 46, 0.06);
    color: var(--saudi-deep);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: var(--spacing-xs);
    display: inline-block;
    border: 1px solid rgba(12, 59, 46, 0.12);
    transition: all 0.2s ease;
}

.practice-badge:hover {
    background: var(--saudi-gold);
    color: var(--saudi-ink);
    border-color: var(--saudi-gold);
}

/* Filter Section */
.filter-section {
    background: var(--saudi-card);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(12, 59, 46, 0.08);
}

/* Status Badges */
.status-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-body);
}

.status-alive { 
    background: rgba(46, 125, 97, 0.12);
    color: var(--success);
}

.status-deceased { 
    background: rgba(199, 91, 91, 0.12);
    color: var(--danger);
}

.status-unknown { 
    background: rgba(110, 106, 94, 0.12);
    color: var(--saudi-muted);
}

/* Buttons */
.btn-primary {
    background: var(--saudi-deep);
    border: none;
    border-radius: 14px;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

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

.btn-primary:focus {
    box-shadow: 0 0 0 2px var(--saudi-gold);
}

.btn-outline-secondary {
    border: 1.5px solid var(--saudi-gold);
    color: var(--saudi-deep);
    background: transparent;
    border-radius: 14px;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background: var(--saudi-gold);
    color: var(--saudi-ink);
    border-color: var(--saudi-gold);
    transform: translateY(-1px);
}

/* Form Elements */
.form-control, .form-select {
    border-radius: 12px;
    border: 1px solid rgba(12, 59, 46, 0.15);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--saudi-gold);
    box-shadow: 0 0 0 2px rgba(197, 161, 78, 0.2);
    caret-color: var(--saudi-deep);
}

.form-label {
    font-weight: 600;
    color: var(--saudi-deep);
    font-family: var(--font-body);
    margin-bottom: var(--spacing-sm);
}

/* Pagination */
.pagination .page-link {
    border-radius: 12px;
    margin: 0 2px;
    border: none;
    color: var(--saudi-deep);
    background: var(--saudi-card);
    box-shadow: var(--shadow-subtle);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--saudi-gold);
    color: var(--saudi-ink);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.pagination .page-item.active .page-link {
    background: var(--saudi-deep);
    color: white;
    border: none;
}

/* Social Media Links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid rgba(12, 59, 46, 0.1);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--saudi-gold);
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
}

.social-link.facebook {
    background: #1877f2;
    color: white;
}

.social-link.website {
    background: var(--saudi-deep);
    color: white;
}

/* Navbar Styles */
.navbar {
    background: var(--saudi-deep) !important;
    box-shadow: var(--shadow-medium);
}

.navbar-brand, .nav-link {
    color: #F5FBF8 !important;
    font-family: var(--font-body);
    font-weight: 500;
}

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

.navbar-text {
    color: rgba(245, 251, 248, 0.8) !important;
    font-family: var(--font-body);
}

/* Logout button styling */
.logout-btn {
    color: #F5FBF8 !important;
    font-family: var(--font-body);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
}

.logout-btn:hover {
    color: var(--saudi-gold) !important;
    text-decoration: none;
}


/* Decorative Elements */
.ornament-underline {
    position: relative;
}

.ornament-underline::after {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    background: var(--saudi-gold);
    margin-top: var(--spacing-sm);
    border-radius: 2px;
}

/* Artist Card Layout */
.artist-card .mt-2:last-child {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: auto;
}

/* Login Card Styles */
.login-card {
    background: var(--saudi-card);
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    border: 1px solid rgba(12, 59, 46, 0.08);
    overflow: hidden;
    margin-top: var(--spacing-xl);
}

.login-header {
    background: linear-gradient(135deg, var(--saudi-deep) 0%, var(--saudi-olive) 100%);
    color: white;
    padding: var(--spacing-xl);
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--saudi-gold);
}

.login-header h2 {
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.login-header p {
    color: rgba(233, 242, 238, 0.9);
    font-family: var(--font-body);
    margin: 0;
}

.login-body {
    padding: var(--spacing-xl);
}

.login-body .alert {
    border-radius: 12px;
    border: none;
    font-family: var(--font-body);
    margin-bottom: var(--spacing-lg);
}

.login-body .alert-danger {
    background: rgba(199, 91, 91, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.login-body .form-label {
    color: var(--saudi-deep);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.login-body .form-control {
    border-radius: 12px;
    border: 1px solid rgba(12, 59, 46, 0.15);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-body);
    transition: all 0.2s ease;
    font-size: 16px;
}

.login-body .form-control:focus {
    border-color: var(--saudi-gold);
    box-shadow: 0 0 0 2px rgba(197, 161, 78, 0.2);
    caret-color: var(--saudi-deep);
}

.login-body .btn-primary {
    background: var(--saudi-deep);
    border: none;
    border-radius: 14px;
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 16px;
    transition: all 0.2s ease;
}

.login-body .btn-primary:hover {
    background: #0a3328;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.login-body .text-muted {
    color: var(--saudi-muted) !important;
    font-family: var(--font-body);
    font-size: 14px;
}

/* Artist Images Gallery - Horizontal Scroll */
.artist-images-gallery {
    margin-top: var(--spacing-md);
}

.images-scroll-container {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
    margin-top: var(--spacing-xs);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide scrollbar but keep functionality */
.images-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.images-scroll-container::-webkit-scrollbar-track {
    background: var(--saudi-beige);
    border-radius: 3px;
}

.images-scroll-container::-webkit-scrollbar-thumb {
    background: var(--saudi-gold);
    border-radius: 3px;
}

.images-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--saudi-deep);
}

.gallery-item {
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--saudi-beige);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-subtle);
    background: linear-gradient(90deg, var(--saudi-beige) 25%, var(--saudi-cream) 50%, var(--saudi-beige) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

.gallery-item img[src] {
    animation: none;
    background: none;
}

.gallery-item img:hover {
    border-color: var(--saudi-gold);
    box-shadow: var(--shadow-medium);
}

/* Gallery item title removed - no text under images */

/* Image Modal Styling */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-large);
}

.modal-header {
    background: var(--saudi-deep);
    color: white;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: var(--spacing-lg);
}

.modal-header .modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: var(--spacing-xl);
    background: var(--saudi-cream);
}

.modal-footer {
    border-top: 1px solid var(--saudi-beige);
    padding: var(--spacing-lg);
    background: white;
    border-radius: 0 0 16px 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-item {
        width: 100px;
    }
    
    .gallery-item img {
        width: 100px;
        height: 100px;
    }
}