html {
    scroll-behavior: smooth;
  }
:root {
    --font-h1: clamp(1.75rem, 2.3vw, 2rem);
    --font-h2: clamp(1.75rem, 2.3vw, 2rem);
    --font-h3: clamp(1.5rem, 2vw, 1.75rem);
    --font-p: clamp(1rem, 1vw, 1.2rem);
    --color: #763f98; 
    --color-H1: #b37d58;

    
}
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}



.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
line-height: 1.7;
} 


h1 {
    font-size: var(--font-h1);
    font-weight: 600;
    font-family: 'Mali', cursive;
    /* color: #763f98;  */
    color: var(--color-H1);
    text-shadow: 1px 1px 1px #CCCCCC;
    
}


h2 {
    font-size: var(--font-h2);
    font-family: 'Mali', cursive;
    font-weight: 600;

    text-shadow: 1px 1px 1px #CCCCCC;
}

h3 {

    font-size: var(--font-h3);
    font-weight: 600;
    color: var(--color-H1);
    font-family: 'Mali', cursive;
    
}

 h4 {
    font-size: clamp(1.25rem, 2vw, 1.3rem);
  }


p, span {
    font-size: var(--font-p);
    line-height: 1.7;
    color: #747474;
}


b {
font-family: 'Mali', cursive;
color: var(--color-H1);
} 


.tag {        
font-size:11px;
}

.tag a,
.tag a:hover,
.tag a:active,
.tag a:focus,
.tag a:visited {
    color: var(--color-H1);
    text-decoration: none;
}


img {
    width: 100%;
}
body {
    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
.container {
    max-width: 1300px;
    margin: auto;
}
.slide {
    padding-top: 60px;
    overflow: hidden;
}
.slide img {
    float: right;
    min-width: 800px;
    /* margin-right: -20px; */
}

.slide img {
    float: right;
    min-width: 800px;
    /* margin-right: -20px; */
}

.item-img {
    /* width:100%; */
    width: 200px;
    height:auto;       /* สำคัญ */
    margin: 0 auto;
}
/* .col img {
    float: left;
    max-width: 550px;
} */


.col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    align-items: center;
}


.col1 {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
     gap: 10px;
    margin-bottom: 1rem;
}

.col2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
     gap: 10px;
    align-items: center;
}



.bkvideo {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-height: 620px;
}
section.bkvideo:before {
    content: '';
    background-color: #d9d9d9cc;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0px;
    right: 0px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 90;
}


.title-video {
    position: absolute;
    border-radius: 15px;
    max-width: 1170px;
    z-index: 100;
    display: grid;
    justify-content: center;
    align-items: center;
    /* grid-template-columns: 2fr 1.5fr; */
    gap: 15px;
}

.bkvideo video {
    width: 100%;
}
form {
    /* background-color: #8b5f3e21; */
    padding: 20px 10px;
    border-radius: 10px;
    /* backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px); */
}
.slidee {
    position: relative;
}
.form1 {
    /* position: absolute; */
    /* top: 50%; */
    /* right: 0;
    transform: translate(-50% ,-50%); */
}




