body{
font-family:sans-serif;
margin:0;
background:#f7f7f7;
color:#333;
}

/* HERO HEADER */

.hero{
height:320px;
background-image:url("images/hero.jpg");
background-size:cover;
background-position:center;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
}

.hero-inner{
background:rgba(255,255,255,0.8);
padding:40px;
border-radius:12px;
}

.hero h1{
font-size:42px;
margin-bottom:10px;
}

.hero p{
font-size:18px;
margin:0;
}

/* MAIN LAYOUT */

.container{
display:grid;
grid-template-columns:220px 1fr 200px;
gap:30px;
max-width:1400px;
margin:auto;
padding:20px;
}

/* SIDEBAR */

.sidebar{
background:white;
padding:20px;
border-radius:8px;
height:fit-content;
}

.sidebar h2{
margin-top:0;
}

.sidebar a{
display:block;
padding:6px 0;
text-decoration:none;
color:#333;
}

.sidebar a:hover{
text-decoration:underline;
}

/* GALLERY */

.gallery{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
grid-auto-rows:10px;
gap:12px;
}

.gallery a{
display:block;
overflow:hidden;
border-radius:8px;
}

.gallery img{
width:100%;
height:auto;
display:block;
border-radius:8px;

background:white;
padding:4px;

box-shadow:0 3px 8px rgba(0,0,0,0.08);

transition:transform .25s ease,
box-shadow .25s ease;
}

.gallery img:hover{
transform:scale(1.06);
box-shadow:0 15px 35px rgba(0,0,0,0.25);
}

/* PHOTO PAGE */

.photo-container{
max-width:900px;
margin:auto;
padding:40px;
text-align:center;
}

.photo-container img{
max-width:100%;
border-radius:8px;
}

/* DOWNLOAD BUTTON */

.download-btn{
display:inline-block;
margin-top:20px;
padding:12px 24px;
background:#333;
color:white;
text-decoration:none;
border-radius:6px;
}

/* MOBILE */

@media screen and (max-width:1000px){

.container{
grid-template-columns:1fr;
}

.gallery{
grid-template-columns:repeat(2,1fr);
}

}

/* SEARCH */

#search-form{
margin-top:20px;
display:flex;
justify-content:center;
gap:10px;
}

#search-input{
padding:10px 14px;
font-size:16px;
border-radius:6px;
border:1px solid #ccc;
width:260px;
}

#search-form button{
padding:10px 16px;
border:none;
background:#333;
color:white;
border-radius:6px;
cursor:pointer;
}

#search-form button:hover{
background:#555;
}
.footer{
margin-top:60px;
padding:20px;
text-align:center;
font-size:14px;
color:#666;
border-top:1px solid #eee;
}

.footer a{
color:#666;
text-decoration:none;
}

.footer a:hover{
text-decoration:underline;
}
.hero h1 a{
color:black;
text-decoration:none;
}

.hero h1 a:hover{
color:black;
text-decoration:none;
}

@media (max-width:1200px){
.gallery{
column-count:3;
}
}

@media (max-width:800px){
.gallery{
column-count:2;
}
}

@media (max-width:500px){
.gallery{
column-count:1;
}
}

/* =========================
   DOWNLOAD表示（ホバー）
========================= */

.photo-card{
position:relative;
}

.photo-card::after{
content:"Free Download";
position:absolute;
bottom:10px;
right:10px;
background:rgba(0,0,0,0.7);
color:white;
padding:4px 8px;
font-size:12px;
border-radius:4px;
opacity:0;
transition:.2s;
}

.photo-card:hover::after{
opacity:1;
}
