/* Panayotis Cacoyannis Website - 2025 Responsive Stylesheet */

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

body {
    font-family: Times;
    background: url(images/square_new.png) no-repeat top center;
    background-size: 100% 100%;
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
}

img {
    border: none;
    max-width: 100%;
    height: auto;
}

#whole {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Banner */
#banner {
    text-align: center;
    padding: 20px 0;
}

#banner img {
    max-width: 444px;
    width: 100%;
    height: auto;
}

/* Navigation Bar */
#navbar {
    background: none;
}

.nav-links {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    gap: 1px;
    padding: 0;
}

.nav-links a img {
    display: block;
    transition: opacity 0.3s;
}

.nav-links a:hover img {
    opacity: 0.7;
}

.gray_line {
    height: 30px;
    border-bottom: 1px solid #c2c2c2;
}

/* Main Content */
#main {
    background: #ffffff;
    border: 1px solid #c2c2c2;
    border-top: none;
    padding: 15px 0px 40px;
    min-height: 683px;
}

/* Subbar Navigation */
#subbar {
    text-align: left;
    padding: 0px 10px 0 10px;
    border-bottom: 2px solid #eeeeee;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

#subbar a {
    text-decoration: none;
    color: #000;
    padding: 0 5px 0 5px;
    margin: 0 0 5px 0;
    display: inline-block;
    font-size: 16px;
    transition: all 0.2s;
}

#subbar a:hover {
    color: white;
    background-color: black;
}

#subbar a.current {
    color: black;
    background-color: #c2c2c2;
}

/* Subbar2 for Art Page */
#subbar2 {
    text-align: left;
    padding: 16px 10px 15px 10px;
    border-bottom: 2px solid #eeeeee;
    margin-bottom: 30px;
    position: relative;
}

/* Home Button */
#home {
    position: absolute;
    right: 15px;
    top: 0;
}

#home a {
    display: block;
	float: right;
    width: 65px;
    height: 20px;
    background: url('images/home-button.png') no-repeat;
    background-size: 65px 20px;
    text-indent: -9999px;
}

#home a:hover {
    background: url('images/home-button-border.png') no-repeat;
    background-size: 65px 20px;
}

/* Book Grid - Index Page */

.books {
	padding-bottom: 11px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 0 10px;
}

.book-grid a {
    display: block;
    transition: transform 0.3s;
}

.book-grid a:hover {
    transform: scale(1.05);
}

.book-grid img {
    width: 100%;
    height: auto;
    display: block;
}


/* Novels Pages */
#book {
    text-align: center;
    margin: 5px 0 22px;;
    font-size: 16px;
}

/* Biography Pages */
#biography {
    max-width: 850px;
    margin: 30px auto;
    padding: 0 10px;
}

.bio-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
	padding-bottom: 90px;
}

.bio-content2 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
	padding-bottom: 123px;
}

.bio-content3 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
	padding-bottom: 49px;
}
.bio-content4 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
	padding-bottom: 154px;
}
.bio-content5 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
	padding-bottom: 33px;
}

.bio-image {
    flex: 0 0 300px;
}

.bio-image img {
    width: 100%;
    height: auto;
    display: block;
}

.bio-text {
    flex: 1;
}

.bio-text p {
    font-size: 15px;
    line-height: 1.1;
}

/* Art Categories Section - Art Page */
.art-categories {
    max-width: 700px;
    margin: 60px auto 30px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-item img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 30px;
}

.category-item a.category-link {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    padding: 10px;
    transition: color 0.3s;
    text-align: center;
}

.category-item a.category-link:hover {
    color: #00F;
    text-decoration: underline;
}

/* Art Display Section - Paintings Page */
#art {
    margin: 30px auto;
    text-align: center;
    max-width: 600px;
    padding: 0 10px;
}

#art a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

