/* =========================================================================
   VARIABLES & THEME
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --primary: #111827; /* Dark slate */
    --primary-light: #1f2937;
    --accent: #c09a5b; /* Luxurious Gold / Warm Beige */
    --accent-hover: #a58145;
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #10b981;
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================================
   RESET & BASICS
   ========================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    background: var(--surface);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* =========================================================================
   LAYOUT UTILITIES
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
    .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */
/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
}

.glass-dark {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(192, 154, 91, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(192, 154, 91, 0.39);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: white;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-link.active, .nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    color: var(--primary);
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

.mobile-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu .nav-link {
    font-size: 1.2rem;
    padding: 12px;
    border-radius: 8px;
}
.mobile-menu .nav-link:hover {
    background: var(--bg-color);
}

/* =========================================================================
   PAGE SECTIONS & SPA ROUTING
   ========================================================================= */
.app-content {
    flex: 1;
    margin-top: var(--nav-height);
    position: relative;
}

.page-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding-bottom: 80px;
}

.page-section.active {
    display: block;
}

.page-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   HOME PAGE SPECIFICS
   ========================================================================= */
.hero {
    position: relative;
    padding: 120px 20px;
    text-align: center;
    color: white;
    border-radius: 0 0 40px 40px;
    overflow: hidden;
    margin-top: calc(var(--nav-height) * -1); /* Full bleed */
    padding-top: calc(120px + var(--nav-height));
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1589939705384-5185137a7f0f?auto=format&fit=crop&q=80&w=2000') center/cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content p {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #e2e8f0;
    margin: 24px 0 40px;
    font-weight: 300;
}

.features-grid {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    display: grid;
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #fffbeb;
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================================
   PORTFOLIO SPECIFICS
   ========================================================================= */
.portfolio-header {
    text-align: center;
    padding: 80px 0 40px;
}

.portfolio-grid {
    display: grid;
    gap: 32px;
}

.portfolio-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.portfolio-media-container {
    position: relative;
    height: 250px;
    background: #f1f5f9;
    overflow: hidden;
}

.portfolio-media {
    display: flex;
    height: 100%;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.portfolio-media::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.portfolio-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    position: relative;
}

.portfolio-item img, .portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portfolio-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.portfolio-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-info h3 {
    margin-bottom: 8px;
    color: var(--primary);
}

.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex: 1;
}

/* =========================================================================
   CONTACT & ADMIN
   ========================================================================= */
.page-header {
    text-align: center;
    padding: 80px 0 40px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .contact-wrapper {
         grid-template-columns: 1fr 1.5fr;
    }
}

.contact-info {
    padding-right: 20px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.info-card i {
    color: var(--accent);
    margin-top: 4px;
}

.form-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

/* Admin specific */
.admin-login-wrapper {
    max-width: 400px;
    margin: 80px auto;
}

.admin-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.admin-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.admin-btn-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--error);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.admin-btn-delete:hover {
    opacity: 1;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
    background-color: var(--primary);
    color: white;
    padding: 60px 0 24px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    gap: 32px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Utility classes for dynamic rendering */
.hidden-hard { display: none !important; }
