/*
Theme Name: Creator Tech
Author: Antonino
Description: [GAMMA NOTTE] Tema one-page per creator di contenuti informatici, con Customizer completo: pannelli per ogni sezione (Home, Chi siamo, Attività, Contatti), footer a 3 colonne personalizzabili e colori configurabili. Palette chiara predefinita.
Version: 3.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: creator-tech
Tags: custom-menu, custom-colors, one-column, blog, portfolio
*/

:root {
  --ct-bg: #0f172a;
  --ct-surface: #1e293b;
  --ct-text: #e2e8f0;
  --ct-muted: #94a3b8;
  --ct-accent: #f97316;
  --ct-accent2: #fb923c;
  --ct-border: #334155;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ct-bg);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'160'%20height%3D'160'%20viewBox%3D'0%200%20160%20160'%3E%3Cg%20fill%3D'none'%20stroke%3D'%23263852'%20stroke-width%3D'1.4'%3E%3Cpath%20d%3D'M12%2012h44v32h32'%2F%3E%3Cpath%20d%3D'M136%2024v44h-32'%2F%3E%3Cpath%20d%3D'M24%20136h52v-28'%2F%3E%3Cpath%20d%3D'M148%20112h-38v28'%2F%3E%3Cpath%20d%3D'M64%2064h24v24'%2F%3E%3Cpath%20d%3D'M12%2076v32h28'%2F%3E%3C%2Fg%3E%3Cg%20fill%3D'%232f4566'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'88'%20cy%3D'44'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'136'%20cy%3D'24'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'104'%20cy%3D'68'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'24'%20cy%3D'136'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'76'%20cy%3D'108'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'148'%20cy%3D'112'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'110'%20cy%3D'140'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'88'%20cy%3D'88'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'40'%20cy%3D'108'%20r%3D'3'%2F%3E%3Crect%20x%3D'58'%20y%3D'58'%20width%3D'12'%20height%3D'12'%20rx%3D'2'%2F%3E%3Crect%20x%3D'118'%20y%3D'84'%20width%3D'8'%20height%3D'8'%20rx%3D'1'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 160px 160px;
  color: var(--ct-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }
a { color: var(--ct-accent); text-decoration: none; }
a:hover { color: var(--ct-accent2); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; margin-top: 0; }
code, pre { font-family: 'JetBrains Mono', 'Fira Code', Consolas, Menlo, monospace; background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 8px; }
pre { padding: 1rem; overflow-x: auto; }
code { padding: .15em .4em; color: var(--ct-accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--ct-border);
  padding: 1.1rem 0;
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ct-bg) 90%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-branding a { color: var(--ct-text); font-weight: 700; font-size: 1.25rem; }
.site-branding .site-tagline { display: block; font-size: .8rem; color: var(--ct-muted); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.main-nav a { color: var(--ct-text); font-size: .95rem; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--ct-accent); }

/* ---------- Bottoni ---------- */
.btn { display: inline-block; padding: .7rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.btn-primary { background: var(--ct-accent); color: #ffffff; }
.btn-primary:hover { background: var(--ct-accent2); color: #ffffff; }
.btn-outline { border: 1px solid var(--ct-accent); color: var(--ct-accent); }
.btn-outline:hover { border-color: var(--ct-accent2); }

/* ---------- Sezioni one-page ---------- */
.op-section { padding: 4.5rem 0; scroll-margin-top: 90px; }
.op-section-alt { background: var(--ct-surface); border-top: 1px solid var(--ct-border); border-bottom: 1px solid var(--ct-border); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .4rem; }
.section-title a { color: inherit; }
.section-title a:hover { color: var(--ct-accent); }
.section-has-bg { background-size: cover; background-position: center; position: relative; }
.section-has-bg::before { content: ''; position: absolute; inset: 0; background: rgba(15, 23, 42, .82); }
.section-has-bg > .container-narrow, .section-has-bg > .container { position: relative; z-index: 1; }
.section-has-bg .section-title, .section-has-bg .section-title a { color: #ffffff; }
.section-has-bg .section-sub { color: #cbd5e1; }
.section-sub { color: var(--ct-muted); font-size: 1.25rem; margin: 0 0 2rem; }
.more-link { display: inline-block; margin-top: 1.5rem; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4rem; scroll-margin-top: 90px; position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-track { display: flex; height: 100%; transition: transform 1s ease; }
.hero-slide { flex: 0 0 100%; height: 100%; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 23, 42, .85), rgba(15, 23, 42, .55)); }
.hero-has-bg h1 { color: #ffffff; }
.hero-has-bg .hero-sub { color: #cbd5e1; }
.hero-badge { font-family: 'JetBrains Mono', Consolas, monospace; color: var(--ct-accent); margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 1rem; max-width: 20ch; }
.hero-sub { color: var(--ct-muted); font-size: 1.35rem; max-width: 48ch; margin: 0 0 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Card griglia ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; padding-bottom: 4.5rem; }
.card { background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 12px; padding: 2rem 1.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.card h3 { margin-bottom: .6rem; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; display: block; }
.card p { color: var(--ct-muted); margin: 0; }

/* Chi siamo */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.stat-number { color: var(--ct-accent); font-size: 2rem; font-weight: 700; margin: 0; }
.stat-label { color: var(--ct-muted); margin: .2rem 0 0; }
.divider { border: none; border-top: 1px solid var(--ct-border); margin: 2.5rem 0; }

/* Attività — griglia: 3 colonne desktop, 2 tablet, 1 smartphone */
.activities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.activities + .more-link, .activities + .btn { margin-top: 1.8rem; }
@media (max-width: 1023px) { .activities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .activities { grid-template-columns: 1fr; } }
.activity-box { background: var(--ct-bg); border: 1px solid var(--ct-border); border-left: 4px solid var(--ct-accent); border-radius: 12px; padding: 2rem; margin-top: 1.5rem; }
.activities .activity-box { margin-top: 0; }
.op-section:not(.op-section-alt) .activity-box { background: var(--ct-surface); }
.activity-box:nth-of-type(even) { border-left-color: var(--ct-accent2); }
.activity-box h2 { font-size: 1.4rem; margin-bottom: .6rem; }
.activity-img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; display: block; }
.activity-box p { margin: 0; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.contact-grid .contact-form-box { grid-column: span 2; }
.contact-info h3 { margin: 1.4rem 0 .3rem; font-size: 1.1rem; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { margin: 0 0 .25rem; color: var(--ct-muted); }
.contact-label { color: var(--ct-text); font-weight: 600; }
.contact-form-box { background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 12px; padding: 2rem; }
.social-links { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .5rem; }
.social-links a { border: 1px solid var(--ct-border); background: var(--ct-surface); color: var(--ct-text); padding: .4rem 1rem; border-radius: 999px; font-size: .9rem; }
.social-links a:hover { border-color: var(--ct-accent); color: var(--ct-accent); }

.contact-map { margin-top: 2.5rem; border: 1px solid var(--ct-border); border-radius: 12px; overflow: hidden; }
.contact-map iframe { display: block; width: 100%; height: 320px; border: 0; }

/* Form (plugin) */
.contact-form-box input[type="text"], .contact-form-box input[type="email"], .contact-form-box textarea {
  width: 100%; background: var(--ct-bg); color: var(--ct-text); border: 1px solid var(--ct-border);
  border-radius: 8px; padding: .7rem; margin: .3rem 0 1rem; font: inherit;
}
.contact-form-box input[type="submit"], .contact-form-box button {
  background: var(--ct-accent); color: #ffffff; border: none; border-radius: 8px;
  padding: .7rem 1.5rem; font-weight: 600; cursor: pointer;
}

/* ---------- Pagine interne / blog ---------- */
.page-section { padding: 4rem 0; }
.post-list article { border-bottom: 1px solid var(--ct-border); padding: 2rem 0; }
.post-list h2 { margin-bottom: .3rem; }
.post-list h2 a { color: var(--ct-text); }
.post-list h2 a:hover { color: var(--ct-accent); }
.post-meta { color: var(--ct-muted); font-size: .9rem; }
.entry-content a { text-decoration: underline; }

/* Listino riparazioni */
.price-list { margin-top: 1.5rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 10px; padding: 1.1rem 1.4rem; margin-top: .8rem; }
.price-name { font-weight: 600; margin: 0; }
.price-desc { color: var(--ct-muted); font-size: .9rem; margin: .15rem 0 0; }
.price-tag { color: var(--ct-accent2); font-weight: 700; font-size: 1.15rem; margin: 0; white-space: nowrap; }
.price-list + .btn { margin-top: 1.8rem; }

/* Offerte del momento */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.offer-card { background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 12px; padding: 1.6rem; display: flex; flex-direction: column; align-items: flex-start; }
.offer-img { width: calc(100% + 3.2rem); margin: -1.6rem -1.6rem 1rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px 12px 0 0; display: block; }
.offer-img + .offer-badge { position: absolute; top: .9rem; left: .9rem; margin: 0; }
.offer-card { position: relative; }
.offer-badge { display: inline-block; background: var(--ct-accent); color: #ffffff; font-size: .75rem; font-weight: 700; letter-spacing: .03em; border-radius: 999px; padding: .25rem .75rem; margin-bottom: .9rem; }
.offer-card h3 { margin-bottom: .4rem; }
.offer-text { color: var(--ct-muted); font-size: .95rem; margin: 0; }
.offer-price { color: var(--ct-accent2); font-size: 1.6rem; font-weight: 700; margin: .8rem 0 1rem; }
.offer-card .btn { margin-top: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #020617; margin-top: 4rem; padding: 3rem 0 2rem; }
.footer-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.footer-col h4 { color: #ffffff; font-size: 1.05rem; margin-bottom: .8rem; }
.footer-col, .footer-col p { color: #cbd5e1; font-size: .95rem; }
.footer-col a { color: #fb923c; }
.footer-col a:hover { color: #ffffff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2.5rem; padding-top: 1.5rem; }
.footer-bottom p { margin: 0; color: #94a3b8; font-size: .9rem; }
.footer-right { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 1.2rem; }
.footer-legal a { color: #cbd5e1; font-size: .9rem; }
.footer-legal a:hover { color: var(--ct-accent); }
.site-footer .social-links a { background: transparent; border-color: rgba(255, 255, 255, .3); color: #e2e8f0; }
.site-footer .social-links a:hover { border-color: var(--ct-accent); color: var(--ct-accent); }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid .contact-form-box { grid-column: auto; }
  .hero { padding-top: 3.5rem; }
}
