/* Refined responsive styles for gallery */
:root{
  --gap:12px;
  --accent:#c9462c; /* warm brick accent */
  --muted:#767676;
  --bg:#ffffff;
  --heading:#1f2933;
  --card-bg:#ffffff;
  --album-col-width:220px;
  --radius:8px;
  --footer-bg:#2f1a17; /* darker matched footer */
  --footer-text:#f5efe9;
}
*{box-sizing:border-box}
html, body { height: 100%; }
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin:0; color:var(--heading); background: var(--bg);
  --button-bg:#c9462c;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

main{flex:1}
.wrap{max-width:1200px;margin:0 auto;padding:20px}
.site-header{background:linear-gradient(90deg, #fff 0%, #fff 100%);border-bottom:1px solid #eee}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between}
.site-header h1{font-size:1.1rem;margin:0;color:var(--heading);font-weight:600}
.site-header nav a{color:var(--muted);text-decoration:none;margin-left:18px;font-weight:500}
.site-header nav a:hover{color:var(--accent)}
.btn{display:inline-block;padding:10px 14px;background:var(--accent);color:#fff;border-radius:6px;text-decoration:none}
.
/* Hero */
.hero{background:linear-gradient(180deg, #fff 0%, #fff 100%);padding:34px 0 10px}
.hero-inner{display:flex;gap:24px;align-items:center}
.hero-text{flex:1}
.hero h2, .hero-text h2{
  margin:0 0 8px;
  color:var(--heading);
  font-family: 'Aladin', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, cursive;
  font-weight:400;
  font-size: clamp(28px, 4.5vw, 48px);
  letter-spacing: 0.6px;
  line-height:1.05;
}

.title-accent{
  display:block;
  position:relative;
  width:100vw;
  box-sizing:border-box;
  background:var(--accent);
  color:#fff;
  padding:12px 40px 12px 44px; /* more left indent */
  border-radius:0;
  line-height:1;
  margin-left: calc((100% - 100vw) / 2);
  margin-right: calc((100% - 100vw) / 2);
}

@media (max-width:520px){
  .title-accent{padding:10px 14px;font-size:1.05em}
}

/* Title + subtitle inside the accent stripe */
.title-accent .hero-title{margin:0;color:#fff;font-family: 'Aladin', cursive;font-weight:400;font-size: clamp(28px, 4.5vw, 44px);line-height:1}
.title-accent .title-sub{margin:6px 0 0;color:rgba(255,255,255,0.95);font-weight:500;font-size: clamp(13px, 2vw, 18px);font-style:italic}
.title-accent .hero-title a{color:inherit;text-decoration:none}
.lead{color:var(--muted);margin:0 0 12px;font-weight:500}
.contact-inline a{color:var(--accent);text-decoration:none}
.hero-image img{max-width:320px;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,.08)}
.btn-ghost{background:transparent;color:var(--accent);border:1px solid rgba(0,0,0,.06)}

/* Services */
.services{padding:18px 20px 36px}
.services h3{margin:0 0 14px;color:var(--heading)}
.services-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px}
.service{background:var(--card-bg);border-radius:8px;padding:14px;box-shadow:0 6px 18px rgba(12,12,12,.04), 0 8px 20px rgba(201,70,44,0.06);display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;transition:box-shadow .18s ease,transform .12s ease}
.service:hover{transform:translateY(-6px);box-shadow:0 10px 28px rgba(12,12,12,.06), 0 18px 46px rgba(201,70,44,0.12)}
.service img{width:64px;height:64px;object-fit:contain;margin-bottom:6px}
/* Tint icons to the accent color.
   - For monochrome SVGs the mask technique below will apply a solid accent color.
   - For raster PNG fallbacks we apply a filter that approximates the accent tint. */
.service img{
  /* try mask if SVG (will ignore for raster images) */
  -webkit-mask-image: none;
  mask-image: none;
  filter: grayscale(1) brightness(0) sepia(1) saturate(600%) hue-rotate(-10deg) contrast(0.95);
}

/* If an icon is an inline SVG or served as SVG file, prefer using it as a mask to get exact accent color */
.service img[src$=".svg"]{
  width:64px;height:64px;display:block;
  background:var(--accent);
  -webkit-mask-image: url(attr(src url));
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url(attr(src url));
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  /* hide the original image when masked */
  object-fit:contain;
}
.service h4{margin:0;font-size:1rem}
.service ul{margin:8px 0 0;padding-left:20px;color:var(--muted);display:inline-block;text-align:left}

/* Contact */
.contact{padding:18px 20px 48px}
.contact h3{margin:0 0 12px;color:var(--heading)}
.contact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.contact-grid h4{margin:0 0 6px}

.contact-card{background:var(--card-bg);border-radius:10px;padding:16px;box-shadow:0 10px 30px rgba(16,16,16,.06);display:flex;flex-direction:column;gap:10px;align-items:start;border-left:4px solid rgba(0,0,0,0.04)}
.contact-head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.contact-head svg{color:var(--accent)}
.contact-card h4{margin:0;color:var(--heading)}
.contact-card p{margin:0;color:var(--muted)}
.contact-btn{display:inline-block;margin-top:8px;padding:8px 12px;background:var(--accent);color:#fff;border-radius:8px;text-decoration:none;font-weight:600}
.contact-btn:hover{filter:brightness(.96)}

/* Ensure links inside cards use the accent color for good contrast,
   but keep explicit button links (.contact-btn) white */
.contact-card a:not(.contact-btn), .service a:not(.contact-btn), .album-card a:not(.contact-btn), .album-preview .preview-title a{
  color:var(--accent);
  text-decoration:underline;
  font-weight:600;
}
.contact-card a:not(.contact-btn):hover, .service a:not(.contact-btn):hover, .album-card a:not(.contact-btn):hover, .album-preview .preview-title a:hover{
  filter:brightness(.95);
}

@media (max-width:520px){
  .contact-card{align-items:flex-start}
}

/* Featured album previews */
.featured{padding:8px 20px 36px}
.featured-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px}
.featured-header h3{margin:0;font-size:1.25rem;color:var(--heading)}
.featured-header .view-gallery{white-space:nowrap}
.album-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px}

/* Large CTA button for featured */
.btn.view-gallery{display:inline-block;margin-top:8px;padding:8px 12px;background:var(--accent);color:#fff;border-radius:8px;text-decoration:none;font-weight:600;box-shadow:0 8px 30px rgba(201,70,58,0.14);transition:filter .12s ease,box-shadow .16s ease}
.btn.view-gallery:hover{filter:brightness(.96)}

@media (max-width:520px){
  .featured-header{flex-direction:column;align-items:flex-start}
  .btn.view-gallery{width:100%;text-align:center}
}
.album-preview{display:block;text-decoration:none;color:inherit}
.preview-thumb{background:var(--card-bg);border-radius:8px;overflow:hidden;height:120px;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(0,0,0,.04)}
.preview-thumb img{width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .3s ease}
.preview-thumb img.loaded{opacity:1}
.preview-title{margin-top:8px;font-size:0.95rem;color:var(--accent);font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.no-thumb{padding:12px;color:var(--muted);text-align:center}

/* Hover effects for previews and album cards */
.album-preview{display:block;transition:transform .18s ease,box-shadow .18s ease}
.album-preview .preview-thumb{transition:transform .25s ease,box-shadow .25s ease}
.album-preview:hover{transform:translateY(-6px)}
.album-preview:hover .preview-thumb{box-shadow:0 12px 32px rgba(12,12,12,.12)}
.album-preview .preview-thumb img{transition:opacity .3s ease, transform .35s ease}
.album-preview:hover .preview-thumb img{transform:scale(1.04);opacity:1}

.album-card{transition:transform .22s ease,box-shadow .22s ease}
.album-card .cover img{transition:opacity .35s ease,transform .4s ease}
.album-card:hover{transform:translateY(-8px);box-shadow:0 12px 36px rgba(0,0,0,.14)}
.album-card:hover .cover img{transform:scale(1.06)}

/* modern header tweaks */
.site-header{position:sticky;top:0;z-index:1200;background:rgba(255,255,255,0.96);backdrop-filter:saturate(120%) blur(6px);position:relative}
.site-header::before{display:none}
.site-header h1{color:var(--accent)}

/* Footer */
.site-footer{background:var(--footer-bg);color:var(--footer-text);padding:18px 0;margin-top:18px}
.site-footer a{color:var(--footer-text);text-decoration:underline}

/* Footer grid layout */
.site-footer .footer-grid{display:flex;justify-content:space-between;align-items:center;gap:20px}
.footer-left .footer-brand{font-weight:700;margin-bottom:6px;color:var(--footer-text)}
.footer-contact{color:var(--footer-text);opacity:0.95;font-size:0.95rem}
.footer-contact a{color:var(--footer-text);text-decoration:underline}
.footer-nav{margin-bottom:6px}
.footer-nav a{color:var(--footer-text);text-decoration:underline;margin-right:8px}
.footer-credit{color:var(--footer-text);font-size:0.92rem;opacity:0.95}
@media (max-width:520px){
  .site-footer .footer-grid{flex-direction:column;align-items:flex-start}
  .footer-right{width:100%}
  .footer-nav{margin:8px 0}
}



/* Albums grid */
.album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--gap);margin-bottom:28px}
.album-card{background:var(--card-bg);border-radius:var(--radius);overflow:hidden;box-shadow:0 6px 18px rgba(12,12,12,.06);transition:transform .2s ease,box-shadow .2s ease}
.album-card a{color:inherit;text-decoration:none;display:block}
.album-card:hover{transform:translateY(-6px);box-shadow:0 8px 24px rgba(0,0,0,.12)}
.album-card .cover{height:160px;background:#ddd;display:block;position:relative;overflow:hidden}
.album-card .cover img{width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .35s ease,transform .4s ease;transform:scale(1.03)}
.album-card .cover img.loaded{opacity:1;transform:scale(1)}
.album-card .overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 38%, rgba(0,0,0,0.42));opacity:0;transition:opacity .18s ease;display:flex;align-items:flex-end;padding:12px}
.album-card:hover .overlay{opacity:1}
.album-card h3{margin:10px 12px 6px;font-size:1rem;color:var(--accent);font-weight:700}
.album-card .meta{font-size:0.85rem;color:var(--muted);padding:0 12px 14px}

.gallery-grid{display:grid;grid-template-columns:1fr;gap:var(--gap);align-items:start}
.album-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--album-col-width),1fr));gap:var(--gap)}
.gallery-item{display:block}
.gallery-item img{width:100%;height:auto;display:block;background: url('../img/placeholder.svg') center/cover no-repeat #eee;border-radius:6px;opacity:0;transition:opacity .32s ease, transform .32s ease}
.gallery-item img.loaded{opacity:1;transform:none}

/* Soften images slightly to reduce a 'crispy' look */
.gallery-item img,
.preview-thumb img,
.album-card .cover img{
  filter: contrast(0.96) saturate(0.98) blur(0.35px);
  transition: filter .25s ease, transform .32s ease, opacity .25s ease;
}

/* Remove softening on hover and in the lightbox so enlarged images remain sharp */
.album-preview:hover .preview-thumb img,
.album-card:hover .cover img,
.gallery-item img:hover{
  filter: none;
}

/* Clickable cue: pointer, subtle scale + shadow and overlay on hover */
.gallery-item{position:relative}
.gallery-item, .gallery-item img{cursor:pointer}
.gallery-item::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 40%, rgba(0,0,0,0.18));opacity:0;transition:opacity .18s ease;border-radius:6px;pointer-events:none}
.gallery-item:hover::after{opacity:1}
.gallery-item:hover img{transform:scale(1.03);box-shadow:0 12px 32px rgba(0,0,0,0.12)}

