/* ITSWEBER CMS – Creative Theme */
/* Modern, dynamic theme for agencies and portfolios */

:root {
    --color-primary: #8b5cf6;
    --color-primary-dark: #7c3aed;
    --color-accent: #06b6d4;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-heading: #f1f5f9;
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-card: #1e293b;
    --color-border: #334155;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-width: 1140px;
    --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.7; font-size: 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 720px; }

.site-header { background: rgba(15,23,42,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); height: var(--header-height); display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { text-decoration: none; }
.logo-text { font-size: 1.25rem; font-weight: 700; color: var(--color-heading); letter-spacing: -0.025em; }
.site-logo img { height: 40px; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text); }
.nav-list { list-style: none; display: flex; gap: 1.75rem; }
.nav-list a { color: var(--color-text-light); font-size: 0.9375rem; font-weight: 500; transition: color 0.15s; text-decoration: none; }
.nav-list a:hover, .nav-list a.active { color: var(--color-accent); text-decoration: none; }

.hero-section { padding: 8rem 0 6rem; background: linear-gradient(135deg, var(--color-bg) 0%, #1a1040 50%, var(--color-bg) 100%); text-align: center; position: relative; overflow: hidden; }
.hero-section::before { content: ''; position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%); transform: translate(-50%, -50%); pointer-events: none; }
.hero-title { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; color: var(--color-heading); position: relative; }
.hero-subtitle { font-size: 1.25rem; color: var(--color-text-light); max-width: 600px; margin: 0 auto 2rem; position: relative; }

.btn { display: inline-block; padding: 0.75rem 1.75rem; font-weight: 500; border-radius: 8px; font-size: 0.9375rem; text-decoration: none; transition: all 0.2s; }
.btn-primary, .btn-hero { background: var(--color-primary); color: #fff; }
.btn-primary:hover, .btn-hero:hover { background: var(--color-primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,92,246,0.3); }
.btn-cta { background: var(--color-accent); color: var(--color-bg); }
.btn-cta:hover { background: #0891b2; text-decoration: none; }
.btn-secondary { background: var(--color-bg-alt); color: var(--color-text); border: 1px solid var(--color-border); }

.intro-section, .features-section, .blog-preview-section, .cta-section, .page-section, .blog-section, .gallery-section { padding: 5rem 0; }
.intro-section { text-align: center; }
.intro-section h2, .features-section h2, .blog-preview-section h2, .cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; color: var(--color-heading); }
.intro-section p { font-size: 1.125rem; color: var(--color-text-light); max-width: 680px; margin: 0 auto; }
.features-section { background: var(--color-bg-alt); }
.features-section h2 { text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.feature-card { background: var(--color-bg); padding: 2rem; border-radius: 12px; border: 1px solid var(--color-border); transition: border-color 0.2s, transform 0.2s; }
.feature-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.feature-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; color: var(--color-heading); }
.feature-card p { color: var(--color-text-light); font-size: 0.9375rem; }

.cta-section { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); text-align: center; }
.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.page-title, .section-title { font-size: 2.25rem; font-weight: 700; color: var(--color-heading); margin-bottom: 1.5rem; }
.page-content { font-size: 1.0625rem; line-height: 1.8; }
.page-content p { margin-bottom: 1.25rem; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.blog-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.blog-card-image { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.25rem; }
.blog-card-body h2 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.blog-card-body h2 a { color: var(--color-heading); }
.blog-card-body h2 a:hover { color: var(--color-accent); text-decoration: none; }
.blog-card-body p { font-size: 0.9375rem; color: var(--color-text-light); }
.blog-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--color-accent); }
.blog-meta { display: flex; gap: 1rem; margin-top: 0.75rem; font-size: 0.8125rem; color: var(--color-text-light); }

.blog-article { padding: 3rem 0 5rem; }
.article-image { width: 100%; border-radius: 12px; margin-bottom: 2rem; }
.article-title { font-size: 2.25rem; font-weight: 700; color: var(--color-heading); margin-bottom: 1rem; }
.article-meta { display: flex; gap: 1rem; margin-bottom: 2rem; font-size: 0.875rem; color: var(--color-text-light); }
.article-category { color: var(--color-accent); font-weight: 500; }
.article-content { font-size: 1.0625rem; line-height: 1.8; }
.article-content p { margin-bottom: 1.25rem; }
.article-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.gallery-card { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); text-decoration: none; color: var(--color-text); transition: border-color 0.2s, transform 0.2s; }
.gallery-card:hover { border-color: var(--color-primary); transform: translateY(-2px); text-decoration: none; }
.gallery-card-image { width: 100%; height: 220px; object-fit: cover; }
.gallery-card-placeholder { height: 220px; background: var(--color-bg-alt); }
.gallery-card-info { padding: 1rem; }
.gallery-card-info h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--color-heading); }
.gallery-card-info p { font-size: 0.875rem; color: var(--color-text-light); }

