/*
 * ep-ponies – site template stylesheet
 *
 * Bootstrap 5.3 comes from the Joomla core. This file restores the look of the
 * old Bootstrap 4 site and styles the template, its modules and the content.
 *
 * Colours: #4b0a57 template purple, #e9ecef light grey background,
 * #0072ce jumping, #7c878e dressage, #00be6f eventing.
 *
 * Contents
 *  1. Base: typography and links
 *  2. Grid and Bootstrap 4 metrics
 *  3. Discipline colours
 *  4. Header and navigation
 *  5. Page title and breadcrumbs
 *  6. Home page: banners and buttons
 *  7. Home page: social block (Facebook, Instagram)
 *  8. Classes used in article and module content
 *  9. Articles, blog and tables
 * 10. Pagination
 * 11. Latest articles module (mod_articles)
 * 12. Partner banners (mod_banners)
 * 13. Forms and buttons of core views
 * 14. Joomla core icons
 * 15. Footer
 * 16. Error and offline pages
 */


/* ==========================================================================
   1. Base: typography and links
   ========================================================================== */

body {
    font-family: 'Lato', sans-serif !important;
}

a {
    color: #4b0a57;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #4b0a57;
    text-decoration: underline;
}

a:focus {
    outline: thin dotted;
    outline-offset: -2px;
}

/* Heading sizes of Bootstrap 4 (Bootstrap 5 scales them with the viewport) */
h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

.btn:hover,
.btn:focus {
    text-decoration: none;
}


/* ==========================================================================
   2. Grid and Bootstrap 4 metrics
   ========================================================================== */

/* 30 px gutters and a 1140 px maximum width, as on the old site */
.container,
.container-fluid,
.row {
    --bs-gutter-x: 30px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1140px;
    }
}

.content {
    min-height: 300px;
}


/* ==========================================================================
   3. Discipline colours
   ========================================================================== */

/* Colour strips: header, footer and home page banners */
.pasek-top {
    height: 8px;
}

.color-sj {
    background-color: #0072ce;
}

.color-dr {
    background-color: #7c878e;
}

.color-ev {
    background-color: #00be6f;
}


/* ==========================================================================
   4. Header and navigation
   ========================================================================== */

/* Menu colours and spacing of Bootstrap 4 */
.navbar {
    --bs-navbar-color: rgba(0, 0, 0, 0.5);
    --bs-navbar-hover-color: rgba(0, 0, 0, 0.7);
    --bs-navbar-active-color: rgba(0, 0, 0, 0.9);
    --bs-navbar-nav-link-padding-x: 0.5rem;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (max-width: 991.98px) {
    .navbar-expand-lg > .container {
        padding-right: 0;
        padding-left: 0;
    }
}

.nav-link:hover,
.nav-link:focus {
    text-decoration: none;
}

.navbar-nav .nav-item.active > .nav-link {
    color: var(--bs-navbar-active-color);
}

/* A parent link and its submenu button stay in one row */
.nav-item.dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.nav-item.dropdown > .dropdown-toggle {
    border: 0;
    background: none;
}

/* Social media icons */
.navbar-social-icon {
    --fa-width: auto;
    height: 48px;
    padding-top: 16px;
    padding-bottom: 3px;
    font-size: 1.33em;
    color: #4b0a57;
    vertical-align: middle;
}

/* Language switcher (overrides the core mod_languages stylesheet) */
.navbar .mod-languages {
    padding-bottom: 0.425rem;
    padding-top: 0.425rem;
}

.lang-inline {
    list-style: outside none none;
    margin: 0;
}

.lang-inline > li {
    display: inline;
    margin-left: 8px;
}

.navbar div.mod-languages li {
    margin: 0 5px;
}

.navbar div.mod-languages ul.lang-inline li {
    display: inline;
}

.navbar div.mod-languages ul li.lang-active {
    background-color: transparent;
}

.navbar div.mod-languages a {
    padding: 0;
}


/* ==========================================================================
   5. Page title and breadcrumbs
   ========================================================================== */

/* Page title header with a background image (replaces the Bootstrap 4 jumbotron) */
#bg-pasek-napis {
    display: block;
    width: 100%;
    height: 350px;
    margin-bottom: 37px;
    padding: 4rem 0;
    background-color: #e9ecef;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.mod-breadcrumbs.breadcrumb {
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}


/* ==========================================================================
   6. Home page: banners and buttons
   ========================================================================== */

/* Discipline banners with a caption strip */
.margin-5 {
    margin-left: 0;
    margin-right: 0;
    padding-left: 5px;
    padding-right: 5px;
}

.baner-odstemp-dol {
    margin-bottom: 15px;
}

