/* =====================================================
   DIỄN ĐÀN CÔNG GIÁO
   style.css
===================================================== */

:root{

    --primary:hwb(0 7% 13%);
    --primary-dark:#0F3555;
    --gold:#37d4cc;

    --bg:#e0e3eb;

    --white:#fff;

    --text:#233142;

    --gray:#6D7A88;

    --border:#E7EBF2;

    --shadow:0 10px 30px rgba(0,0,0,.08);

    --radius:18px;

    --transition:.3s;

}

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

body{

    font-family:'Poppins',sans-serif;

    background:var(--bg);

    color:var(--text);

}

a{

    text-decoration:none;

    color:inherit;

}

button{

    cursor:pointer;

    border:none;

    outline:none;

    font-family:'Poppins';

}

img{

    width:100%;

    display:block;

}

ul{

    list-style:none;

}


/* ===========================
HEADER
=========================== */

header{

    position:fixed;

    top:0;

    left:0;

    width:100%;

    height:72px;

    background:rgba(255,255,255,.85);

    backdrop-filter:blur(18px);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 25px;

    z-index:1000;

    border-bottom:1px solid var(--border);

}

header h2{

    font-size:22px;

    color:var(--primary);

}

#menuBtn{

    width:45px;

    height:45px;

    border-radius:12px;

    background:white;

    box-shadow:var(--shadow);

    font-size:20px;

    transition:.3s;

}

#menuBtn:hover{

    background:var(--primary);

    color:white;

}

.header-right{

    display:flex;

    align-items:center;

    gap:15px;

}

.header-right button{

    width:42px;

    height:42px;

    border-radius:50%;

    background:white;

    box-shadow:var(--shadow);

    transition:.3s;

}

.header-right button:hover{

    background:var(--primary);

    color:white;

}

.avatar{

    width:45px;

    height:45px;

    border-radius:50%;

    object-fit:cover;

    border:3px solid white;

    box-shadow:var(--shadow);

}


/* ===========================
SIDEBAR
=========================== */

.sidebar{

    position:fixed;

    top:0;

    left:-300px;

    width:280px;

    height:100vh;

    background:white;

    z-index:9999;

    transition:.35s;

    box-shadow:0 0 40px rgba(0,0,0,.15);

    display:flex;

    flex-direction:column;

}

.sidebar.active{

    left:0;

}

.sidebar-top{

    text-align:center;

    padding:30px 20px;

    border-bottom:1px solid var(--border);

}

.logo{

    width:90px;

    margin:auto;

    margin-bottom:15px;

}

.sidebar-top h2{

    color:var(--primary);

    font-size:22px;

}

.sidebar ul{

    flex:1;

    padding:20px;

}

.sidebar li{

    display:flex;

    align-items:center;

    gap:15px;

    padding:14px 16px;

    margin-bottom:10px;

    border-radius:14px;

    transition:.3s;

    cursor:pointer;

}

.sidebar li i{

    width:24px;

    text-align:center;

    color:var(--primary);

}

.sidebar li:hover{

    background:#EDF5FF;

}

.sidebar li.active{

    background:var(--primary);

    color:white;

}

.sidebar li.active i{

    color:white;

}

.sidebar-bottom{

    padding:20px;

}

.sidebar-bottom button{

    width:100%;

    height:48px;

    border-radius:14px;

    background:var(--primary);

    color:white;

    font-size:15px;

}

.sidebar-bottom button:hover{

    background:var(--primary-dark);

}


/* ===========================
OVERLAY
=========================== */

.overlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.35);

    opacity:0;

    visibility:hidden;

    transition:.3s;

    z-index:9000;

}

.overlay.active{

    opacity:1;

    visibility:visible;

}


/* ===========================
MAIN
=========================== */

main{

    max-width:1350px;

    margin:auto;

    padding:

        100px

        25px

        40px;

}


/* ===========================
SECTION
=========================== */

.section{

    margin-top:40px;
    /* ===========================
   DANH SÁCH BÀI VIẾT
=========================== */

.posts{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));

    gap:25px;

}

.post{

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    box-shadow:0 10px 30px rgba(0,0,0,.08);

    transition:.3s;

}