@media (max-width: 1000px) {

    h1 {
    font-size: 34px;
    font-family: 'Mali', cursive;
    }   

    .bkvideo video {
        width: auto;
    }
    .slidee {
        display: flex;
        flex-direction: column-reverse;
        overflow: hidden;
    }
    .slidee img {
        width: 167%;
    }
    /* .form1 {
        margin-top: 20px;
    } */
    #sec {
        background-image: linear-gradient(93deg, rgb(255 255 255 / 88%) 30%, rgb(255 255 255) 60%) ,url(https://www.ccfthai.or.th/microsite/CSS/FY23/img/bk.jpg) !important;
    }
    .col, .col2 {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 750px) {

    
    .contents h2 {
        text-align: center;
    }
    .foot img {
        float: right;
        width: 192%;
        transform: translate(-6%, 0%);
    }

    .col, .col2 {
        grid-template-columns: 1fr;
    }



}
@media (max-width: 600px) {
    .col h2 {
        font-size: 26px;
    }
    .col, .col2 {
        grid-template-columns: 1fr;
    }

.col {
    display: flex;
    flex-direction: column-reverse;
}

    .col img{
        text-align: center;
    }

    .contents2 h2 {
        text-align: center;
    }
    .slidee img {
        width: 230%;
        margin-left: -19%;
    }
}

@media (max-width: 500px) {
    .slide {
        padding-top: 100px;
    }
}

/* ========================================
   Page-specific styles (previously in index.php)
   ======================================== */
        body {
            background-color: #f8f6fa;
            
            /*background-image: url('https://www.ccfthai.or.th/microsite/CLF/FY26/img/white-paper.jpg');*/
            /*background-size: cover;  ทำให้ภาพครอบคลุมทั้งหน้าจอ */
            /*background-position: center;  จัดรูปภาพให้อยู่ตรงกลาง (แนะนำ) */
            /*background-repeat: no-repeat;  ป้องกันภาพซ้ำ */
            /* Optional: ทำให้ภาพติดกับที่เมื่อเลื่อนหน้าจอ */
            /* background-attachment: fixed; */
            height: 100%; /* กำหนดความสูงเต็ม viewport */
            width: 100%;  /* กำหนดความกว้างเต็ม viewport */
            margin: 0;     /* ลบ margin ของ body */

        } 

  
        nav {
            /*background: #e4ddee !important;*/
           
             background: white !important; 
             box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;

        }

        .menu {
            background: white !important; 
            box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;

        }

        .menu ul {
            color: #763f98; 
        }


        footer {

        background: #e4ddee !important;
        color : #000;
        }


        .foot-title {
          padding: 30px; 
          margin : 30px;
          background-color: #ffffff; 
          /* border-radius: 14px;
        box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; */
        }

.foot-title .story-offset {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.foot-title .impact-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-H1);
    /* margin-bottom: 35px; */
    line-height: 1.6;
}

/* แสดง 4 ช่อง */
.foot-title .impact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* กล่องแต่ละช่อง */
.foot-title .impact-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px 15px;
    text-align: center;
    border: 1px solid #e8edf2;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: 0.3s ease;
}

/* เมื่อเอาเมาส์ชี้ */
.foot-title .impact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

/* รูปไอคอน */
.foot-title .impact-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin-bottom: 15px;
}

/* หัวข้อ */
.foot-title .impact-card h4 {
    font-size: 23px;
    font-weight: 700;
    color: #263445;
    margin: 0 0 8px;
}

/* คำอธิบาย */
.foot-title .impact-card p {
    font-size: 16px;
    color: #667085;
    margin: 0;
    line-height: 1.6;
}




      

.project-main{

padding: 3% 0 5%;

}


        /* card */
.project-card{
    width:100%;
    margin:auto;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
    background:#fff;   /* เปลี่ยนเป็นขาว */
    position:relative;
}

/* รูป */
.project-img{
    width:100%;
    max-width: 700px;
    height:auto;       /* สำคัญ */
    display:block;
    object-fit:cover;
    margin: 0 auto;
}

/* แถบขาวล่าง */
.project-info{
    position: relative;     /* สำคัญ: ไม่ให้ลอยทับ */
    width: 100%;
    background: white;
    padding: 18px;
    border-radius: 0 0 20px 20px;
    box-shadow: none;
}

/* ชื่อ */
.project-title{
    font-size:16px;
    /* font-weight:700; */
    color:#777;
    /* color:#5b3a70; */
    margin-bottom:15px;
}

/* รายละเอียด */
.project-desc{
    font-size:16px;
    color:#777;
    margin-bottom:12px;
}

/* progress bar */
.progress-box{
    margin-top:10px;
}

.progress-text{
    display:flex;
    justify-content:space-between;
    font-size:14px;
    margin-bottom:6px;
    color:#5b3a70;
    font-weight:600;
}

