/* =====================================================
RESET
===================================================== */

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html, body {
height: 100%;
}

body {
font-family: Arial, "Segoe UI";
background: #f4f6f8;
color: #1f2937;
display: flex;
flex-direction: column;
}

.main-content { flex: 1; }

.container {
width: 92%;
max-width: 1200px;
margin: 0 auto;
}


/* =====================================================
HEADER (DESKTOP)
===================================================== */

.main-header {
background: #229ED9;
padding: 16px 0;
}

.header-flex {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 12px;
}

.logo a {
font-size: 22px;
font-weight: bold;
color: #fff;
text-decoration: none;
}

.search-box {
position: relative;
width: 350px;
margin-left: auto;
}

.search-box input {
width: 100%;
padding: 10px 15px 10px 45px;
border-radius: 8px;
border: none;
outline: none;
font-size: 14px;
background: #ffffff;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* LUPA */
.search-box::before {
content: "";
position: absolute;
left: 16px;
top: 50%;
transform: translateY(-50%);
width: 18px;
height: 18px;
background-image: url("data:image/svg+xml;utf8,<svg fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
background-repeat: no-repeat;
background-size: contain;
pointer-events: none;
}

.header-actions {
display: flex;
gap: 12px;
}

.btn-primary {
background: #fff;
color: #229ED9;
padding: 10px 15px 10px 15px;
border-radius: 8px;
font-weight: bold;
text-decoration: none;
transition: 0.2s ease;
}

.btn-primary:hover {
background: #f0f0f0;
}


/* =====================================================
HOME (DESKTOP)
===================================================== */

.home-section { padding: 30px 0; }

.home-section h1 {
font-size: 24px;
margin-bottom: 35px;
text-align: center;
color: #229ED9;
}

.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 15px;
}

@media (max-width: 1200px) {
.grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
.grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
.grid { grid-template-columns: 1fr; }
}

.card {
background: #ffffff;
border-radius: 16px;
padding: 30px 25px;
text-align: center;
box-shadow: 0 8px 20px rgba(34,158,217,0.08);
transition: all 0.3s ease;
border: 1px solid rgba(34,158,217,0.08);
}

.card:hover {
transform: translateY(-6px);
box-shadow: 0 15px 30px rgba(34,158,217,0.15);
}

.card-img img {
width: 130px;
height: 130px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 18px;
}

.card-body a {
text-decoration: none;
}

.card-body h3 {
margin-bottom: 14px;
}

.card-body h3 a {
font-size: 18px;
font-weight: 600;
margin-bottom: 14px;
color: #1C2733;
}

.autor {
font-size: 14px;
color: #6B7280;
margin-bottom: 14px;
text-decoration: none;
}

.card-body hr {
border: none;
height: 1px;
background: #E5EEF5;
margin: 15px 0;
}

.categoria {
font-size: 14px;
color: #229ED9;
font-weight: 500;
text-decoration: none;
}

.btn-entrar {
display: block;
background: #229ED9;
color: #fff;
padding: 12px;
border-radius: 10px;
font-weight: 600;
text-decoration: none;
transition: 0.3s ease;
font-size: 14px;
margin-top: 20px;
}

.btn-entrar:hover { background: #1C8BC2; }

/* =====================================================
VER MAIS
===================================================== */

.ver-mais {
margin: 50px 0 20px 0;
text-align: center;
}

.ver-mais a {
padding: 10px 20px;
border-radius: 10px;
background: #229ED9;
color: #fff;
font-weight: bold;
text-decoration: none;
transition: 0.2s ease;
}

.ver-mais a:hover {
background: #1C8BC2;
}


/* =====================================================
FOOTER (DESKTOP)
===================================================== */

.main-footer {
background: #0f172a;
color: #cbd5e1;
padding: 30px 0 30px;
margin-top: auto;
}

.footer-container { text-align: center; }

.footer-text {
max-width: 1200px;
margin: 0 auto 30px;
font-size: 14px;
text-align: left;
line-height: 1.7;
}

.footer-links { margin-bottom: 30px; }

.footer-links a {
color: #229ED9;
margin: 0 14px;
text-decoration: none;
font-size: 14px;
}

.footer-links a:hover { text-decoration: underline; }

.footer-bottom {
border-top: 1px solid #1e293b;
padding-top: 20px;
font-size: 13px;
color: #64748b;
text-align: center;
}


/* =====================================================
BOTÃO SUBIR
===================================================== */

#btnTop {
position: fixed;
bottom: 30px;
right: 30px;
width: 45px;
height: 45px;
border-radius: 50%;
background: #229ED9;
color: #fff;
border: none;
font-size: 18px;
cursor: pointer;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 9999;
}

#btnTop.show {
opacity: 1;
visibility: visible;
}

#btnTop:hover {
background: #1b8ac6;
transform: translateY(-3px);
}


/* =====================================================
RESPONSIVO (MOBILE)
===================================================== */

@media (max-width: 900px) {
.header-flex {
flex-direction: column;
align-items: stretch;
}

.search-box {
max-width: 100%;
}

.header-actions {
justify-content: center;
}
}

@media (max-width: 768px) {

.main-header .container {
width: 100%;
padding: 0 14px;
}

.main-header {
padding: 28px 0 34px;
}

.header-flex {
flex-direction: column;
align-items: center;
gap: 20px;
}

.logo {
width: 100%;
text-align: center;
}

.logo a {
font-size: 22px;
display: inline-block;
padding: 10px 0;
}

.search-box {
width: 100%;
}

.search-box input {
width: 100%;
height: 50px;
font-size: 16px;
border-radius: 14px;
padding: 0 16px 0 48px;
}

.header-actions {
display: flex;
}

.btn-primary {
flex: 1;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
border-radius: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.footer-text {
text-align: center;
}

.footer-links {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 12px 18px;
justify-items: center;
margin: 30px 0 25px;
}

.footer-links a {
font-size: 14px;
font-weight: 500;
color: #22c1ff;
text-decoration: none;
padding: 6px 0;
}

.footer-links a:hover {
color: #ffffff;
}
}