.contact-info { margin-top: 2rem; }
.contact-info p { margin-bottom: 0.5rem; }

.error-section { text-align: center; padding: 8rem 0; }
.error-code { font-size: 6rem; font-weight: 800; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.error-message { font-size: 1.25rem; color: var(--color-text-light); margin: 1rem 0 2rem; }

.site-footer { background: var(--color-bg-alt); color: var(--color-text); padding: 3rem 0; border-top: 1px solid var(--color-border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-copyright { font-size: 0.875rem; opacity: 0.7; }
.footer-text { font-size: 0.8125rem; opacity: 0.5; margin-top: 0.25rem; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { color: var(--color-text-light); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--color-accent); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--color-text-light); font-size: 0.875rem; }
.footer-social a:hover { color: var(--color-accent); }

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

/* Gallery – Album image grid */
.gallery-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.625rem; margin-top: 1.5rem; }
.gallery-image-item { position: relative; overflow: hidden; border-radius: 8px; cursor: pointer; aspect-ratio: 1/1; background: var(--color-bg-alt); margin: 0; }
.gallery-image-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; display: block; }
.gallery-image-item:hover img, .gallery-image-item:focus img { transform: scale(1.05); }
.gallery-image-item:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.gallery-image-item figcaption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.65)); color: #fff; padding: 2rem 0.75rem 0.625rem; font-size: 0.8125rem; opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.gallery-image-item:hover figcaption, .gallery-image-item:focus figcaption { opacity: 1; }

/* Gallery – Lightbox */
.gallery-lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.gallery-lightbox.is-open { opacity: 1; pointer-events: all; }
.gallery-lightbox-inner { position: relative; max-width: min(90vw, 1200px); display: flex; flex-direction: column; align-items: center; padding: 0 4rem; }
.gallery-lightbox-img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; display: block; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
.gallery-lightbox-info { margin-top: 0.875rem; text-align: center; min-height: 2.5rem; }
.gallery-lightbox-caption { color: rgba(255,255,255,0.9); font-size: 0.9375rem; margin: 0; }
.gallery-lightbox-counter { color: rgba(255,255,255,0.45); font-size: 0.8125rem; margin-top: 0.25rem; }
.gallery-lightbox-close { position: fixed; top: 1.125rem; right: 1.5rem; background: none; border: none; color: rgba(255,255,255,0.75); font-size: 2.25rem; line-height: 1; cursor: pointer; padding: 0.25rem 0.5rem; transition: color 0.15s; z-index: 9001; }
.gallery-lightbox-close:hover, .gallery-lightbox-close:focus { color: #fff; outline: none; }
.gallery-lightbox-prev, .gallery-lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 1.375rem; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; z-index: 9001; user-select: none; }
.gallery-lightbox-prev { left: 1rem; }
.gallery-lightbox-next { right: 1rem; }
.gallery-lightbox-prev:hover, .gallery-lightbox-next:hover { background: rgba(255,255,255,0.22); }
.gallery-lightbox-prev:disabled, .gallery-lightbox-next:disabled { opacity: 0.2; cursor: default; }

/* Gallery Preview Section (Homepage) */
.gallery-preview-section { padding: 5rem 0; }
.gallery-preview-section h2 { text-align: center; margin-bottom: 2.5rem; }
.gallery-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.gallery-preview-card { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; position: relative; text-decoration: none; background: var(--color-bg-alt); }
.gallery-preview-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-preview-card:hover img { transform: scale(1.05); }
.gallery-preview-placeholder { width: 100%; height: 100%; background: var(--color-border); display: flex; align-items: center; justify-content: center; color: var(--color-text-light); font-size: 2rem; }
.gallery-preview-card span { position: absolute; bottom: 0; left: 0; right: 0; padding: 0.5rem 0.75rem; background: linear-gradient(transparent, rgba(0,0,0,0.6)); color: #fff; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-preview-cta { text-align: center; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 1rem 1.5rem; gap: 0.75rem; }
    .nav-list.open { display: flex; }
    .hero-title { font-size: 2.25rem; }
    .hero-section { padding: 5rem 0 4rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .gallery-images-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.375rem; }
    .gallery-lightbox-inner { padding: 0 3rem; }
    .gallery-lightbox-prev { left: 0.25rem; }
    .gallery-lightbox-next { right: 0.25rem; }
}
