/* Custom Styles for Roman Holiday Website */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600;1,700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --primary-font: 'Open Sans', sans-serif;
    --heading-font: 'Merriweather', serif;
    --primary-color: #6D4C41; /* Earthy Brown */
    --secondary-color: #A1887F; /* Lighter Brown */
    --accent-color: #FF8A65; /* Warm Coral Accent */
    --text-color: #3E2723; /* Dark Brown for Text */
    --light-text-color: #F5F5F5;
    --background-light: #FDFEFE; /* Off-white */
    --background-dark: #3E2723; /* Dark Brown for Footer/Navbar */
    --card-bg: #FFFFFF;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

body {
    padding-top: 70px; /* Adjust for fixed navbar height */
    font-family: var(--primary-font);
    background-color: var(--background-light);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

.container.mt-5.mb-5 {
    flex: 1;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.site-title {
    font-family: var(--heading-font);
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.lead {
    font-size: 1.15rem;
    color: #5D4037; /* Slightly lighter text for lead paragraphs */
}

/* --- Navbar --- */
.navbar.bg-dark {
    background-color: var(--background-dark) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color) !important;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text-color) !important;
    transition: color var(--transition-speed);
}

.nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: var(--accent-color) !important;
}

.dropdown-menu {
    background-color: var(--background-dark);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
}

.dropdown-item {
    color: var(--light-text-color) !important;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-color);
    color: var(--light-text-color) !important;
}

/* --- Hero Section --- */
.hero-section {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.home-hero-section {
    background-image: url('../assets/images/home_background_new.jpeg');
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)); /* Darker gradient overlay */
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.site-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: var(--light-text-color);
}

.site-subtitle {
    font-size: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    color: var(--light-text-color);
}

/* --- Site Main Image (for individual site pages) --- */
.site-main-image {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-height: 500px;
    object-fit: cover;
    width: 100%;
}

