/* General Body and Container Styles */
body {
    font-family: 'Roboto', sans-serif; /* Humanist Sans-Serif for body */
    line-height: 1.6;
    color: #3A4A58;
    background-color: #F0F0F0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif; /* Geometric grotesque for headings */
    color: #3A4A58;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem; /* Scale for H1 */
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

h2 {
    font-size: 2.5rem; /* Scale for H2 */
    font-weight: 600;
    margin-top: 1.2em;
    margin-bottom: 0.8em;
}

h3 {
    font-size: 1.8rem; /* Scale for H3 */
    font-weight: 500;
    margin-top: 1em;
    margin-bottom: 0.6em;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1em;
}

small {
    font-size: 0.85rem;
    color: #8C9CA7;
}

/* Header Styles */
.main-header {
    background-color: #3A4A58;
    color: #F0F0F0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-header .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #D9B38F !important;
    letter-spacing: 1px;
}

.main-header .navbar-nav .nav-link {
    color: #F0F0F0 !important;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

.main-header .navbar-nav .nav-link:hover,
.main-header .navbar-nav .nav-link.active {
    color: #D9B38F !important;
    border-bottom: 2px solid #D9B38F;
}

/* Footer Styles */
.main-footer {
    background-color: #3A4A58;
    color: #F0F0F0;
    padding: 3rem 0;
    font-size: 0.95rem;
    margin-top: 4rem;
    border-top: 5px solid #8C9CA7; /* Institutional character */
}

.main-footer a {
    color: #F0F0F0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: #D9B38F;
}

.main-footer .footer-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #D9B38F;
    margin-bottom: 1.5rem;
    display: block;
}

.main-footer h5 {
    color: #D9B38F;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.main-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-footer ul li {
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    color: #8C9CA7;
    font-size: 0.85rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

/* Section Spacing */
.section-padding {
    padding: 4rem 0;
}

.section-padding-lg {
    padding: 6rem 0;
}

.section-padding-sm {
    padding: 2rem 0;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1); /* Cinematic look */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Deep shadows */
    border-radius: 5px;
}

.hero-image {
    width: 100%;
    height: 600px; /* Fixed height for hero */
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1); /* Darker, more dramatic */
    box-shadow: none;
    border-radius: 0;
}

/* Buttons and CTA */
.btn-pylonex-primary {
    background-color: #D9B38F;
    color: #3A4A58;
    border: 2px solid #D9B38F;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-pylonex-primary:hover {
    background-color: #3A4A58;
    color: #D9B38F;
    border-color: #D9B38F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-pylonex-secondary {
    background-color: transparent;
    color: #3A4A58;
    border: 2px solid #8C9CA7;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-pylonex-secondary:hover {
    background-color: #8C9CA7;
    color: #F0F0F0;
    border-color: #8C9CA7;
}

/* Card Styles */
.card-pylonex {
    background-color: #F0F0F0;
    border: 1px solid #8C9CA7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure cards in a grid have same height */
}

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

.card-pylonex .card-body {
    padding: 1.5rem;
}

.card-pylonex .card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #3A4A58;
}

.card-pylonex .card-text {
    font-size: 1rem;
    color: #3A4A58;
}

.card-pylonex img {
    border-radius: 8px 8px 0 0;
    filter: brightness(0.9) contrast(1.05);
    box-shadow: none;
}

/* Specific Layout Patterns */
.two-column-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 768px) {
    .two-column-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .two-column-layout > div {
        flex: 1;
    }
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background-color: #D9B38F;
    border-radius: 50%;
    border: 2px solid #3A4A58;
    z-index: 1;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1rem;
    bottom: -1rem;
    width: 2px;
    background-color: #8C9CA7;
}

.timeline-item:last-child::after {
    display: none;
}

.glossary-rail-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .glossary-rail-container {
        flex-direction: row;
    }
    .glossary-rail-main {
        flex: 3;
        padding-right: 2rem;
    }
    .glossary-rail-sidebar {
        flex: 1;
        background-color: rgba(140, 156, 167, 0.1);
        padding: 1.5rem;
        border-radius: 8px;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    }
}

.glossary-rail-sidebar h4 {
    color: #3A4A58;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.glossary-rail-sidebar ul {
    list-style: none;
    padding: 0;
}