.post:hover{

    transform:translateY(-8px);

    box-shadow:0 20px 45px rgba(0,0,0,.15);

}

/* Ảnh thumbnail */

.post img{

    width:100%;

    height:220px;

    object-fit:cover;

    transition:.4s;

}

.post:hover img{

    transform:scale(1.08);

}

.post-content{

    padding:22px;

}

.post-content h3{

    font-size:21px;

    color:var(--primary);

    margin-bottom:12px;

    line-height:1.5;

    height:64px;

    overflow:hidden;

}

.post-content h3 a{

    transition:.3s;

}

.post-content h3 a:hover{

    color:var(--gold);

}

.post-content p{

    color:#666;

    line-height:1.8;

    font-size:15px;

    height:82px;

    overflow:hidden;

    margin-bottom:20px;

}

.post-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    flex-wrap:wrap;

    gap:10px;

    border-top:1px solid #eee;

    padding-top:15px;

    color:#777;

    font-size:14px;

}

.post-footer span{

    display:flex;

    align-items:center;

    gap:6px;

}

.post-footer i{

    color:var(--primary);

}

.empty-post{

    grid-column:1/-1;

    text-align:center;

    padding:60px;

    background:#fff;

    border-radius:18px;

    box-shadow:var(--shadow);

}

}

.section-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

}

.section-title h2{

    color:var(--primary);

}

.section-title a{

    color:var(--gold);

    font-weight:600;

}


/* ===========================
CARD CHUNG
=========================== */

.card,

.post,

.box{

    background:white;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    transition:.3s;

}

.card:hover,

.post:hover,

.box:hover{

    transform:translateY(-6px);

}
/* Animation */

.card,
.post,
.box,
.banner{

    opacity:0;

    transform:translateY(30px);

    transition:.6s;

}

.show{

    opacity:1;

    transform:translateY(0);

}
/* ==========================
   FORM ĐĂNG BÀI
========================== */

.post-container{

    max-width:1100px;

    margin:100px auto 40px;

    padding:20px;

}

.post-card{

    background:#fff;

    border-radius:22px;

    overflow:hidden;

    box-shadow:0 20px 60px rgba(0,0,0,.08);

}