/* For album previews ensure pointer shows and hover effect is clear */
.album-preview{cursor:pointer}
.album-preview .preview-thumb img{transition:opacity .3s ease, transform .35s ease, box-shadow .18s ease}
.album-preview:hover .preview-thumb img{transform:scale(1.04);box-shadow:0 10px 28px rgba(12,12,12,.08)}

/* Hide image filenames (figcaptions) visually while preserving alt text for accessibility */
.gallery-item figcaption{display:none}

.lightbox-content img{filter:none}
.gallery-item figcaption{font-size:0.9rem;color:#555;padding:6px 0}

/* Lightbox */
.lightbox{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:linear-gradient(rgba(0,0,0,0.88), rgba(0,0,0,0.92));z-index:2000}
.lightbox.active{display:flex}
.lightbox-content img{max-width:92vw;max-height:86vh;border-radius:6px;box-shadow:0 12px 60px rgba(0,0,0,.7)}
.lightbox-close,.lightbox-prev,.lightbox-next{position:fixed;background:rgba(255,255,255,0.06);border:none;color:#fff;font-size:22px;padding:10px;border-radius:8px;cursor:pointer}
.lightbox-prev{left:14px;top:50%;transform:translateY(-50%)}
.lightbox-next{right:14px;top:50%;transform:translateY(-50%)}
.lightbox-close{right:14px;top:14px}

/* Lightbox counter (current/total) */
.lightbox-counter{position:fixed;top:18px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,0.45);color:#fff;padding:6px 10px;border-radius:6px;font-weight:600;z-index:2100}

/* Responsive columns for album previews: 1-4 columns */
@media (min-width: 520px){
  .album-card .cover{height:160px}
}
@media (min-width: 760px){
  .gallery-grid{grid-template-columns:repeat(3,1fr)}
  .album-card .cover{height:180px}
}
@media (min-width: 1100px){
  .album-card .cover{height:200px}
}

/* Scroll-to-top floating button */
.scroll-top{position:fixed;right:18px;bottom:18px;width:44px;height:44px;border-radius:50%;background:var(--accent);color:#fff;border:none;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px rgba(0,0,0,.18);cursor:pointer;opacity:0;transform:translateY(8px);transition:opacity .18s ease,transform .18s ease;z-index:2200}
.scroll-top.visible{opacity:1;transform:translateY(0)}
.scroll-top:focus{outline:2px solid rgba(255,255,255,0.18)}
.scroll-top svg{width:18px;height:18px;fill:currentColor}

/* Theme: dark overrides when data-theme="dark" is set on body */
body[data-theme="dark"]{
  --bg: #071018;
  --heading: #e6eef6;
  --muted: #9fb0c0;
  --accent: #3b60c4; /* dark-mode accent */
  --card-bg: #0b2a33;
  --button-bg: #c9462c; /* preserve button color */
  --footer-bg: #00060a; /* darker footer for dark mode */
  --footer-text: #dbeaf6;
  background: var(--bg);
  color: var(--heading);
}
body[data-theme="dark"] .site-header{
  background: rgba(6,10,12,0.6);
}
/* Services icons: make them white in dark mode for clarity */
body[data-theme="dark"] .service img{
  /* make raster icons appear white */
  filter: brightness(0) invert(1) saturate(0);
  background: transparent;
}
/* SVG icons use mask; set background to white so mask shows white */
body[data-theme="dark"] .service img[src$=".svg"]{
  background:#fff;
  -webkit-mask-image: url(attr(src url));
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  -webkit-mask-size:contain;
  mask-image: url(attr(src url));
  mask-repeat:no-repeat;
  mask-position:center;
  mask-size:contain;
}

/* Theme toggle button */
/* Theme toggle - match scroll-top button style and fix to top-right */
.theme-toggle{
  position:fixed;
  top:18px;
  right:18px;
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  border:none;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  cursor:pointer;
  z-index:2300;
  font-size:18px;
  transition:opacity .18s ease, transform .18s ease, filter .12s ease;
}
.theme-toggle:focus{outline:2px solid rgba(255,255,255,0.12)}
.theme-toggle:hover{filter:brightness(.96)}
body[data-theme="dark"] .theme-toggle{border-color:rgba(255,255,255,0.06)}

/* Smooth theme transitions for backgrounds, text and controls */
body,
.service,
.contact-card,
.preview-thumb,
.album-card,
.site-header,
.title-accent,
.theme-toggle,
.wrap{
  transition: background-color .36s ease, color .36s ease, box-shadow .28s ease, border-color .28s ease, transform .28s ease;
}

/* Toggle rotation helper */
.theme-toggle.rotating{ transform: rotate(180deg); }
/* Hide helper for when UI overlays (lightbox) are active */
.theme-toggle.hidden{ opacity:0; transform: scale(.86) translateY(-6px); pointer-events:none }

/* Accessibility and reduced motion */
@media (prefers-reduced-motion:reduce){
  *{transition:none!important}
}

/* Mobile portrait: center header and stack hero content */
@media (max-width:520px){
  .site-header .wrap{ flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:12px 16px; }
  .hero-inner{ flex-direction:column; gap:12px; align-items:center; }
  .hero-image{ margin-top:6px; }
  .title-accent{ padding-left:18px; padding-right:18px }
}

