:root{
    --bg: #f5f7fb;
    --surface: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #0f172a;
    --muted: #64748b;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;
    --border: rgba(148,163,184,0.15);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter', sans-serif;
}

body{
    /* background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%); */
    background-color: #011e5c;
    color: var(--text);
}

.load{
    position: fixed;
    inset: 0;
    display:grid;
    place-items:center;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color:white;
    z-index:999;
}

.layout{
    display:none;
    min-height:100%;
    display: flex;
}

.sidebar{
    width:260px;
    background: rgba(15,23,42,0.96);
    backdrop-filter: blur(12px);
    color:white;
    padding:30px 20px;
    display:flex;
    flex-direction:column;
    border-right:1px solid rgba(255,255,255,0.05);
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
}

.sidebar h2{
    margin-bottom:30px;
    font-size:1.4rem;
    font-weight:700;
}

.sidebar button{
    border:none;
    background:transparent;
    color:#e2e8f0;
    padding:14px 16px;
    margin-bottom:8px;
    text-align:left;
    border-radius:12px;
    cursor:pointer;
    font-size:0.95rem;
    transition: all .25s ease;
}

.sidebar button:hover{
    background: var(--sidebar-hover);
    transform: translateX(4px);
    color:white;
}

.main{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items:center;
}
.main section{
    width: 100%;
}

.header{
    display:flex;
    width: 100%;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    padding:18px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.logo{
    background-image: url(img/logoEscola.png);
    background-size: contain;
    background-repeat:no-repeat;
    width:240px;
    height:70px;
}

.search{
    padding:12px 16px;
    width:280px;
    border-radius:14px;
    border:1px solid var(--border);
    outline:none;
    background:#f8fafc;
    transition:.2s;
}

.search:focus{
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

#home,
#professores,
#noticias,
#atividades,
#escola,
#materias,
#avisos,
#eventos{
    display:none;
}
#noticias div{
    white-space: pre-line;
}

#home{
    display:block;
}
.hero{
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    place-items: center;
}

.hero h1{
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p{
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.hero-actions{
    display:flex;
    gap:15px;
    justify-content:center;
}

.hero button{
    padding:12px 20px;
    border:none;
    border-radius:12px;
    background: var(--primary);
    color:white;
    cursor:pointer;
    font-weight:600;
    transition:.2s;
}

.hero button:hover{
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hero .secondary{
    background:#e2e8f0;
    color:#0f172a;
}

.hero .secondary:hover{
    background:#cbd5f5;
}

.dashboard{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
    gap:20px;
    margin-bottom:40px;
}

.dash-card{
    background: var(--surface);
    border-radius:16px;
    padding:20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border:1px solid var(--border);
    transition:.25s;
}

.dash-card:hover{
    transform: translateY(-5px);
}

.dash-card h3{
    font-size:0.95rem;
    color: var(--muted);
    margin-bottom:10px;
}

.dash-card p{
    font-size:2rem;
    font-weight:700;
    color: var(--primary);
}

.dash-card span{
    font-size:0.85rem;
    color: var(--muted);
}



.card div{
    z-index:2;
}

.card h3{
    margin-bottom:5px;
}

.card p{
    font-size:0.9rem;
    opacity:0.9;
}
.cards{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap:24px;
    margin-top:25px;
}

.card{
    min-height:170px;
    display:flex;
    align-items:flex-end;
    justify-content:flex-start;
    padding:24px;
    border-radius:20px;
    color:white;
    font-size:1.2rem;
    font-weight:600;
    cursor:pointer;
    background-size:cover;
    background-position:center;
    box-shadow: var(--shadow);
    transition: all .3s ease;
    position:relative;
    overflow:hidden;
}

.card::before{
    content:"";
    position:absolute;
    inset:0;
    background: linear-gradient(to top, rgba(15,23,42,.75), rgba(15,23,42,.15));
}

.card:hover{
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(15,23,42,0.14);
}

.card *{
    position:relative;
    z-index:2;
}

#noticias div,
#eventos div,
#avisos div,
#atividades div,
#professores div{
    background: var(--surface);
    margin:20px auto;
    padding:24px;
    border-radius:20px;
    max-width:900px;
    box-shadow: var(--shadow);
    border:1px solid var(--border);
}

#materias{
    flex-wrap:wrap;
    gap:18px;
    place-content: center;
}

#materias div{
    text-align: center;
    width:280px;
    height:100px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    color: #1e293b;
    font-weight:600;
    cursor:pointer;
    background-size:cover;
    background-position:center;
    box-shadow: var(--shadow);
    transition:.25s;
}

#materias div div{
    white-space: pre-line;
}

#materias div:hover{
    display: none;
    transform: translateY(-5px);
}

#escola{
    background:white;
    max-width:1000px;
    padding:30px;
    border-radius:24px;
    box-shadow: var(--shadow);
    line-height:1.8;
}

footer{
    margin-top:30px;
    background: #0f172a;
    color:#cbd5e1;
    text-align:center;
    padding:30px;
}

footer a{
    color:white;
    text-decoration:none;
    font-weight:600;
}
.logo2{
    width: 100%;
    place-items: center;
}
.school-logo{
    background-image: url(img/logoTitle.png);
    background-size: contain;
    background-repeat:no-repeat;
    width:340px;
    height:170px;
}

@media(max-width:768px){

    .layout{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        flex-direction:row;
        overflow-x:auto;
        padding:16px;
    }

    .sidebar h2{
        display:none;
    }

    .sidebar button{
        white-space:nowrap;
        margin-right:8px;
        margin-bottom:0;
    }

    .header{
        flex-direction:column;
        gap:15px;
    }

    .search{
        width:100%;
    }

    .main{
        padding:20px;
    }
}