.pasek-podpis {
    height: 45px;
    color: #fff;
    text-align: center;
}

/* Tile buttons (programme, competitors, Watch Live and others) */
#homepage-buttons {
    margin-top: 0;
    margin-bottom: 15px;
    background-color: #e9ecef;
}

.button1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    color: #4b0a57;
    background-color: #e9ecef;
    text-align: center;
    transition-duration: 0.4s;
}

.button1:hover,
.button1:focus {
    color: #baccdf;
    background-color: #4b0a57;
    text-decoration: none;
}

.button1 h4 {
    margin: 0.5rem 0 0;
}

@media (max-width: 767px) {
    .button1 {
        margin-top: 20px;
    }
}


/* ==========================================================================
   7. Home page: social block (Facebook, Instagram)
   ========================================================================== */

#features-block .block {
    width: 100%;
    height: calc(100% - 20px);
    margin: 0 0 20px;
    padding: 0;
    background-color: #e9ecef;
}

#features-block .block .header h4 {
    margin: 0;
    padding: 14px 0 0 5px;
    color: #4b0a57;
    font-size: 28px;
    font-weight: normal;
}

/* Purple link button under each block */
#features-block .button a {
    display: inline-block;
    height: 32px;
    margin: 10px 15px 0;
    padding: 0 15px;
    background-color: #4b0a57;
    color: #d9dee1;
    font-size: 14px;
    line-height: 32px;
    text-transform: uppercase;
}

#features-block .button a:hover,
#features-block .button a:focus {
    color: #fff;
    text-decoration: none;
}

#features-block .odstep {
    min-height: 20px;
}

#features-block .padding-soc {
    padding-right: 0;
    padding-left: 0;
}

/* Facebook page posts; js/facebook.js inserts the frame when the page opens.
   The minimum height keeps the page from jumping while the frame loads. */
#features-block .ep-facebook {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    padding: 10px 0 0;
    font-size: 14px;
}

#features-block .ep-facebook iframe {
    max-width: 100%;
}

/* Random Instagram photo */
#instafeed {
    padding: 10px 0 0;
    font-size: 12px;
}

#instafeed img {
    width: 225px;
}


/* ==========================================================================
   8. Classes used in article and module content
   Editors use these classes in existing articles and custom modules.
   ========================================================================== */

/* Bootstrap 4 utility class */
.font-weight-bold {
    font-weight: 700 !important;
}

/* Discipline buttons */
.button-jumping,
.button-dressage,
.button-eventing {
    padding: 10px 20px;
    border: none;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
}

.button-jumping {
    background: #0072ce;
}

.button-dressage {
    background: #7c878e;
}

.button-eventing {
    background: #00be6f;
}

.button-jumping:hover,
.button-dressage:hover,
.button-eventing:hover {
    text-decoration: none;
}

/* Discipline rows of the programme table (cells: see section 9) */
.table-program-sj,
.table-program-dr,
.table-program-ev {
    color: #fff;
}

.table-program-sj {
    background-color: #0072ce;
}

.table-program-dr {
    background-color: #7c878e;
}

.table-program-ev {
    background-color: #00be6f;
}

/* Purple buttons */
.btn-fiolet,
.btn-fiolet-full {
    border-color: #4b0a57;
    background-color: #4b0a57;
    color: #fff;
    font-weight: bold;
}

.btn-fiolet {
    font-size: 0.575rem;
}

.btn-fiolet-full {
    margin-bottom: 10px;
    font-size: 12px;
}

.btn-fiolet:hover,
.btn-fiolet:focus,
.btn-fiolet-full:hover,
.btn-fiolet-full:focus {
    border-color: #4b0a57;
    background-color: #4b0a57;
    color: #212529;
}

/* Larger text, kept from the old stylesheet */
.navbar-data {
    font-size: 20px;
}

/* Timetable module */
#timetable .custom h4 {
    margin: 0;
    padding: 8px 0 8px 20px;
    color: #ed1c24;
    font-size: 20px;
    font-weight: normal;
}

#timetable .custom p {
    padding-left: 20px;
}