#art a span {
    display: none;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #c2c2c2;
    border: 1px dotted black;
    padding: 10px;
    width: 200px;
    z-index: 10;
    white-space: normal;
    text-align: left;
}

#art a:hover span {
    display: block;
}

#art img {
    display: block;
    margin: 20px auto 0;
    max-width: 100%;
    height: auto;
}

/* Back/Next Navigation */
#backnext {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 30px auto;
    max-width: 410px;
    flex-wrap: wrap;
}

#back a, #next a {
    display: block;
    width: 200px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    text-indent: -9999px;
    transition: opacity 0.3s;
}

#back a {
    background-image: url('images/previous4.png');
}

#back a:hover {
    background-image: url('images/previous-type4.png');
}

#next a {
    background-image: url('images/next4.png');
}

#next a:hover {
    background-image: url('images/next-type4.png');
}

/* Footer */
#footer2 {
    margin: 0;
    font-size: 0.85em;
    padding: 15px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-content > div {
    flex: 1 1 200px;
}

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

.footer-center {
    text-align: center;
}

.footer-right {
    text-align: right;
}

a.footerlink {
    text-decoration: none;
    color: #0f0f0f;
}

a.footerlink:hover {
    color: #00F;
    text-decoration: underline;
}

/* Tablet Styles */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    #banner {
        padding: 15px 0;
    }

    #home {
        position: absolute;
        margin-bottom: 10px;
        text-align: left;
    }

    #subbar {
        justify-content: left;
    }

    #subbar2 {
        text-align: center;
    }



    .footer-content {
        display: block;
        flex-direction: column;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        text-align: center;
    }
}

/* Tablet Style 650px */
@media (max-width: 650px) {

    /* Biography - Mobile: Stack vertically */
    .bio-content {
        flex-direction: column;
        gap: 20px;
		padding-bottom: 45px;
    }
	
	.bio-content2 {
    	flex-direction: column;
        gap: 20px;
		padding-bottom: 45px;
    }	
	.bio-content3 {
    	flex-direction: column;
        gap: 20px;
		padding-bottom: 45px;
	}
	
	.bio-content4 {
    	flex-direction: column;
        gap: 20px;
		padding-bottom: 45px;
	}
	
	.bio-content5 {
    	flex-direction: column;
        gap: 20px;
		padding-bottom: 45px;
	}
	
	.bio-image {
        flex: 0 0 auto;
        max-width: 350px;
        margin: 0 auto;
    }

    .bio-text p {
        text-align: left;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    #whole {
        padding: 0 10px;
    }

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }

    #main {
        padding: 15px 10px 30px;
    }
	
	#home {
     display: none;
    }
	
    #subbar {
        padding: 5px 0px 0px;
        justify-content: left;
    }

    #subbar2 {
        padding: 20px 10px 10px;
    }

    #subbar a {
        font-size: 14px;
        padding: 3px 6px;
        margin: 2px 1px;
    }

    .nav-links a img {
        max-width: 100px;
    }

    .gray_line {
        height: 23.25px;
    }



    /* Art Categories - Mobile: Stack vertically with image above text */
    .art-categories {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 30px auto;
    }

    .category-item {
        margin-bottom: 40px;
    }

    .category-item:last-child {
        margin-bottom: 0;
    }

    .category-item img {
        margin-bottom: 15px;
    }

    .category-item a.category-link {
        font-size: 18px;
    }

    #art {
        padding: 0 5px;
    }

    #art a span {
        width: 180px;
        font-size: 13px;
    }

    #backnext {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    #back a, #next a {
        width: 150px;
        height: 37.5px;
    }

    #footer2 {
        font-size: 0.75em;
        padding: 10px 5px;
    }

    .footer-content > div {
        flex: 1 1 20px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .book-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }

    #subbar a {
        font-size: 13px;
    }

    .category-item a.category-link {
        font-size: 16px;
    }

    #back a, #next a {
        width: 140px;
        height: 35px;
    }
}