.glossary-rail-sidebar ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.glossary-rail-sidebar ul li strong {
    color: #D9B38F;
}

.stat-strip-item {
    background-color: #F0F0F0;
    border: 1px solid #8C9CA7;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.stat-strip-item .icon {
    font-size: 3rem;
    color: #D9B38F;
    margin-bottom: 0.5rem;
}

.error-list ul {
    list-style: none;
    padding: 0;
}

.error-list ul li {
    background-color: #F0F0F0;
    border-left: 5px solid #D9B38F;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
}

.error-list ul li::before {
    content: '\2716'; /* Cross icon */
    color: #D9B38F;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.2rem;
    line-height: 1;
}

.matrix-item {
    background-color: #3A4A58;
    color: #F0F0F0;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.matrix-item:hover {
    background-color: #8C9CA7;
}

.matrix-item h4 {
    color: #D9B38F;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.matrix-item p {
    color: #F0F0F0;
    font-size: 1rem;
}

/* Accordion (FAQ) */
.accordion .card {
    border: none;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.accordion .card-header {
    background-color: #F0F0F0;
    border-bottom: 1px solid #8C9CA7;
    padding: 0;
}

.accordion .btn-link {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    color: #3A4A58;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.accordion .btn-link:hover {
    color: #D9B38F;
}

.accordion .card-body {
    background-color: #F0F0F0;
    color: #3A4A58;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Cookie Banner */
#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #3A4A58;
    color: #F0F0F0;
    padding: 1rem 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    display: none; /* Hidden by default */
}

#cookieConsent .btn {
    margin-left: 0.5rem;
    margin-top: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

#cookieConsent .btn-accept {
    background-color: #D9B38F;
    color: #3A4A58;
    border-color: #D9B38F;
}

#cookieConsent .btn-accept:hover {
    background-color: #F0F0F0;
    color: #3A4A58;
    border-color: #F0F0F0;
}

#cookieConsent .btn-reject {
    background-color: #8C9CA7;
    color: #F0F0F0;
    border-color: #8C9CA7;
}

#cookieConsent .btn-reject:hover {
    background-color: #F0F0F0;
    color: #8C9CA7;
    border-color: #8C9CA7;
}

#cookieConsent .btn-more {
    background-color: transparent;
    color: #F0F0F0;
    border-color: #F0F0F0;
}

#cookieConsent .btn-more:hover {
    background-color: #F0F0F0;
    color: #3A4A58;
    border-color: #F0F0F0;
}

/* Forms */
.form-control {
    border: 1px solid #8C9CA7;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    background-color: #F0F0F0;
    color: #3A4A58;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #D9B38F;
    box-shadow: 0 0 0 0.2rem rgba(217, 179, 143, 0.25);
    outline: none;
}

.form-group label {
    font-weight: 500;
    color: #3A4A58;
    margin-bottom: 0.5rem;
    display: block;
}

.form-disclaimer {
    font-size: 0.9rem;
    color: #8C9CA7;
    margin-top: 1rem;
    border-left: 3px solid #D9B38F;
    padding-left: 1rem;
}

/* Utility Classes */
.text-accent {
    color: #D9B38F !important;
}

.bg-secondary-pylonex {
    background-color: #3A4A58;
    color: #F0F0F0;
}

.bg-light-pylonex {
    background-color: #F0F0F0;
    color: #3A4A58;
}

.border-accent {
    border-color: #D9B38F !important;
}

.border-neutral {
    border-color: #8C9CA7 !important;
}

.shadow-deep {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    .hero-image {
        height: 400px;
    }
    .main-header .navbar-brand {
        font-size: 1.5rem;
    }
    .main-header .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem;
    }
    .section-padding {
        padding: 2rem 0;
    }
    .section-padding-lg {
        padding: 3rem 0;
    }
    .main-footer {
        padding: 2rem 0;
    }
    .two-column-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .glossary-rail-container {
        flex-direction: column;
    }
    .glossary-rail-main, .glossary-rail-sidebar {
        padding-right: 0;
        padding-left: 0;
    }
    .timeline-item {
        padding-left: 1.5rem;
    }
}