/* --- Card Styling --- */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    background-color: var(--card-bg);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-img-top.placeholder-img-card {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    height: 180px;
    object-fit: cover;
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

.info-card .card-title i {
    color: var(--accent-color);
}

/* --- Carousel Styling --- */
.carousel-item img {
    max-height: 550px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--border-radius);
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.carousel-indicators li {
    background-color: var(--secondary-color);
}

.carousel-indicators .active {
    background-color: var(--accent-color);
}

/* --- Button Styling --- */
.custom-btn {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--light-text-color);
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-btn:hover {
    background-color: #E64A19; /* Darker Coral */
    border-color: #E64A19;
    color: var(--light-text-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

/* --- Fade-in Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scroll to Top Button --- */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background-color var(--transition-speed);
}

#scrollToTopBtn:hover {
    background-color: #E64A19; /* Darker Coral */
}

/* --- Footer --- */
.site-footer {
    background-color: var(--background-dark) !important;
    color: var(--secondary-color);
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: auto; /* Ensure footer is at the bottom */
}

.site-footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* --- Specific Section Styling --- */

/* Counters Section */
.counter-box {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: transform var(--transition-speed);
}

.counter-box:hover {
    transform: translateY(-5px);
}

.counter-box i {
    color: var(--accent-color);
}

.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Gallery Section (Home Page Lightbox) */
.gallery-item img {
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border-radius: var(--border-radius);
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* "Did You Know?" Snippets Section */
.fact-card {
    background-color: #FFF3E0; /* Light Orange/Yellow */
    border-left: 5px solid var(--accent-color);
}

.fact-card .card-text i {
    color: var(--accent-color);
}

/* Timeline Section */
.timeline {
    list-style: none;
    padding: 20px 0 20px;
    position: relative;
}

.timeline:before {
    top: 0;
    bottom: 0;
    position: absolute;
    content: " ";
    width: 3px;
    background-color: var(--secondary-color);
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:before,
.timeline-item:after {
    content: " ";
    display: table;
}

.timeline-item:after {
    clear: both;
}

.timeline-item .timeline-panel {
    width: 45%;
    float: left;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    box-shadow: var(--box-shadow);
    background-color: var(--card-bg);
}

.timeline-item .timeline-panel:before {
    position: absolute;
    top: 26px;
    right: -15px;
    display: inline-block;
    border-top: 15px solid transparent;
    border-left: 15px solid var(--secondary-color);
    border-right: 0 solid var(--secondary-color);
    border-bottom: 15px solid transparent;
    content: " ";
}

.timeline-item .timeline-panel:after {
    position: absolute;
    top: 27px;
    right: -14px;
    display: inline-block;
    border-top: 14px solid transparent;
    border-left: 14px solid var(--card-bg);
    border-right: 0 solid var(--card-bg);
    border-bottom: 14px solid transparent;
    content: " ";
}

.timeline-item .timeline-badge {
    color: #fff;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.4em;
    text-align: center;
    position: absolute;
    top: 16px;
    left: 50%;
    margin-left: -25px;
    background-color: var(--secondary-color);
    z-index: 100;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--background-light), inset 0 2px 0 rgba(0,0,0,.08), 0 3px 0 4px rgba(0,0,0,.05);
}

.timeline-item.timeline-item-inverted .timeline-panel {
    float: right;
}

.timeline-item.timeline-item-inverted .timeline-panel:before {
    border-left-width: 0;
    border-right-width: 15px;
    left: -15px;
    right: auto;
}

.timeline-item.timeline-item-inverted .timeline-panel:after {
    border-left-width: 0;
    border-right-width: 14px;
    left: -14px;
    right: auto;
}

.timeline-badge.primary { background-color: #2e6da4 !important; }
.timeline-badge.success { background-color: #3f903f !important; }
.timeline-badge.warning { background-color: #f0ad4e !important; }
.timeline-badge.danger  { background-color: #d9534f !important; }
.timeline-badge.info    { background-color: #5bc0de !important; }

.timeline-title {
    margin-top: 0;
    color: inherit;
    font-size: 1.5rem;
}

.timeline-body > p,
.timeline-body > ul {
    margin-bottom: 0;
}

.timeline-body > p + p {
    margin-top: 5px;
}

/* Modal Styling */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-header .close {
    color: var(--light-text-color);
    opacity: 0.8;
}

.modal-title {
    color: var(--light-text-color);
}

/* Quiz Section */
.quiz-card {
    background-color: #EFEBE9; /* Light Grayish Brown */
}

.quiz-question p {
    font-weight: 600;
}

#forumQuizResult, #stPetersQuizResult {
    font-weight: bold;
    margin-top: 1rem;
}

/* Reviews Section */
.review-card {
    background-color: var(--card-bg);
    border-left: 5px solid var(--secondary-color);
}

.review-card .blockquote-footer {
    color: var(--accent-color);
}

/* Contact Form & Attributions (About Page) */
#contactForm .form-group label {
    font-weight: 600;
}

.attributions-section .card {
    background-color: #FAFAFA; /* Very light gray */
}

/* Map Container (Catalog List Page) */
#map {
    height: 500px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-title {
        font-size: 2.5rem;
    }
    .site-subtitle {
        font-size: 1.2rem;
    }
    .timeline:before {
        left: 25px;
    }
    .timeline-item .timeline-panel {
        width: calc(100% - 60px);
        float: right;
    }
    .timeline-item .timeline-panel:before {
        border-left-width: 0;
        border-right-width: 15px;
        left: -15px;
        right: auto;
    }
    .timeline-item .timeline-panel:after {
        border-left-width: 0;
        border-right-width: 14px;
        left: -14px;
        right: auto;
    }
    .timeline-item .timeline-badge {
        left: 0;
        margin-left: 0;
    }
    .timeline-item.timeline-item-inverted .timeline-panel {
        float: right;
    }
}


