@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* --- GLOBAL RESET & BODY --- */
body {
    color: #C6BA84;
    background-color: #000000;
    font-family: 'Cormorant', serif;
    margin: 0;
    padding: 0;
}

#wrapper {
    width: 90%;
    max-width: 1000px;
    margin: 2% auto 6%;
    background-color: black;
    position: relative;
    padding: 10px 20px;
    border: 1px solid #9EB7FF;
    box-sizing: border-box;
}

/* --- HEADER & NAVIGATION --- */
#navtop {
    position: relative;
    top: 5px;
    margin: 3px auto 10px;
    width: 100%;
    padding: 10px 20px;
    background-color: #000000;
    border: 1px solid #9291D4;
    box-sizing: border-box;
}

#header {
    position: relative;
    top: 0px;
    width: 100%;
    padding: 10px 20px;
    background-image: url(../images/grad/h5_bleugrandeur3.jpg);	
    border: 1px solid #9291D4;
    font-family: 'Simonetta', serif;
    font-size: 18pt;
    text-shadow: 2px 2px 2px #000000;
    color: #FF9100;
    box-sizing: border-box;
}

/* --- MAIN LAYOUT (Replaces .maintable) --- */
.main-layout {
    width: 100%;
    max-width: 100%;
    background-image: url(../images/grad/h5_italy3b.jpg);
    border: 0px solid;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.content-block {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* --- SECTIONS SPECIFIC STYLES --- */

/* Quote Section */
.quote-section {
    border: 1px solid #6666FF;
    padding: 15px 2% 20px 2%;
    box-sizing: border-box;
}

.quote-container {
    display: flow-root; /* Modern clear-fix for floats */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.prem-image-wrapper {
    float: left;
    margin: 20px 20px 12px 0;
    max-width: 156px;
    width: 100%;
}

#prem-random-image {
    width: 156px;
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

#random-quote-wrapper {
    margin-left: 175px;
    font-family: 'Playfair Display', serif;
    font-size: 11pt;
    color: #F2C68A;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    padding-right: 10px;
    box-sizing: border-box;
}

/* Intro Section */
.intro-section {
    background-color: #000000;
    border: 1px solid #6666FF;
}

.intro-banner {
    max-width: 90%;
    min-width: 40%;
    height: auto;
    display: block;
    padding-top: 2%;
    padding-left: 3%;
}

#introtext {
    padding: 0% 5% 3%;
    font-size: 12pt;
    font-family: 'Playfair', serif;
    clear: both;
}

/* Dividers */
.divider {
    width: 100%;
    height: 12px;
    font-size: 0;
    line-height: 0;
    box-sizing: border-box;
}

/* Article Lists (Index Sections) */
.article-lists {
    background-color: #292929;
    border: 1px solid #6666FF;
}

/* --- INDEX CONTAINER & FLOATS --- */
.index-container {
    width: 100%;
    max-width: 900px;
    margin: 25px auto;
    overflow: hidden; /* Contains floats */
    font: 9pt 'Raleway', Arial, Helvetica, sans-serif;
    font-weight: 500;
}

.index1 {
    color: #E9D80E;
    margin: 0 auto 3%;
    text-align: center;
}

.index-image-right {
    float: right;
    margin: 5px 20px 15px 25px;
    max-width: 311px;
    min-width: 200px;
}

.index-image-left {
    float: left;
    margin: 5px 35px 10px 10px;
    max-width: 311px;
    min-width: 200px;
}

.index-image-right img,
.index-image-left img {
    max-width: 100%;
    min-width: 200px;
    height: auto;
    display: block;
    border: 1px solid #888888;
    margin-bottom: 20px;
}

ul.excerpt-list {
    margin-top: 4%;
    list-style-position: outside;
    margin-left: 0px;
}

li {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* --- GRADIENT STYLES --- */
.grad-blue-dark {
    background: #395b9b;
    background: linear-gradient(-45deg, #395b9b 0%, #002366 50%, #395b9b 100%);
}

.grad-body {
    background: #1b1b1b;
    background: linear-gradient(-45deg, #1b1b1b 0%, #383838 13%, #4e4e4e 24%, #0a0a0a 47%, #010101 50%, #0d0d0d 54%, #959595 100%);
}

.grad-dk-rainbow {
    background: #0a0031;
    background: linear-gradient(-45deg, #0a0031 0%, #582475 25%, #2e0a9e 50%, #0175c1 75%, #051989 100%);
}

.grad-dk-rbow-horiz {
    background: #051989;
    background: linear-gradient(to right, #051989 0%, #0175c1 25%, #2e0a9e 50%, #582475 75%, #0a0031 100%);
}

.grad-fontquote, .fontquote {
    background: #3E2C0F;
    background: linear-gradient(124deg, rgba(62, 44, 15, 1) 0%, rgba(59, 12, 9, 1) 50%, rgba(28, 15, 33, 1) 100%);
}

.gradientq {
    background: #3E2C0F;
    background: linear-gradient(124deg, rgba(62, 44, 15, 1) 0%, rgba(59, 12, 9, 1) 50%, rgba(28, 15, 33, 1) 100%);
}

/* Decorative Background Classes */
.mj {
    background-color: #666666;
    background-image: url(../images/grad/v2_dkgrey2.jpg);
    float: left;
    margin: 7px 7px 4px 4px;
}

.mj2 {
    background-color: #666666;
    background-image: url(../images/grad/v2_dkgrey2.jpg);
    float: left;
    left: 2px;
    top: 2px;
    position: relative;
    z-index: 1;
}

.mj3 {
    background-color: #666666;
    background-image: url(../images/grad/v2_dkgrey2.jpg);
    padding: 1%;
    border: 1px solid #6666FF;
}

/* --- LINK STYLES --- */
.link3small {
    font: bold 10px Arial, Helvetica, sans-serif;
    text-decoration: none;
}
a.link3small:link { color: #6699FF; }
a.link3small:visited { color: #6699CC; }
a.link3small:hover { color: #FFCC66; text-decoration: underline; }
a.link3small:active { color: #FBFAF9; text-decoration: underline; }

.link2 {
    font: 9pt Verdana, Arial, Helvetica, sans-serif;
    text-decoration: none;
}
a.link2:link { color: #F5BFB1; }
a.link2:visited { color: #F5BFB1; }
a.link2:hover { color: #F7ECB0; text-decoration: underline; }
a.link2:active { color: #ECCF79; }

.link1 {
    font: normal 8pt Verdana, Arial, Helvetica, sans-serif;
    text-decoration: none;
    color: #6699CC;
}
a.link1:link { color: #78A2BA; }
a.link1:visited { color: #78A2BA; }
a.link1:hover { color: #9ADBFA; text-decoration: underline; }
a.link1:active { color: #C9AAEE; }

.link-copy {
    font: bold normal 10px Verdana, Arial, Helvetica, sans-serif;
    text-decoration: none;
    color: #8B8B8B;
    letter-spacing: .1em;
}
a.link-copy:link { color: #8B8B8B; }
a.link-copy:visited { color: #8B8B8B; }
a.link-copy:hover { color: #5EA2D5; text-decoration: underline; }
a.link-copy:active { color: #C9AAEE; }

.link3 {
    font: bold 9pt Arial, Helvetica, sans-serif;
    text-decoration: none;
}
a.link3:link { color: #F3C769; }
a.link3:visited { color: #F3C769; }
a.link3:hover { color: #A5D1D0; text-decoration: underline; }
a.link3:active { color: #FBFAF9; text-decoration: underline; }

.link4 {
    font: 14px Raleway, Helvetica, Arial, sans-serif;
    text-decoration: none;
    color: #5B9EC7;
    font-weight: 400;
}
a.link4:link { color: #9B9CCA; }
a.link4:visited { color: #5B9EC7; }
a.link4:hover { color: #D189D8; text-decoration: underline; }
a.link4:active { color: #F59636; }

/* --- FONT STYLES --- */
.fontquote {
    font-family: 'Playfair Display', serif;
    font-size: 11pt;
    background-color: #000000;
    color: #F2C68A;
    margin-top: 0px;
    position: relative;
    z-index: 0;
}

.fontquote-large {
    font-family: 'Playfair Display', serif;
    font-size: 20pt;
    font-weight: normal;
    font-style: normal;
}

.fontquote-med {
    font-family: 'Playfair Display', serif;
    font-size: 14pt;
    font-weight: normal;
    font-style: italic;
}

.font-tangerine {
    font-family: 'Tangerine', serif;
    font-size: 36pt;
    text-shadow: 2px 2px 2px #000000;
    color: #FF9100;
}

.font-threedee {
    font-family: Garamond, serif;
    line-height: 1em;
    color: #f7ad0d;
    font-size: 52px;
    text-shadow: 0px 0px 0 rgb(202,128,-32), 1px 1px 0 rgb(158,84,-76), 2px 2px 0 rgb(113,39,-121), 3px 3px 0 rgb(68,-6,-166), 4px 4px 3px rgba(0,0,0,0.9), 4px 4px 1px rgba(0,0,0,0.5), 0px 0px 3px rgba(0,0,0,.2);
}

.font-forum {
    font-family: 'Forum', cursive;
    font-size: 12pt;
}

.playfair {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 12pt;
    font-style: normal;
}

.raleway {
    font-family: "Raleway", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* --- BOTTOM NAVIGATION (FLEXBOX) --- */
.flex-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-image: url('../images/grad/h5_italy3b.jpg');
    border: 1px solid #3FAAFD;
    box-sizing: border-box;
    min-height: 45px;
    margin-top: 10px;
}

.flex-nav-item {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.flex-nav-item:not(:last-child) {
    border-right: 1px solid rgba(63, 170, 253, 0.2);
}

/* --- RESPONSIVE MEDIA QUERIES (Integrated from resp-index.css) --- */

/* Tablet & Mobile Adjustments */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
	img {clear: both;
		text-align: center;
		margin: 2% auto;
		}
		
    /* Stack Index Images */
    .index-image-right,
    .index-image-left {
        float: none;
        margin: 0 auto 20px auto;
        text-align: center;
        max-width: 100%;
    }

    /* Reset quote wrapper margin on mobile if needed, though flow-root helps */
    #random-quote-wrapper {
        font-size: 12pt;
        padding: 0 5% 3%;
    }
    
        .prem-image-wrapper {
        float: none;
        margin: 15px auto 0;
        text-align: center;
        max-width: 148px;
    }
    
    #random-quote-wrapper {
        text-align: center;
        margin: 2% auto;
        width: 100%;
        padding: 0;
    }

    #introtext {
        padding: 0% 8% 5%;
    }

    /* Bottom Nav Stacking */
    .flex-nav-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .flex-nav-item {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(63, 170, 253, 0.2);
        padding: 15px 0;
        box-sizing: border-box;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 620px) {

	#wrapper {width: 95%; margin: 3% auto; }


    /* Ensure main layout padding doesn't cause overflow */
    .main-layout {
        padding: 0;
    }
    
    .content-block {
        padding: 0 !important;
    }

    .quote-section {
        padding: 10px 5% 15px 5% !important;
    }
}

@media (max-width: 500px) {
    .flex-nav-container {
        max-width: 100%;
        margin: auto auto;
    }
}

/* Image Safety Net */
img {
    max-width: 100%;
    height: auto;
    display: block;
}