:root {
    --color1: #02408C;
    --color2: #96ADD6;
    --color3: #EC6649;
}

/*** Reset ***/
*{box-sizing: border-box;}
html{ scroll-behavior: smooth; }
body{ margin:0; font-family: "Open Sans", sans-serif; padding-top:76px; }
img{max-width:100%;height:auto;}
a{text-decoration:none;color:inherit;}
h1,h2,h3,h4{ margin:0;}
figure{margin:0;}
input, textarea{font-size:inherit;font-family:inherit;}

/*** Grid ***/
.container{max-width:1125px;margin:0 auto;padding:0 15px; position:relative; z-index:1;}
.row{margin:0 -15px; display:flex; flex-wrap:wrap; align-items:stretch;}
.row:after{content:'.';clear:both;display:block;height:0;visibility:hidden;}
.col{padding:0 15px;min-height:1px;}
.col1{width:8.333%;}
.col2{width:16.666%;}
.col3{width:25%;}
.col4{width:33.333%;}
.col5{width:41.666%;}
.col6{width:50%;}
.col7{width:58.33%;}
.col8{width:66.666%;}
.col9{width:75%;}
.col10{width:83.333%;}
.col11{width:91.666%;}
.col12{width:100%;}


/* Header */
.main-header{ position:fixed; top:0; left:0; width:100%; z-index:99; background:var(--color1); box-shadow: 0 0 10px rgba(0,0,0,0.3);}
.main-header .header-row{ justify-content: space-between; align-items: center; }
.logo-row{display:flex;}
.logo-row img{display:block; height:76px;}
.main-menu{ text-align:right; margin-right:2em;}
.main-menu ul, .main-menu li{ list-style-type: none; padding:0; margin:0; }
.main-menu li{ display:inline-block; margin-left:2em; }
.main-menu li a{ font-size:1.25em; color:var(--color2); transition: 0.2s;}
.main-menu li a:hover{ text-decoration: underline; color:#FFF;}
.main-menu li a.active-menu{ color:#FFF;}

/* HOME */
.home-intro{ position:relative; height:calc(100vh - 76px); background:url('../img/intro_background.png') no-repeat right bottom; background-size:auto 100%;}
.home-intro header{ position:absolute; width:45%; top:50%; left:0; transform: translateY(-50%); margin-left:76px; display:flex; flex-wrap: wrap;}
.home-intro header img{ width:100%; margin-top:1vh; }
.home-intro header .intro-image{ width:40%;}
.home-intro header .intro-text{padding-left:2em;  width:60%; color:var(--color1);}
.home-intro header h2{ font-size:5vh; line-height: 1.2em;}
.home-intro header p{ font-size:1.2em; line-height: 1.5em; margin:1.25em 0;}
.intro-pic{ text-align: right;}

.button1{ background:var(--color1); color:#FFF; display:inline-block; border-radius:1.5em; padding:0.5em 1em; font-size:1.25em; border:1px solid var(--color1); transition:0.2s; }
.button1:hover{ opacity:0.8; }

.about-top{ display:flex; flex-wrap: wrap;}
.about-top-left{ width:20%; }
.about-top-right{ width:80%; }
.about-top-left .about-square{ width:100%;}
.about-square{ position:relative; width:20%; height:20vw; }
.about-square img{ width:100%; display:block; height:100%; object-fit:cover; }
.about-top-right h2{ background:var(--color2); color:var(--color1); padding:1.5em; font-size:2em; text-align:right; }
.about-top-right p{ color:var(--color1); line-height: 1.5em; width:75%; padding:4em 4em 0 4em; font-size: 1.45em; }
.about-bottom{ display: flex; flex-wrap: wrap;}
.about-anchor{ position:absolute; margin-top:-76px;}

.home-gen{ display:flex; flex-wrap: wrap; align-items: stretch; background-color: var(--color2); color:var(--color1); }
.home-gen-left{ width:30%;}
.home-gen img{width: 100%; height:100%; object-fit: cover; }
.home-gen-right{ width:70%; padding:4em;}
.home-gen-header-wrapper{ display:flex; flex-wrap: wrap; justify-content: space-between; align-items: center; width:95%;}
.home-gen-right header{}
.home-gen-right header h2{ font-size:3em; }

.home-gen-points{ display:flex; flex-wrap: wrap; margin-top:4em;} 
.home-gen-point{ width:50%; padding:0 5em 0 0; margin-bottom:4em; }
.home-gen-point h3{ font-size:2em; }
.home-gen-point h3 span{ margin-right:0.5em;}
.home-gen-point p{  }
.home-gen-point a{ text-decoration: underline; font-weight: bold;}

.home-el{ min-height: 100vh; position:relative; }
.home-el-wrap{ position:absolute; top:50%; left:12.5%; width:75%; transform:translateY(-50%); text-align:center;}
.home-el h2{ font-size:2.5em; color:var(--color1); margin-bottom:2em; font-weight: 400;}
.home-el h3{ font-size:2.5em; color:var(--color1); margin-top:2em; font-weight: 400;}
.home-el a{  margin-top:2em; }
.home-el-pics{ display:flex; justify-content: space-between;}
.home-el-pics img{ display:inline-block; width:12%; }

.home-lib{ display:flex; flex-wrap: wrap; border-top:7em solid #EC6649; }
.lib-left{ width:60%; padding:3em 3em 0 3em; }
.lib-left img{ width:100%; height:100%; object-fit: cover; } 
.lib-right{ width:40%; }
.lib-right h2{font-size:2.5em; color:var(--color1); margin:1.25em 0 1em 0; }
.lib-right p{ width:55%; color:var(--color1); font-size:1.15em; line-height: 1.5em; }
.lib-right p span{ display:block; margin:4em 0 1em 0; font-weight: bold;}

.contacts-anchor{ position:absolute; margin-top:-76px; }
.home-contacts{ background-color:var(--color1); color:#fff; padding:6em 12.5%; text-align:center; }
.home-contacts header h2{ font-size:2.5em; margin-bottom:0.6em; font-weight:700; }
.home-contacts header p{ font-size:1.15em; opacity:0.85; margin-bottom:2.5em; line-height:1.6; }
.home-contacts-details{ display:flex; justify-content:center; gap:3em; flex-wrap:wrap; margin-top:1em; }
.home-contacts-item{ display:flex; align-items:center; gap:0.6em; font-size:1.05em; }
.home-contacts-item i{ font-size:1.2em; opacity:0.7; }
.home-contacts-item a{ color:#fff; text-decoration:underline; }

.home-news{ background-color: #F9B8B0; padding:6em 4em; }
.home-news-container{ width:80%; margin:0 auto; }
.home-article{ background:#FFF; }
.home-article header{ padding:1em 2em; color:var(--color1); }
.home-article header h3{ font-size:1.75em; }
.home-article a.button1{ font-size:1em; margin-top:0.5em; }
.home-article figure{ position:relative; padding-top:100%; }
.home-article figure img{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit: cover;}

.main-footer{ background:#FFF; padding:3em 3em; margin-top:3em; }
.footer-container{  width:80%; margin:0 auto; }
.footer-top{ color:var(--color1); margin-bottom:5em; }

.footer-logos{ display:flex; justify-content: space-between; align-items:end }
.footer-logos img{ height:32px; margin:0 1em 0 0;}
.footer-logos h4{ color:var(--color1); font-size:1em; margin-bottom:1em; }

.page-section{ padding:3em 0;}
.page-section > header{ color:var(--color1); text-align: center ; margin-bottom:60px; }
.page-section > header h2{ font-size:2.5em;}
.page-section > header p{ font-size:1.25em; }

.game-item{ color:var(--color1); box-shadow:0 0 5px rgba(0,0,0,0.3); margin-bottom:30px;  }
.game-item figure{ position:relative; padding-top:100%; }
.game-item figure img{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; }
.game-item header{ padding:1em; }
.game-item header h3{font-size:1.75em; }
.game-item header p{}
.game-item header a.button1{ font-size:1em; background-color: var(--color3); border:none; }

.article-section .finish-buttons{ text-align: left; margin:2em 0; }
.article-section .finish-buttons .finish-button{ margin:0 1em 0 0; }

.article-section{ padding:3em 0;}
.article-section > header{ color:var(--color1); margin-bottom:60px; }
.article-section > header h2{ font-size:2.5em;}
.article-section > header h4{ color:var(--color3); font-size:1.5em; }
.article-section > header p{ font-size:1.25em; }


/*** Medium ***/
@media screen and (max-width:768px){

	/*** M Grid ***/
	.m-col1{width:8.333%;}
	.m-col2{width:16.666%;}
	.m-col3{width:25%;}
	.m-col4{width:33.333%;}
	.m-col5{width:41.666%;}
	.m-col6{width:50%;}
	.m-col7{width:58.333%;}
	.m-col8{width:66.666%;}
	.m-col9{width:75%;}
	.m-col10{width:83.333%;}
	.m-col11{width:91.666%;}
	.m-col12{width:100%;}

}

/*** Small ***/
@media screen and (max-width:480px){

	/*** S Grid ***/
	.s-col1{width:8.333%;}
	.s-col2{width:16.666%;}
	.s-col3{width:25%;}
	.s-col4{width:33.333%;}
	.s-col5{width:41.666%;}
	.s-col6{width:50%;}
	.s-col7{width:58.33%;}
	.s-col8{width:66.666%;}
	.s-col9{width:75%;}
	.s-col10{width:83.333%;}
	.s-col11{width:91.666%;}
	.s-col12{width:100%;}

}


/* Generator Styles */
.generator-container {
    margin:0;
    padding:1.5em;
    background-color: #FFF;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.steps-indicator .step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background:#CCC;
    border-radius: 5px;
    opacity: 0.7;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.steps-indicator .step.active {
    background: var(--color3);
    color: white;
    opacity: 1;
}

.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
    padding-top:1em;
}

.step-content h2{
    color:var(--color1);
    margin-bottom:1em;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    /*margin-bottom: 1em;*/
}

.form-group label {
    display: block;
    margin-bottom: 0.25em;
    /*font-weight: 700;*/
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding:0.5em 1em;
    border: 2px solid #E4E4E4;
    border-radius: 6px;
    font-size:1em;
    transition: border-color 0.3s ease;
    margin-bottom:1.5em;
    background:#f2f2f2;
}

.form-group select {
    cursor: pointer;
    appearance: auto;
}

/* Two fields side by side on one row */
.form-row {
    display: flex;
    gap: 1.5em;
    align-items: flex-start;
}
.form-row .form-group {
    flex: 1;
}
/* Narrow slot (e.g. language select) */
.form-row .form-group--narrow {
    flex: 0 0 160px;
}
/* Align checkbox row to center vertically */
.form-row--baseline {
    align-items: center;
}
.form-group--checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1.5em;
}
.form-group--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    white-space: nowrap;
}
.form-group--checkbox input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
}

/* Hint text next to label */
.label-hint {
    font-size: 0.8em;
    color: #888;
    margin-left: 0.4em;
    font-weight: normal;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-navigation {
    /*display: flex;
    justify-content: space-between;*/
    margin-top: 0;
    position:relative;
    min-height:2em;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn{
    padding:0.5em 1em; 
    border:none;
    background: var(--color1);
    color:#FFF;
    border-radius:6px;
    cursor: pointer;
    font-size:1.1em;
}

/*.btn-secondary:hover {
    background-color: #5a6268;
}*/

.form-navigation button:nth-child(2), .form-navigation button:nth-child(3){
    position:absolute;
    right:0;
    top:0;
}

.questions-list {
  
}

h2.questions-title{
    background:var(--color3);
    color:#FFF;
    padding:0.5em 0.5em;
    color:#FFF;
}

.questions-list label{
    color:var(--color1);
    margin-bottom:0.5em;
    font-weight: 700;
    font-size:1.2em;
}

.question-item{
    width:100%;
    padding:1em; 
    border:1px solid #CCC;
    margin-bottom:2%;
    background-color: #f2f2f2;
}

.question-item input, .question-item textarea{
    background:#FFF !important;
}

.question-item .form-group input{
    margin-bottom:0;
}

.answer-group input[type="text"]{
    padding:0.25em 0.5em; 
    border-radius:6px;
    margin-bottom:0.5em;
    border:1px solid #CCC;
    width:500px;
}

#generator-finish{
    display:none;
    padding:4em 0 4em 0;
    min-height: 75vh;
}

#generator-finish h2{
    text-align: center;
    color:var(--color1);
    margin-bottom:2em;
    font-size:2.5em;
}

.finish-buttons{
    text-align:center;
}

.finish-buttons h4{
    font-weight: 400;
    font-size:1.25em;
    margin-bottom:1em;
}

.finish-button{
    display:inline-block;
    background-color: var(--color1);
    color:#FFF;
    padding:0.5em 1em;
    cursor: pointer;
    border-radius:6px;
    font-size:1.25em;
    margin:0 1em;
}


#content-edit{
    
}

#ai-loader{
    position:absolute;
    width:100%;
    padding:3em;
    z-index:99;
    background:#FFF;
    text-align:center;
    font-size:2em;
    display: none;
}

#ai-loader div:first-child{
    animation:loading_anim 2s infinite;
}

#ai-loader div:last-child{
    font-size:0.6em; 
    color:#666;
}

@keyframes loading_anim {
    0%{opacity:1;}
    50%{opacity:0;}
    100%{opacity:1;}
}

/* --- Step 2: board sections layout --- */
.board-sections-wrapper {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.board-section {
    border: 2px solid #E4E4E4;
    border-radius: 10px;
    padding: 1.5em 1.75em;
    transition: border-color 0.2s;
    flex: 1;
}

.board-section--active {
    border-color: var(--color1);
}

.board-section-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color1);
    margin-bottom: 1em;
}

.board-section-intro {
    color: #555;
    margin: 0 0 1.25em;
    font-size: 0.95em;
}

.board-sections-divider {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 0 1.25em;
    color: #aaa;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
}

.board-sections-divider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #E4E4E4;
}