.post-header{

    padding:30px;

    background:linear-gradient(135deg,#154C79,#1D6FB8);

    color:#fff;

}

.post-header h2{

    font-size:28px;

    font-weight:600;

}

.post-header p{

    margin-top:8px;

    opacity:.9;

}

.post-card form{

    padding:35px;

}

.form-group{

    margin-bottom:25px;

}

.form-group label{

    display:block;

    margin-bottom:10px;

    font-weight:600;

    color:#154C79;

}

/* Input */

.form-group input[type=text],
.form-group input[type=file],
.form-group select,
.form-group textarea{

    width:100%;

    padding:15px 18px;

    border:2px solid #E7EBF2;

    border-radius:14px;

    background:#FAFBFD;

    font-size:15px;

    font-family:'Poppins',sans-serif;

    transition:.25s;

}

.form-group textarea{

    min-height:180px;

    resize:vertical;

}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{

    outline:none;

    border-color:#154C79;

    background:#fff;

    box-shadow:0 0 0 5px rgba(21,76,121,.08);

}

/* Upload */

input[type=file]{

    cursor:pointer;

    background:#fff;

}

/* Buttons */

.form-action{

    margin-top:35px;

    display:flex;

    gap:15px;

}

.btn-primary{

    background:#154C79;

    color:#fff;

    border:none;

    padding:14px 35px;

    border-radius:14px;

    font-size:15px;

    font-weight:600;

    transition:.3s;

}

.btn-primary:hover{

    background:#10395B;

    transform:translateY(-2px);

    box-shadow:0 12px 25px rgba(21,76,121,.3);

}

.btn-secondary{

    background:#698fc9;

    color:#444;

    border:none;

    padding:14px 30px;

    border-radius:14px;

    font-size:15px;

    transition:.3s;

}

.btn-secondary:hover{

    background:#3c71cc;

}

/* CKEditor */

.ck-editor__editable{

    min-height:450px !important;

}

.ck.ck-editor{

    border-radius:14px;

    overflow:hidden;

}

/* Card Animation */

.post-card{

    animation:fadeUp .5s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* Responsive */

@media(max-width:768px){

    .post-card form{

        padding:20px;

    }

    .form-action{

        flex-direction:column;

    }

    .btn-primary,

    .btn-secondary{

        width:100%;

    }

}
/* ===========================
   CHI TIẾT BÀI VIẾT
=========================== */

.article{

    max-width:1000px;

    margin:90px auto 50px;

    padding:20px;

}

.article-card{

    background:#fff;

    border-radius:22px;

    overflow:hidden;

    box-shadow:0 20px 60px rgba(0,0,0,.08);

    animation:fadeUp .5s ease;

}

/* Ảnh */

.article-image{

    width:100%;

    height:500px;

    object-fit:cover;

}

/* Nội dung */

.article-body{

    padding:40px;

}

.article-category{

    display:inline-block;

    background:linear-gradient(135deg,#ff0000,#ff0000);

    color:#f5f3f3;

    padding:8px 18px;

    border-radius:30px;

    font-size:14px;

    font-weight:600;

    margin-bottom:20px;

}

.article-body h1{

    font-size:40px;

    line-height:1.4;

    color:#ffffff;

    margin-bottom:25px;

}

/* Thông tin */

.article-info{

    display:flex;

    flex-wrap:wrap;

    gap:25px;

    color:#777;

    font-size:15px;

    padding-bottom:25px;

    border-bottom:1px solid #eee;

    margin-bottom:35px;

}

.article-info span{

    display:flex;

    align-items:center;

    gap:8px;

}

.article-info i{

    color:#154C79;

}

/* Nội dung */

.article-content{

    color:#444;

    font-size:18px;

    line-height:2;

}

.article-content h2,

.article-content h3{

    color:#154C79;

    margin:30px 0 15px;

}

.article-content p{

    margin-bottom:20px;

}

.article-content img{

    display:block;

    max-width:100%;

    margin:30px auto;

    border-radius:15px;

    box-shadow:0 10px 25px rgba(0,0,0,.1);

}

.article-content ul,

.article-content ol{

    padding-left:30px;

    margin-bottom:20px;

}

.article-content blockquote{

    border-left:5px solid #154C79;

    background:#F7F9FC;

    padding:20px;

    margin:25px 0;

    border-radius:10px;

    color:#555;

    font-style:italic;

}

.article-content table{

    width:100%;

    border-collapse:collapse;

    margin:25px 0;

}

.article-content table th{

    background:#154C79;

    color:#fff;

    padding:12px;

}

.article-content table td{

    padding:12px;

    border:1px solid #ddd;

}

.article-content iframe{

    width:100%;

    min-height:500px;

    border:none;

    border-radius:15px;

}

/* Tác giả */

.article-author{

    display:flex;

    align-items:center;

    gap:15px;

    margin-top:50px;

    padding-top:30px;

    border-top:1px solid #eee;

}

.article-author img{

    width:70px;

    height:70px;

    border-radius:50%;

    object-fit:cover;

}

.article-author h3{

    margin:0;

    color:#154C79;

}

.article-author p{

    color:#777;

    margin-top:5px;

}

/* Chia sẻ */

.share{

    display:flex;

    gap:12px;

    margin-top:35px;

}

.share a{

    width:45px;

    height:45px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:50%;

    background:#154C79;

    color:#fff;

    text-decoration:none;

    transition:.3s;

}

.share a:hover{

    transform:translateY(-5px);

    background:#10395B;

}

/* Bài liên quan */

.related{

    margin-top:60px;

}

.related h2{

    color:#154C79;

    margin-bottom:25px;

}

.related-posts{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));

    gap:25px;

}

.related-card{

    background:#fff;

    border-radius:15px;

    overflow:hidden;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

    transition:.3s;

}

.related-card:hover{

    transform:translateY(-8px);

}

.related-card img{

    width:100%;

    height:180px;

    object-fit:cover;

}

.related-card .content{

    padding:20px;

}

.related-card h3{

    color:#154C79;

    margin-bottom:10px;

}

.related-card p{

    color:#666;

    font-size:14px;

}

/* Animation */

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* Mobile */

@media(max-width:768px){

    .article-image{

        height:250px;

    }

    .article-body{

        padding:20px;

    }

    .article-body h1{

        font-size:28px;

    }

    .article-info{

        flex-direction:column;

        gap:10px;

    }

    .article-content{

        font-size:16px;

    }

}
.image-modal{
display:none;
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
background:rgba(0,0,0,.5);
z-index:9999;
}

.image-box{
background:#fff;
width:450px;
padding:20px;
margin:80px auto;
border-radius:10px;
}

.image-box input[type=text]{
width:100%;
padding:10px;
margin:10px 0;
}

.image-box button{
padding:10px 18px;
margin-top:10px;
cursor:pointer;
}
#imageGallery{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
    gap:10px;
    margin-top:15px;
}