.progress-bar{
    width:100%;
    height:10px;
    background:#eee;
    border-radius:20px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    width: 107.18%; /* เปลี่ยนเปอร์เซ็น */
    background:linear-gradient(90deg,#7b4fa3,#b57edc);
    border-radius:20px;
}

/**/

.special-detail{
  background:#fff;
  padding:5% 0  3%;
  
  /* font-family:'Prompt',sans-serif; */
}



/* hero */
.hero-text{
  text-align:center;
  margin-bottom:40px;
}

.hero-text h1{
  font-size:clamp(22px,4vw,36px);
  font-weight:700;
  color: var(--color-H1);
  line-height:1.4;
}


.hero-text h2{
  font-size:clamp(16px,2.8vw,22px);
  color:#666;
  margin-top:15px;
}

/* story */
.story-box{
  max-width:1200px;
  /* width:100%; */
  margin: 20px 1%;
  font-size:clamp(15px,2.5vw,18px);
  line-height:1.9;
  color:#444;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  /* background: #b37d58; */
}


.story-box p{
  margin-bottom:18px;
}

.highlight{
  /* color:#ff6b8a; */
  color: var(--color-H1);
  font-weight:600;
   font-family: 'Mali', cursive;
}


.call{
  /* background: #fff4f6; */
  background: #f8f6fa;
  padding:18px;
  border-radius:14px;
}

/* title */
.section-title{
  text-align:center;
  margin:60px 0 20px;
}




.section-title h2{
  /* font-size:clamp(20px,3.5vw,28px);
  font-weight:700; */
}

/* grid responsive */
.activity-grid ,.activity-grid2 {
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
}



/* desktop */
@media(min-width:992px){
  .activity-grid{
    grid-template-columns:repeat(4,1fr);
  }

    .activity-grid2{
    grid-template-columns:repeat(3,1fr);
  }


}

/* card */
.activity-card{
  background:#fff;
  border-radius:18px;
  padding:25px;
  text-align:center;
  box-shadow:0 8px 25px rgba(0,0,0,0.06);
  transition:.3s;
}

.activity-card:hover{
  transform:translateY(-6px);
}

.activity-card img{
  width:80px;
  max-width:100%;
  margin-bottom:12px;
}

.activity-card h3{
  font-size:18px;
  margin-bottom:8px;
  /* color:#ff6b8a; */
  color: var(--color-H1);
}

.activity-card p{
  font-size:15px;
  color:#666;
}
/* mobile tab toggle */
.mobile-tab-toggle{
    display:none;
}


.br-mobile {
  display: none;
}

.br-destop {
  display: inline;
}




@media(max-width:768px){

.foot-title .impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


.hero-text h2{
text-align: left;

}

.project-main{
padding:  0;
}

        .foot-title {
          padding: 10px; 
          padding-bottom : 0px;
        }

  .br-mobile {
    display: inline;
  }

  .br-destop {
  display: none;
}



  .project-card{
    border-radius:20px;
    overflow:hidden;
    background:#fff;
  }

  .project-img{
    width:100%;
    height:auto;          /* ให้รูปเต็ม */
    display:block;

  }

  .project-info{
    position:relative;    /* สำคัญมาก */
    bottom:auto;
    border-radius:0 0 20px 20px;
    box-shadow:none;
  }

.mobile-tab-toggle{
    display:flex;
    background:#fff;
    /* border-radius:14px; */
    overflow:hidden;
    /* margin:15px; */
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.tab-item{
    flex:1;
    text-align:center;
    padding:14px;
    font-weight:bold;
    color:var(--color-H1);
    /* background:#f3eef7; */
    background: #ffffff;
    /* border: solid 2px #9273ac; */
    font-size:14px;
}

.tab-item.active{
    /* background:#9273ac; */
    background: var(--color-H1);
    color:#fff;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

#detail{display:none;} /* default mobile */
}

/* ========================================
   Styles extracted from HTML attributes
   ======================================== */
.donate-section {
    /* background-color: #f8f6fa; */
    background-color: #c1804321;
}

.donate-visual {
    /* padding: 3% 0 0; */
    padding: 0;
}

.story-text {
    text-align: left;
}

.story-paragraph {
    text-indent: 5%;
}

.closing-message,
.centered-text {
    text-align: center;
}

.story-offset {
    margin-top: 20px;
}

.purple-heading {
    color: var(--color-H1);
}



/* Mobile */
@media (max-width: 480px) {
    .foot-title {
        padding: 20px 5px;
        margin: 20px;
    }

    .foot-title .impact-heading {
        font-size: 22px;
    }

    .foot-title .impact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .foot-title .impact-card {
        padding: 20px 8px;
    }

    .foot-title .impact-img {
        width: 75px;
        height: 75px;
    }

    .foot-title .impact-card h4 {
        font-size: 19px;
    }

    .foot-title .impact-card p {
        font-size: 13px;
    }
}