.board-sections-divider span {
    position: relative;
    background: #fff;
    padding: 0.5em 0;
}

/* --- Board fullscreen overlay --- */
#board-fullscreen {
    display: none;
    position: fixed;
    top: 76px; /* header height */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    overflow-y: auto;
}

.board-fullscreen-bar {
    position: sticky;
    top: 0;
    z-index: 41;
    background: #fff;
    border-bottom: 1px solid #E4E4E4;
    padding: 0.75em 1.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}

.board-fullscreen-back {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95em;
    color: var(--color1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.4em 0;
}

.board-fullscreen-back:hover { text-decoration: underline; }

.board-fullscreen-title {
    font-weight: 700;
    color: var(--color1);
    flex: 1;
    text-align: center;
    font-size: 1em;
}

.board-fullscreen-close {
    background: none;
    border: none;
    font-size: 1.3em;
    color: #666;
    cursor: pointer;
    padding: 0.2em 0.4em;
    line-height: 1;
    border-radius: 4px;
}

.board-fullscreen-close:hover { color: var(--color3); }

/* Template selection grid --- */
.templates-intro {
    color: #555;
    margin-bottom: 1.5em;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
    margin-bottom: 1.25em;
}

.template-card {
    border: 2px solid #E4E4E4;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.template-card:hover {
    border-color: var(--color2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.template-card.selected {
    border-color: var(--color1);
    box-shadow: 0 0 0 3px rgba(2, 64, 140, 0.15);
}

.template-thumb {
    aspect-ratio: 4/3;
    background: #f2f2f2;
    overflow: hidden;
    margin: 0;
}

.template-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8edf5, #c8d4e8);
}

.template-info {
    padding: 0.85em 1em;
}

.template-info h3 {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--color1);
    margin-bottom: 0.2em;
}

.template-subtitle {
    font-size: 0.8em;
    color: #666;
    margin: 0 0 0.6em;
}

.template-counts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 0.8em;
    font-size: 0.75em;
    color: #444;
}

.template-counts span {
    color: #888;
}

/* Empty state */
.templates-empty {
    padding: 2em;
    text-align: center;
    color: #888;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 1.5em;
}

/* Footer with customize button */
.templates-footer {
    border-top: 1px solid #eee;
    padding-top: 1.25em;
    margin-top: 0.5em;
}

/* Custom board panel header */
.custom-board-header {
    margin-bottom: 1em;
}

.btn-text-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color1);
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.btn-text-link:hover {
    color: var(--color3);
}

/* --- Language rules overlay: show only active language --- */
html[lang="en"] #ptRules { display: none; }
html[lang="pt"] #enRules { display: none; }

/* --- Language switcher --- */
.lang-switcher a {
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.7;
}
.lang-switcher a:hover {
    opacity: 1;
}