#imageGallery img{
    width:100%;
    height:100px;
    object-fit:cover;
    border-radius:8px;
    cursor:pointer;
    border:2px solid transparent;
}

#imageGallery img:hover{
    border-color:#0d6efd;
}
.form-select{

    width:140px;

    padding:8px 10px;

    border:1px solid #ddd;

    border-radius:8px;

}

.btn-save{

    background:#198754;

    color:#fff;

    border:none;

    padding:8px 15px;

    border-radius:8px;

    cursor:pointer;

}

.btn-save:hover{

    background:#157347;

}
.btn-delete{
    background:#dc3545;
    color:#fff;
    padding:8px 15px;
    border-radius:6px;
    text-decoration:none;
    margin-left:6px;
    display:inline-block;
}

.btn-delete:hover{
    background:#bb2d3b;
}
/*==============================
FOOTER
==============================*/

/*================================
 FOOTER - THÁNH CARLO ACUTIS
================================*/

.footer{

    margin-top:80px;

    background:linear-gradient(
        135deg,
        #EAF6FF 0%,
        #CDEBFF 40%,
        #87CEFA 100%
    );

    color:#184B73;

    position:relative;

    overflow:hidden;

    border-top:5px solid #F4C542;

}

/* Hào quang */

.footer::before{

    content:"";

    position:absolute;

    width:450px;

    height:450px;

    background:rgba(255,255,255,.35);

    border-radius:50%;

    top:-220px;

    right:-120px;

}

.footer::after{

    content:"✝";

    position:absolute;

    left:50%;

    top:20px;

    transform:translateX(-50%);

    font-size:90px;

    color:rgba(244,197,66,.18);

}

.footer-container{

    position:relative;

    z-index:2;

    max-width:1300px;

    margin:auto;

    padding:60px 30px;

    display:grid;

    grid-template-columns:2fr 1fr 1fr 1fr;

    gap:40px;

}

.footer-logo{

    width:95px;

    border-radius:50%;

    background:#fff;

    padding:8px;

    box-shadow:0 15px 35px rgba(0,0,0,.12);

    margin-bottom:18px;

}

.footer h3{

    color:#0D5EA8;

    margin-bottom:12px;

}

.footer h4{

    color:#0D5EA8;

    margin-bottom:18px;

}

.footer p{

    color:#46647C;

    line-height:1.9;

}

.footer ul{

    list-style:none;

}

.footer li{

    margin-bottom:12px;

}

.footer a{

    color:#184B73;

    transition:.3s;

}

.footer a:hover{

    color:#D4A017;

    padding-left:8px;

}

.social{

    display:flex;

    gap:12px;

    margin-top:15px;

}

.social a{

    width:46px;

    height:46px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:50%;

    background:white;

    color:#0D5EA8;

    font-size:18px;

    box-shadow:0 8px 20px rgba(0,0,0,.08);

    transition:.35s;

}

.social a:hover{

    background:#F4C542;

    color:white;

    transform:translateY(-6px);

}

.footer-bottom{

    text-align:center;

    padding:18px;

    background:rgba(255,255,255,.45);

    backdrop-filter:blur(10px);

    color:#184B73;

    font-weight:500;

    border-top:1px solid rgba(13,94,168,.15);

}

@media(max-width:900px){

.footer-container{

grid-template-columns:1fr;

text-align:center;

}

.social{

justify-content:center;

}

.footer-logo{

margin:auto;

margin-bottom:15px;

}

}