/* Responsive 16:9 video frames */
.video-container-sg {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.video-container {
    position: relative;
    overflow: hidden;
    max-width: 522px;
    height: 0;
    margin: auto;
    padding-top: 30px;
    padding-bottom: 56.25%;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Purple line under section headings */
.bottom-line {
    width: 200px;
    height: 3px;
    margin-top: 20px;
    margin-bottom: 40px;
    border: 0;
    background-color: #4b0a57;
}

.ramka img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   9. Articles, blog and tables
   ========================================================================== */

.item-image {
    margin-bottom: 20px;
}

.com-content-article__body img,
.blog-item img {
    max-width: 100%;
    height: auto;
}

/* Images from 600 px wide stretch to the text width (set by js/images.js) */
.ep-image-wide {
    width: 100%;
}

/* Table cells with Bootstrap 4 spacing and lines */
.table > :not(caption) > * > * {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-width: 0;
}

/* Programme rows: Bootstrap 5 sets the cell background, so these need a more specific selector */
.table .table-program-sj,
.table .table-program-sj > * {
    background-color: #0072ce;
    color: #fff;
}

.table .table-program-dr,
.table .table-program-dr > * {
    background-color: #7c878e;
    color: #fff;
}

.table .table-program-ev,
.table .table-program-ev > * {
    background-color: #00be6f;
    color: #fff;
}

/* The blog page counter stands before the pagination list.
   The core utility classes need !important to be overridden. */
.w-100:has(> .counter) {
    display: flex;
    flex-wrap: wrap;
}

.w-100 > .counter {
    float: none !important;
    margin: 0;
    padding-top: 0 !important;
    padding-right: 0 !important;
}

.readmore .icon-chevron-right {
    margin-right: .35em;
}


/* ==========================================================================
   10. Pagination
   Template colour and the icons of the old site.
   ========================================================================== */

.pagination {
    --bs-pagination-color: #4b0a57;
    --bs-pagination-hover-color: #4b0a57;
    --bs-pagination-hover-bg: #e9ecef;
    --bs-pagination-focus-color: #4b0a57;
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(75, 10, 87, .25);
    --bs-pagination-active-bg: #4b0a57;
    --bs-pagination-active-border-color: #4b0a57;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
    text-decoration: none;
}

.pagination .icon-angle-double-left::before {
    content: "\f049";
}

.pagination .icon-angle-left::before {
    content: "\f04a";
}

.pagination .icon-angle-right::before {
    content: "\f04e";
}

.pagination .icon-angle-double-right::before {
    content: "\f050";
}


/* ==========================================================================
   11. Latest articles module (mod_articles)
   Styled like the old news columns: 1 column, 2 from 576 px, 4 from 992 px.
   ========================================================================== */

.moduletable:has(> .mod-articles-grid) {
    margin: 20px 0;
}

.moduletable:has(> .mod-articles-grid) > h3 {
    margin: 0 0 16px;
    padding: 0 8px 4px;
    border-bottom: 3px solid #e9ecef;
    color: #4b0a57;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    text-align: left;
    text-transform: uppercase;
}

.moduletable .mod-articles-grid {
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.moduletable .mod-articles-grid.grid-cols-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .moduletable .mod-articles-grid.grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .moduletable .mod-articles-grid.grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.mod-articles-grid > li,
.mod-articles-grid .mod-articles-item {
    display: flex;
    min-width: 0;
}

/* Item order: date, image, title, intro text, read more */
.mod-articles-grid .mod-articles-item-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.mod-articles-item-content > dl {
    display: flex;
    flex-wrap: wrap;
    order: 1;
    justify-content: flex-end;
    gap: 0 10px;
    margin: 0 4px 3px 0;
    font-size: 11px;
    line-height: 20px;
}

.mod-articles-item-content > dl dd {
    margin: 0;
}

/* Font size 0 removes the empty line that a space before the image adds in some articles. */
.mod-articles-item-content > p:has(> img) {
    order: 2;
    margin: 0;
    font-size: 0;
    line-height: 0;
}

.mod-articles-item-content > p > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 5px solid #f3f3f3;
    border-radius: 3px;
    box-shadow: 0 0 3px #d6d6d6;
    font-size: 14px;
    line-height: 18px;
    object-fit: cover;
}

.mod-articles-item-content > .mod-articles-title {
    order: 3;
    margin: 10px 0 8px;
    padding: 0 4px;
    font-size: 16px;
    font-weight: bold;
    line-height: 22px;
}

.mod-articles-item-content > .mod-articles-title a {
    text-decoration: none;
}

.mod-articles-item-content > .mod-articles-title a:hover,
.mod-articles-item-content > .mod-articles-title a:focus {
    text-decoration: underline;
}

.mod-articles-item-content > p:not(:has(> img), .readmore) {
    order: 4;
    margin: 0 4px 12px;
    color: #505050;
    font-size: 14px;
    line-height: 18px;
}

.mod-articles-item-content > .readmore {
    order: 5;
    margin: auto 4px 0;
}


/* ==========================================================================
   12. Partner banners (mod_banners on position "partnerzy")
   The template override html/mod_banners/default.php uses ep-partners classes,
   because ad blockers hide the core banneritem class.
   1 banner per row on phones, 3 from 768 px. Images fill their column;
   a 2:1 box keeps rows even when logos have other proportions.
   ========================================================================== */

#partners-block .moduletable {
    margin: 20px 0;
}

#partners-block .moduletable > h3 {
    margin: 0 0 16px;
    padding: 0 8px 4px;
    border-bottom: 3px solid #e9ecef;
    color: #4b0a57;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    text-transform: uppercase;
}

