/* Premio Innovation Island - front-end candidature
   Stesso linguaggio visivo del login di PlatForm (gradient, Host Grotesk, forme tonde). Caricato dopo styles.css. */

:root {
	--iif-gradient: linear-gradient(135deg, #FFD580 0%, #FF9A3C 35%, #FF5C3A 70%, #E8325A 100%);
	--iif-primary: #E8325A;
	--iif-primary-dark: #C9234A;
	--iif-orange: #FF8F45;
	--iif-ink: #2B2B3A;
	--iif-muted: #6b6b7b;
	--iif-line: #e6e3e1;
	--iif-btn: linear-gradient(135deg, #FF9A3C 0%, #FF5C3A 55%, #E8325A 100%);
}

body.iif-fe {
	font-family: 'Host Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-weight: 400;
	color: #fff;
	background: var(--iif-gradient) fixed;
	position: relative;
	overflow-x: hidden;
}
body.iif-fe main { flex: 1 0 auto; padding-bottom: 3rem; }

/* Forme decorative */
.iif-fe .deco { position: absolute; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); pointer-events: none; animation: iif-rotate 18s linear infinite; z-index: 0; }
.iif-fe .d1 { width: 80px; height: 80px; top: 5%; right: 8%; --r: 20deg; }
.iif-fe .d2 { width: 55px; height: 55px; top: 14%; right: 16%; --r: -10deg; }
.iif-fe .d3 { width: 100px; height: 100px; top: 2%; right: 22%; --r: 5deg; }
.iif-fe .d4 { width: 65px; height: 65px; top: 22%; right: 5%; --r: 30deg; }
.iif-fe .d5 { width: 50px; height: 50px; top: 45%; left: 3%; --r: -15deg; opacity: .4; }
@keyframes iif-rotate { from { transform: rotate(var(--r, 0deg)); } to { transform: rotate(calc(var(--r, 0deg) + 360deg)); } }
.iif-fe header, .iif-fe main, .iif-fe footer { position: relative; z-index: 1; }

/* Header */
.iif-fe .navbar { background: transparent; padding: 32px 0 20px; text-transform: none; }
.iif-fe .navbar-brand img { height: 64px; width: auto; }
.iif-fe .navbar .nav-link { color: #fff !important; font-weight: 600; letter-spacing: .02em; }
.iif-fe .navbar .nav-link:hover { text-decoration: underline; }
.iif-fe .navbar .nav-link-cta { background: #fff; color: var(--iif-primary) !important; border-radius: 50px; padding: .55rem 1.5rem; font-weight: 700; box-shadow: 0 8px 20px rgba(120,30,40,.2); margin-right: .5rem; }
.iif-fe .navbar .nav-link-cta:hover { text-decoration: none; }
@media (max-width: 991px) { .iif-fe .navbar-collapse { margin-top: 1rem; } .iif-fe .navbar .nav-link-cta { display: inline-block; margin: .5rem 0; } }

/* Testi di apertura */
.iif-kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: rgba(255,255,255,.22); border-radius: 50px; padding: .35rem .9rem; margin-bottom: 1.2rem; }
.iif-hero { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.iif-hero-light { font-weight: 300; font-style: italic; }
.iif-fe main p { font-size: 1.05rem; line-height: 1.6; }

/* Pulsanti */
.iif-fe .btn-regolamento { background: #fff; color: var(--iif-primary); text-transform: none; border-radius: 50px; font-weight: 700; height: 44px; line-height: 44px; font-size: .95rem; padding: 0 26px; margin-right: 8px; border: 0; box-shadow: 0 8px 20px rgba(120,30,40,.2); }
.iif-fe .btn-regolamento:hover, .iif-fe .btn-regolamento:focus, .iif-fe .btn-regolamento:active { background: #fff !important; color: var(--iif-primary-dark); }
.iif-fe .btn-regolamento-alt { background: rgba(255,255,255,.18) !important; color: #fff !important; box-shadow: none; border: 1.5px solid rgba(255,255,255,.7); line-height: 41px; }
.iif-fe .btn-regolamento-alt:hover { background: rgba(255,255,255,.3) !important; }

/* Card */
.iif-fe .card { border: 0; border-radius: 24px; background: #fff; box-shadow: 0 24px 60px rgba(120,30,40,.28); color: var(--iif-ink); }
.iif-fe .card .card-title { color: var(--iif-ink); font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.iif-fe .card .card-title span { color: var(--iif-primary); }
.iif-fe .card .card-text { color: var(--iif-ink); }
.iif-fe #loginForm .card-body { padding-left: 2.2rem; padding-right: 2.2rem; }

/* Campi */
.iif-fe input[type="text"].form-control, .iif-fe input[type="email"].form-control, .iif-fe select.form-control, .iif-fe textarea.form-control {
	height: 50px; border-radius: 50px; background: #fff; border: 1.5px solid var(--iif-line); color: var(--iif-ink); padding-left: 22px; padding-right: 22px; font-family: inherit; font-size: 15px;
}
.iif-fe textarea.form-control { height: auto; border-radius: 18px; padding-top: 12px; }
.iif-fe .form-control:focus { border-color: var(--iif-primary); box-shadow: 0 0 0 3px rgba(232,50,90,.15); background: #fff; }
.iif-fe .form-control::placeholder { color: #9a9aa8; }
.iif-fe #contributoForm input[type="text"].form-control:not(:placeholder-shown), .iif-fe input[type="email"].form-control:not(:placeholder-shown) { background: #faf8f7; }
.iif-fe .select2-selection { border: 1.5px solid var(--iif-line) !important; border-radius: 50px !important; padding-left: 22px !important; }
.iif-fe input[type="checkbox"], .iif-fe input[type="radio"] { accent-color: var(--iif-primary); }
.iif-fe #loginForm .checkbox-cont { color: var(--iif-ink); }
.iif-fe #loginForm .checkbox-cont a, .iif-fe .card a:not(.btn) { color: var(--iif-primary); text-decoration: underline; }
.iif-fe .iif-link { color: var(--iif-primary) !important; font-weight: 600; text-decoration: none; }

/* Pulsanti nelle card */
.iif-fe .card .btn, .iif-fe .submit-cont .btn, .iif-fe .btn-altra-candidatura, .iif-fe .btn-azioni-candidature, .iif-fe .file-label {
	background: var(--iif-btn) !important; color: #fff !important; border: 0; text-transform: none; font-weight: 700; box-shadow: 0 8px 20px rgba(232,50,90,.3); letter-spacing: 0;
}
.iif-fe .card .btn:hover, .iif-fe .submit-cont .btn:hover, .iif-fe .btn-altra-candidatura:hover, .iif-fe .btn-azioni-candidature:hover { opacity: .93; }
.iif-fe .card .btn:disabled { opacity: .5; box-shadow: none; }
.iif-fe .btn-azioni-candidature.elimina { background: #dc3545 !important; box-shadow: none; }
.iif-fe .btn-azioni-candidature.visualizza { background: var(--iif-ink) !important; box-shadow: none; }
.iif-fe .submit-cont .btn { border-radius: 50px; }
.iif-fe .aggiungi-iscritto-corso, .iif-fe .elimina-iscritto-corso { border: 1.5px solid var(--iif-line); }
.iif-closed .card-text a { color: var(--iif-primary); font-weight: 600; }

/* Titoli di sezione e tabelle (pagine interne) */
.iif-fe .module_title { color: #fff; }
.iif-fe .module_title:after { background-color: rgba(255,255,255,.7); }
.iif-fe .bg-white .module_title { color: #000; }
.iif-fe .bg-white .module_title:after { background-color: rgba(0,0,0,.7); }
.iif-fe .card .module_title, .iif-fe .card .tabella-richieste thead th { color: var(--iif-primary) !important; }
.iif-fe .tabella-richieste thead th { border-bottom: 2px solid var(--iif-primary) !important; }
.iif-fe .tabella-richieste thead th:not(:last-child), .iif-fe .tabella-richieste tbody td:not(:last-child) { border-right: 1px solid var(--iif-line) !important; }

/* Footer */
.iif-fe footer { background: var(--iif-ink); color: #fff; padding: 56px 0 48px; margin-top: 2rem; }
.iif-fe footer a { color: #fff; font-weight: 600; }
.iif-fe footer a:hover { text-decoration: underline; }
.iif-fe .footer-logo { height: 72px; width: auto; }
.iif-fe .footer-claim { font-size: .9rem; font-weight: 500; letter-spacing: .03em; opacity: .85; }
.iif-fe .footer-sep { border-top: 1px solid rgba(255,255,255,.15); margin: 1.5rem 0 0; }
.iif-fe .footer-hours { opacity: .8; font-size: .95rem; }
.iif-fe .social-icon { border-color: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.iif-fe .social-icon:hover { background: var(--iif-primary); border-color: var(--iif-primary); }
.iif-fe .footer .btn { background: transparent !important; border: 1.5px solid #fff !important; box-shadow: none; text-transform: none; height: 44px; line-height: 40px; font-weight: 600; border-radius: 44px; color: #fff; padding: 0 24px; }
.iif-fe .footer .btn:hover { background: #fff !important; color: var(--iif-primary) !important; }

#loader { background: rgba(255,255,255,.6); z-index: 2000; }
#loader .lds-double-ring div { border-color: var(--iif-primary) transparent var(--iif-primary) transparent; }
#loader .lds-double-ring div:nth-child(2) { border-color: transparent var(--iif-orange) transparent var(--iif-orange); }

@media (prefers-reduced-motion: reduce) { .iif-fe .deco { animation: none; } .fade-in-element { transition: none; } }

@media (max-width: 1199px) {
	.iif-fe #loginForm .card-body { padding-left: 1.2rem; padding-right: 1.2rem; }
	.iif-fe #loginForm .card-title { font-size: 1.05rem; white-space: nowrap; }
}

/* Pagine interne: il contenuto sta in un pannello bianco sopra lo sfondo gradient */
.iif-fe .bg-white.text-dark { background: transparent !important; padding: 0 0 1rem !important; }
.iif-fe .bg-white.text-dark > main.container { background: #fff; color: var(--iif-ink); border-radius: 24px; box-shadow: 0 24px 60px rgba(120,30,40,.28); padding: 2.5rem; margin-bottom: 1rem; }
.iif-fe .bg-white.text-dark h2 { color: var(--iif-ink) !important; font-weight: 800 !important; letter-spacing: -.01em; }
.iif-fe .bg-white.text-dark .table { color: var(--iif-ink); }
.iif-fe .bg-white.text-dark .control-label { color: var(--iif-ink); }
.iif-fe .bg-white.text-dark a:not(.btn) { color: #000; text-decoration: underline; }
@media (max-width: 767px) { .iif-fe .bg-white.text-dark > main.container { padding: 1.5rem 1.2rem; border-radius: 18px; } }
.iif-fe .bg-white.text-dark .tabella-richieste thead th { color: #000 !important; border-bottom-color: var(--iif-primary) !important; }
.iif-fe .social-icon.orange { border-color: #fff; }
.iif-fe .social-icon.orange path { fill: #fff; }

/* Pagina regolamento */
.iif-fe .iif-reg { scroll-behavior: smooth; }
.iif-reg section { scroll-margin-top: 24px; }
.iif-reg-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--iif-line); }
.iif-kicker-dark { background: rgba(232,50,90,.1); color: var(--iif-primary); }
.iif-reg-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--iif-ink); margin: 0 0 .6rem; }
.iif-reg-title .iif-hero-light { display: block; color: var(--iif-primary); }
.iif-reg-bozza { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--iif-muted); background: #faf8f7; border: 1px solid var(--iif-line); border-radius: 50px; padding: .25rem .9rem; margin: 0 0 1.2rem; }
.iif-reg-actions .btn { margin: 0 .5rem .5rem 0; }
.iif-fe .iif-btn-line { background: #fff !important; color: var(--iif-primary) !important; border: 1.5px solid var(--iif-primary) !important; border-radius: 50px; font-weight: 700; padding: .5rem 1.4rem; box-shadow: none !important; text-decoration: none !important; }
.iif-fe .iif-btn-line:hover { background: var(--iif-primary) !important; color: #fff !important; }

.iif-reg-toc { position: sticky; top: 20px; background: #faf8f7; border: 1px solid var(--iif-line); border-radius: 18px; padding: 1.2rem 1.2rem 1rem; }
.iif-reg-toc-title { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--iif-primary); margin-bottom: .6rem; }
.iif-reg-toc ol { list-style: none; margin: 0; padding: 0; }
.iif-reg-toc li { margin: 0; }
.iif-fe .bg-white.text-dark .iif-reg-toc a:not(.btn) { display: block; color: var(--iif-ink); text-decoration: none; font-size: .88rem; font-weight: 500; padding: .32rem .6rem; border-radius: 10px; line-height: 1.3; }
.iif-fe .bg-white.text-dark .iif-reg-toc a:not(.btn):hover { background: #fff; color: var(--iif-primary); }
@media (max-width: 991px) { .iif-reg-toc { position: static; } }

.iif-reg-body { color: var(--iif-ink); }
.iif-fe .iif-reg-body p, .iif-fe .iif-reg-body li { font-size: 1rem; line-height: 1.65; color: var(--iif-ink); }
.iif-reg-lead { font-size: 1.15rem !important; font-weight: 500; padding-left: 1.1rem; border-left: 4px solid var(--iif-primary); margin-bottom: 2rem; }
.iif-reg-body section { margin-bottom: 2.6rem; }
.iif-fe .bg-white.text-dark .iif-reg-body h2 { font-size: 1.55rem; font-weight: 800 !important; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 3px solid transparent; border-image: var(--iif-gradient) 1; }
.iif-reg-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--iif-primary); margin: 1.6rem 0 .6rem; }
.iif-reg-body h4 { font-size: 1rem; font-weight: 800; color: var(--iif-ink); margin: 0 0 .35rem; }
.iif-reg-body ul { padding-left: 1.3rem; }
.iif-reg-body ul li::marker { color: var(--iif-orange); }
.iif-reg-body ol.iif-steps > li::marker { color: var(--iif-primary); font-weight: 700; }
.iif-fe .bg-white.text-dark .iif-reg-body a:not(.btn) { color: var(--iif-primary); text-decoration: underline; }
.iif-todo { background: #fff3cd; color: #7a5b00; border-radius: 6px; padding: 0 .4rem; font-weight: 600; }

.iif-reg-table { border-collapse: separate; border-spacing: 0; margin: 1rem 0; font-size: .93rem; }
.iif-reg-table thead th { background: var(--iif-ink); color: #fff !important; border: 0 !important; font-weight: 700; padding: .75rem .9rem; }
.iif-reg-table thead th:first-child { border-radius: 14px 0 0 0; }
.iif-reg-table thead th:last-child { border-radius: 0 14px 0 0; }
.iif-reg-table td { padding: .75rem .9rem; vertical-align: top; border: 0 !important; border-bottom: 1px solid var(--iif-line) !important; }
.iif-reg-table tbody tr:nth-child(even) td { background: #faf8f7; }
.iif-reg-table .iif-val { font-weight: 800; color: var(--iif-primary); white-space: nowrap; }
@media (max-width: 767px) {
	.iif-reg-table thead { display: none; }
	.iif-reg-table, .iif-reg-table tbody, .iif-reg-table tr, .iif-reg-table td { display: block; width: 100%; }
	.iif-reg-table tr { border: 1px solid var(--iif-line); border-radius: 14px; margin-bottom: .8rem; overflow: hidden; }
	.iif-reg-table td { border-bottom: 1px solid var(--iif-line) !important; }
	.iif-reg-table td:last-child { border-bottom: 0 !important; }
	.iif-reg-table td::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--iif-muted); margin-bottom: .1rem; }
}

.iif-ambiti { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin: 1.2rem 0; }
.iif-ambito { border: 1px solid var(--iif-line); border-top: 4px solid var(--iif-orange); border-radius: 14px; padding: 1rem 1.1rem; background: #fff; }
.iif-ambito:nth-child(3n+2) { border-top-color: var(--iif-primary); }
.iif-ambito:nth-child(3n) { border-top-color: #FF5C3A; }
.iif-fe .iif-ambito p { font-size: .92rem; margin: 0; line-height: 1.5; }
@media (max-width: 767px) { .iif-ambiti { grid-template-columns: 1fr; } }

.iif-reg-cta { text-align: center; padding: 1.5rem 0 0; border-top: 1px solid var(--iif-line); }
.iif-fe .bg-white.text-dark .iif-reg-cta .btn { background: var(--iif-btn) !important; color: #fff !important; border-radius: 50px; font-weight: 700; padding: .7rem 2rem; box-shadow: 0 8px 20px rgba(232,50,90,.3); text-decoration: none; }

@media print {
	body.iif-fe { background: #fff !important; color: #000; }
	.iif-fe .deco, .iif-fe header, .iif-fe footer, .iif-reg-toc, .iif-reg-actions, .iif-reg-cta { display: none !important; }
	.iif-fe .bg-white.text-dark > main.container { box-shadow: none; padding: 0; }
	.iif-reg-body section { page-break-inside: avoid; }
	.iif-reg-table thead th { background: #eee !important; color: #000 !important; }
}
html { scroll-behavior: smooth; }

/* Indice regolamento compatto: una riga per voce, sempre tutto visibile */
.iif-reg-toc { padding: .8rem .6rem; max-height: calc(100vh - 40px); overflow-y: auto; }
.iif-reg-toc-title { margin: 0 0 .3rem .6rem; }
.iif-fe .bg-white.text-dark .iif-reg-toc a:not(.btn) { padding: .22rem .6rem; font-size: .8rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iif-reg-toc a b { color: var(--iif-primary); font-weight: 800; }
