*{margin: 0px; padding: 0px;}
ul{list-style: none;} 
a{text-decoration: none;} 
 
html, body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

header {
    width: 100%; 
    height: 100px;
    background-color: white;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center; 
}

#title {
    text-align: left;
    padding: 40px;
    margin: 0; 
    color: black;
    font-size: 43px;
    font-weight: 200;
    font-family: Baskerville;
    position: relative; 
    flex-grow: 1; 
}

#logo {
    position: absolute;
    top: 15px;
    left: 50%; 
    transform: translateX(-50%); 
}

#top_menu a{color: black;}
 
nav{
    position: absolute;
    bottom: 30px;
    right: 50px;
    font-family: pretendard; font-size: 25px; font-weight: 300;
    z-index: 10;
    
}

nav li{
    display: inline;
    margin-left: 60px;
}
 
nav li a{color: black;}

nav li a:hover{
    color: #46AF72;
}
 
.inner-menu {
    /* 하위 메뉴 스타일 */
    display: none;
    position: absolute;
    left: 15px;
    background-color: white;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
}

.inner-menu-item > a {
    /* hover 전 기본 상태 */
    display: block;
    padding: 5px 40px;
    margin-bottom: 15px;
    font-size: 20px;
    color: black;
    text-align: center;
    text-decoration: none;
}
 
.inner-menu-item a:hover {
    background-color: white;
    color:  #46AF72;
}
 
ul {
    list-style-position: inside;
    padding-top: 0;
  }
  
nav ul li:hover .inner-menu {
    display: block;
}

  .text-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px; 
    padding: 20px;
    margin-top: 20px;
  }
  
  .text-item {
    font-family: 'Pretendard', sans-serif;
    font-size: 18px; font-weight: 400;
    color: black; 
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
  }

  .text-item:hover{
    color: #46AF72;
  }
  
  .content{    
    position: relative;
    background-color:white;
    height:250vh ;
    display:grid;
    margin-bottom: 80px;
    gap: 50px; 
    box-sizing: border-box;
}


/* box가 들어가는 컨테이너 */
.flex-container{
    display: flex;
    justify-content: space-around;
    margin-top:0px;
    margin-bottom: 50px;
    margin-left: 50px; margin-right: 50px;
    gap:20px;
}

.box-container {
    display: flex;
    flex-direction: column;
    align-items: left;   
    text-align: left;    
}

 /* box의 공통 스타일 */
 .b {
    position: relative;
    width: 370px;
    height: 370px;
    text-align:left;
    font-size: 130px;
    font-weight:200;
    font-family: Baskerville;
    color:white;
    z-index: 1;
    transition: transform 0.3s ease, background-size 0.3s ease; 
    background-size: contain; 
    background-position: center;
}

.b:hover {
    background-size: contain; 
    transform: scale(1.1);
}
@media (max-width: 600px) {
    .flex-container {
        flex-direction: column;  /* 모바일에서는 세로로 정렬 */
    }

    .b {
        width: 100%;  /* 모바일에서는 전체 너비를 차지 */
        height: auto;
    }

    .text-item {
        font-size: 16px;  /* 모바일 화면에 맞게 폰트 크기 조정 */
    }
}

.b i {
    position: absolute;
    bottom: 0px; /* 아래쪽 여백 */
    left: 10px;   /* 왼쪽 여백 */
    transition: visibility 0.3s, opacity 0s; 
}

/* hover 시 텍스트 숨기기 */
.b:hover i {
    visibility: hidden;
    opacity: 0;
}


/* 각 box의 위치/색상 */
    .box1 {  background-color:#D2CAC8;}
    .box2  {  margin-top:300px;  background-color:#C5E8FB;}
    .box3  {  background-color:#F6C7DE;}
    .box4 {  margin-top:300px; background-color:#FFF59E;}

    .box5 {  background-color:#B3D06F;}
    .box6  {  margin-top:300px;  background-color:#5AB679;}
    .box7  {  background-color:#7BA571;}
    .box8 {  margin-top:300px; background-color:#4B63AB;}

    .box9 {  background-color:#EAD7B7;}
    .box10  {  margin-top:300px;  background-color:#E55810;}
    .box11  {  background-color:#428190;}
    .box12 {  margin-top:300px; background-color:#E32522;}

    .b:hover {
        background-size: cover;
        background-position: center;
        transform: scale(1.1);
    }
    
/* 달력 이미지 */
    .box1:hover { background-image: url("IMG/Ca/ca1.jpg"); }
    .box2:hover { background-image: url("IMG/Ca/ca2.jpg"); }
    .box3:hover { background-image: url("IMG/Ca/ca3.jpg"); }
    .box4:hover { background-image: url("IMG/Ca/ca4.jpg"); }
    .box5:hover { background-image: url("IMG/Ca/ca5.jpg"); }
    .box6:hover { background-image: url("IMG/Ca/ca6.jpg"); }
    .box7:hover { background-image: url("IMG/Ca/ca7.jpg"); }
    .box8:hover { background-image: url("IMG/Ca/ca8.jpg"); }
    .box9:hover { background-image: url("IMG/Ca/ca9.jpg"); }
    .box10:hover { background-image: url("IMG/Ca/ca10.jpg"); }
    .box11:hover { background-image: url("IMG/Ca/ca11.jpg"); }
    .box12:hover { background-image: url("IMG/Ca/ca12.jpg"); }
    
  
.img1 {
    position:relative;
    top:30px;
    width: 650px;
}
.img2 {
    position:relative;
    top:30px;
    width: 650px;
}

.box1-t {
    color:#474747;
    line-height: 22px;
    font-family: 'pretendard';
    font-size: 16px; font-weight:400;
    margin-top: 40px;
    text-align: left;
}

/* 배경 사각형 스타일 */
.background-square {
    position: absolute;
    width: 80px; /* 크기 */
    height: 80px;
    background-color: #8AA18D;
    opacity: 0.6; /* 투명도 */
    border-radius: 1px; /* 모서리 둥글기 */
    transition: transform 0.3s ease-in-out;
    z-index: 0; 
}
.background-square:hover {
    transform: scale(1.5); 
}


.text-container2 {
    margin-top: 80px;
    position: relative; 
    top: 10px; 
    align-items: left;
    font-family: 'Pretendard', sans-serif;
}

.text-container2 h1,
.text-container2 h2,
.text-container2 h3 {
    margin: 10px 0; /* 텍스트 간 간격 */
}

.text-container2 h1 {
    font-size: 30px; 
    font-weight: 400; 
    color: #474747;
}

.text-container2 h2 {
    font-size: 24px;
    font-weight: 300; 
    color: #555; 
    margin-top: 20px;
}

.text-container2 h3 {
    font-size: 20px; 
    font-weight: 300;
    color: #666; 
}

#random-squares-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.random-square {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0.6;
    border-radius: 1px;
    transition: transform 0.3s ease-in-out;
}

.random-square:hover {
    transform: scale(1.5);
}