#partners-block .ep-partners {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

@media (min-width: 768px) {
    #partners-block .ep-partners {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

#partners-block .ep-partners__header,
#partners-block .ep-partners__footer {
    grid-column: 1 / -1;
}

#partners-block .ep-partners__item a {
    display: block;
}

#partners-block .ep-partners__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: contain;
}


/* ==========================================================================
   13. Forms and buttons of core views
   Contact, login, search and tags.
   ========================================================================== */

/* Primary buttons in the Bootstrap 4 blue of the old site */
.btn-primary {
    --bs-btn-bg: #007bff;
    --bs-btn-border-color: #007bff;
    --bs-btn-hover-bg: #0069d9;
    --bs-btn-hover-border-color: #0062cc;
    --bs-btn-active-bg: #0062cc;
    --bs-btn-active-border-color: #005cbf;
    --bs-btn-disabled-bg: #007bff;
    --bs-btn-disabled-border-color: #007bff;
}

.control-group {
    margin-bottom: 1rem;
}

.control-label label {
    margin-bottom: .25rem;
}

input.inputbox {
    flex: 1 1 auto;
    min-width: 15rem;
    padding: .375rem .75rem;
    border: 1px solid #dee2e6;
    border-radius: .375rem 0 0 .375rem;
}


/* ==========================================================================
   14. Joomla core icons
   The core maps icon-* classes in its own Font Awesome stylesheet, which the
   template does not load. Codes are taken from that stylesheet and use
   Font Awesome 7 from the template media.
   ========================================================================== */

[class^="icon-"]::before,
[class*=" icon-"]::before {
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
}

.icon-fw {
    display: inline-block;
    width: 1.25em;
    text-align: center;
}

.icon-address::before { content: "\f2b9"; }
.icon-angle-double-left::before { content: "\f100"; }
.icon-angle-double-right::before { content: "\f101"; }
.icon-angle-down::before { content: "\f107"; }
.icon-angle-left::before { content: "\f104"; }
.icon-angle-right::before { content: "\f105"; }
.icon-backward-2::before { content: "\f359"; }
.icon-ban-circle::before { content: "\f056"; }
.icon-calendar::before { content: "\f073"; }
.icon-cancel-2::before,
.icon-times::before { content: "\f00d"; }
.icon-check::before { content: "\f00c"; }
.icon-chevron-right::before { content: "\f054"; }
.icon-edit::before,
.icon-pencil::before { content: "\f044"; }
.icon-envelope::before { content: "\f0e0"; }
.icon-eye::before { content: "\f06e"; }
.icon-eye-slash::before { content: "\f070"; }
.icon-fax::before { content: "\f1ac"; }
.icon-file::before { content: "\f15b"; }
.icon-folder::before { content: "\f07b"; }
.icon-folder-open::before { content: "\f07c"; }
.icon-globe::before { content: "\f0ac"; }
.icon-home::before { content: "\f015"; }
.icon-info-circle::before { content: "\f05a"; }
.icon-list::before { content: "\f03a"; }
.icon-lock::before { content: "\f023"; }
.icon-mobile::before { content: "\f3ce"; }
.icon-phone::before { content: "\f098"; }
.icon-plus::before,
.icon-plus-2::before { content: "+"; }
.icon-question-sign::before { content: "?"; }
.icon-refresh::before { content: "\f021"; }
.icon-search::before { content: "\f002"; }
.icon-search-plus::before { content: "\f00e"; }
.icon-sort::before { content: "\f0dc"; }
.icon-star::before { content: "\f005"; }
.icon-trash::before { content: "\f1f8"; }
.icon-user::before { content: "\f007"; }
.icon-user-edit::before { content: "\f4ff"; }


/* ==========================================================================
   15. Footer
   ========================================================================== */

.footer {
    background-color: #4b0a57;
}

.footer a {
    color: #fff;
}

.footer.text-muted {
    color: #6c757d !important;
}


/* ==========================================================================
   16. Error and offline pages (error.php, offline.php)
   ========================================================================== */

.ep-system-card {
    max-width: 40rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    text-align: center;
}

.ep-system-card img {
    margin-bottom: 1.5rem;
}

.ep-system-card h1 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.ep-system-card form {
    margin-top: 2rem;
}
