/* ==========================================================================
   Dartford Chess Club - Custom CSS Overrides
   Site-specific styling on top of the Polo template
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand Colours
   -------------------------------------------------------------------------- */
:root {
    --dcc-primary: #2c3e50;
    --dcc-accent: #e74c3c;
    --dcc-accent-dark: #c0392b;
    --dcc-light: #ecf0f1;
    --dcc-dark: #1a252f;
    --dcc-text: #333333;
    --dcc-text-light: #666666;
    --dcc-grey-bg: #f5f7fa;
    --dcc-border: #e0e0e0;
}

/* --------------------------------------------------------------------------
   Global Link & Text Overrides
   -------------------------------------------------------------------------- */
a:not(.btn):not(.badge):hover,
a:not(.btn):not(.badge):focus,
a:not(.btn):not(.badge):active {
    color: var(--dcc-accent);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dcc-primary);
}

/* --------------------------------------------------------------------------
   Button Overrides
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--dcc-accent);
    border-color: var(--dcc-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--dcc-accent-dark);
    border-color: var(--dcc-accent-dark);
}

.btn-rounded {
    background-color: var(--dcc-accent);
    border-color: var(--dcc-accent);
    color: #fff;
}

.btn-rounded:hover,
.btn-rounded:focus,
.btn-rounded:active {
    background-color: var(--dcc-accent-dark);
    border-color: var(--dcc-accent-dark);
    color: #fff;
}

.btn-light {
    color: var(--dcc-primary);
}

.btn-light:hover,
.btn-light:focus {
    background-color: var(--dcc-accent);
    border-color: var(--dcc-accent);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Logo Sizing
   -------------------------------------------------------------------------- */
#header .header-inner #logo img,
#header .header-inner .logo img {
    max-height: 36px;
    width: auto;
    transition: max-height 0.3s ease;
}

/* Logo size when header is scrolled/sticky */
#header.header-sticky.header-scrolled #logo img,
#header.header-sticky.header-scrolled .logo img {
    max-height: 36px;
}

/* --------------------------------------------------------------------------
   Navigation Overrides
   -------------------------------------------------------------------------- */
#mainMenu nav > ul > li.current > a,
#mainMenu nav > ul > li.current > span,
#mainMenu nav > ul > li:hover > a,
#mainMenu nav > ul > li:hover > span,
#mainMenu nav > ul > li:focus > a,
#mainMenu nav > ul > li:focus > span {
    color: var(--dcc-accent);
}

#mainMenu nav > ul > li > a {
    color: var(--dcc-primary);
    font-weight: 600;
}

/* Dropdown menu active/hover state */
#mainMenu nav > ul > li ul li:hover > a,
#mainMenu nav > ul > li ul li.current > a {
    color: var(--dcc-accent);
}

/* Topbar styling */
#topbar {
    background-color: var(--dcc-dark);
    color: #fff;
    font-size: 13px;
}

#topbar a {
    color: rgba(255, 255, 255, 0.85);
}

#topbar a:hover {
    color: #fff;
}

#topbar .social-icons ul li a {
    color: rgba(255, 255, 255, 0.85);
}

#topbar .social-icons ul li a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   Hero Slider - Text Readability
   -------------------------------------------------------------------------- */
.inspiro-slider .slide {
    position: relative;
}

/* Semi-transparent overlay for better text contrast */
.inspiro-slider .slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
}

.inspiro-slider .slide .container {
    position: relative;
    z-index: 2;
}

.inspiro-slider .slide .slide-captions {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.inspiro-slider .slide .slide-captions h1 {
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.inspiro-slider .slide .slide-captions p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

/* Hero slider buttons */
.inspiro-slider .slide .slide-captions .btn {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid #fff;
}

.inspiro-slider .slide .slide-captions .btn-light:hover {
    background-color: var(--dcc-accent);
    border-color: var(--dcc-accent);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Section Spacing Defaults
   -------------------------------------------------------------------------- */
section {
    padding: 60px 0;
}

section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dcc-primary);
}

section h2 + p {
    color: var(--dcc-text-light);
    font-size: 1.05rem;
}

/* Grey background sections */
section.background-grey,
.background-grey {
    background-color: var(--dcc-grey-bg);
}

/* --------------------------------------------------------------------------
   Call to Action Bar
   -------------------------------------------------------------------------- */
section.background-grey.text-center.p-t-60.p-b-40 h3 {
    color: var(--dcc-primary);
}

/* --------------------------------------------------------------------------
   Services / Activities Cards
   -------------------------------------------------------------------------- */
.col-lg-4.col-md-4 > a > img.img-fluid {
    border-radius: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.col-lg-4.col-md-4 > a > img.img-fluid:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.col-lg-4.col-md-4 h4 {
    margin-top: 5px;
    margin-bottom: 10px;
}

.col-lg-4.col-md-4 h4 a {
    color: var(--dcc-primary);
    font-weight: 600;
}

.col-lg-4.col-md-4 h4 a:hover {
    color: var(--dcc-accent);
}

/* --------------------------------------------------------------------------
   Statistics / Counter Section
   -------------------------------------------------------------------------- */
.counter.text-lg span {
    color: var(--dcc-accent);
    font-weight: 700;
    font-size: 3rem;
}

.counter + .lead {
    color: var(--dcc-primary);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Online Lessons Section
   -------------------------------------------------------------------------- */
section .col-lg-4.col-md-4.text-center.m-b-30 h4 {
    color: var(--dcc-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

section .col-lg-4.col-md-4.text-center.m-b-30 h4 i {
    color: var(--dcc-accent);
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Coaches / Team Members Section
   -------------------------------------------------------------------------- */
.team-members .team-member {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-members .team-member:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.team-members .team-member .team-desc {
    padding: 25px;
}

.team-members .team-member .team-desc h3 {
    color: var(--dcc-primary);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.team-members .team-member .team-desc span {
    color: var(--dcc-accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 12px;
}

.team-members .team-member .team-image img {
    object-position: top;
    width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   News / Blog Post Items
   -------------------------------------------------------------------------- */
.post-item.border {
    border: 1px solid var(--dcc-border) !important;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item.border:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-item .post-item-description h2 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-item .post-item-description h2 a {
    color: var(--dcc-primary);
}

.post-item .post-item-description h2 a:hover {
    color: var(--dcc-accent);
}

.post-meta-category a {
    background-color: var(--dcc-accent);
}

.item-link {
    color: var(--dcc-accent);
    font-weight: 600;
}

.item-link:hover {
    color: var(--dcc-accent-dark);
}

/* --------------------------------------------------------------------------
   Shop Preview Section
   -------------------------------------------------------------------------- */
.background-grey .text-center a img.img-fluid {
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.background-grey .text-center a img.img-fluid:hover {
    transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
#contact-form .form-control {
    border: 1px solid var(--dcc-border);
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form .form-control:focus {
    border-color: var(--dcc-accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    outline: none;
}

#contact-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

#contact-form label {
    font-weight: 600;
    font-size: 13px;
    color: var(--dcc-primary);
    margin-bottom: 6px;
}

#contact-form .required {
    color: var(--dcc-accent);
}

/* Contact info styling */
section h4 i.fa {
    color: var(--dcc-accent);
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Newsletter Section
   -------------------------------------------------------------------------- */
section[style*="background-color: #1a1a2e"] .form-control {
    border-radius: 4px 0 0 4px;
    border: none;
    padding: 12px 16px;
    height: 48px;
}

section[style*="background-color: #1a1a2e"] .btn {
    height: 48px;
    padding: 12px 24px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Form Input Focus States (Global)
   -------------------------------------------------------------------------- */
.form-control:focus {
    border-color: var(--dcc-accent);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

select.form-control:focus {
    border-color: var(--dcc-accent);
}

/* --------------------------------------------------------------------------
   Page Title Banner (Inner Pages)
   -------------------------------------------------------------------------- */
#page-title {
    background-color: var(--dcc-primary);
    padding: 60px 0;
}

#page-title .page-title h1 {
    color: #fff;
    font-weight: 600;
    font-size: 2.2rem;
}

#page-title .page-title span {
    color: rgba(255, 255, 255, 0.8);
}

#page-title .breadcrumb ul li a {
    color: rgba(255, 255, 255, 0.8);
}

#page-title .breadcrumb ul li a:hover {
    color: #fff;
}

#page-title .breadcrumb ul li + li::before {
    color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   Footer Styling
   -------------------------------------------------------------------------- */
#footer {
    background-color: var(--dcc-dark);
    color: rgba(255, 255, 255, 0.8);
}

#footer .footer-content {
    padding: 60px 0 40px;
}

#footer p {
    color: rgba(255, 255, 255, 0.7);
}

#footer a:not(.btn):not(:hover) {
    color: rgba(255, 255, 255, 0.7);
}

#footer a:not(.btn):hover {
    color: var(--dcc-accent);
}

#footer h1, #footer h2, #footer h3, #footer h4, #footer h5, #footer h6,
#footer .widget-title {
    color: #fff;
}

#footer .widget ul.list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 0;
}

#footer .widget ul.list li:last-child {
    border-bottom: none;
}

#footer .widget ul.list li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

#footer .widget ul.list li a:hover {
    color: var(--dcc-accent);
    padding-left: 3px;
    transition: padding-left 0.2s ease;
}

#footer .copyright-content {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer .copyright-content .copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

#footer .social-icons ul li a {
    color: rgba(255, 255, 255, 0.7);
}

#footer .social-icons ul li a:hover {
    color: var(--dcc-accent);
}

/* --------------------------------------------------------------------------
   Scroll to Top Button
   -------------------------------------------------------------------------- */
#scrollTop {
    background-color: var(--dcc-accent);
    color: #fff;
}

#scrollTop:hover {
    background-color: var(--dcc-accent-dark);
}

/* --------------------------------------------------------------------------
   Responsive: Tablet (max-width: 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    /* Logo smaller on tablets */
    #header .header-inner #logo img,
    #header .header-inner .logo img {
        max-height: 50px;
    }

    /* Hero slider adjustments */
    .inspiro-slider .slide .slide-captions h1 {
        font-size: 2.2rem;
    }

    .inspiro-slider .slide .slide-captions p {
        font-size: 1rem;
    }

    /* Section spacing reduced */
    section {
        padding: 50px 0;
    }

    /* Counter section stacks better */
    .col-lg-3.col-md-6.text-center.m-b-20 {
        margin-bottom: 30px;
    }

    /* Coach cards */
    .team-members .col-lg-6.col-md-6 {
        margin-bottom: 30px;
    }

    /* Page title */
    #page-title {
        padding: 50px 0;
    }

    #page-title .page-title h1 {
        font-size: 1.8rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive: Tablet Portrait (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Hero slider */
    .inspiro-slider .slide .slide-captions h1 {
        font-size: 1.8rem;
    }

    .inspiro-slider .slide .slide-captions p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .inspiro-slider .slide .slide-captions .btn {
        padding: 10px 22px;
        font-size: 13px;
    }

    /* Section headings */
    section h2 {
        font-size: 1.6rem;
    }

    /* Counter section - 2 per row on tablet */
    .counter.text-lg span {
        font-size: 2.4rem;
    }

    /* News items stack */
    .post-3-columns .post-item {
        width: 100%;
        margin-bottom: 30px;
    }

    /* Team member cards stack */
    .team-members .col-lg-6 {
        margin-bottom: 30px;
    }

    /* Contact form full width */
    #contact-form .col-md-6 {
        margin-bottom: 15px;
    }

    /* Footer columns stack */
    #footer .col-lg-4,
    #footer .col-lg-8 {
        text-align: center;
    }

    #footer .col-lg-8 .row .col-lg-4 {
        margin-bottom: 30px;
    }

    #footer .widget {
        margin-bottom: 20px;
    }

    /* Page title */
    #page-title {
        padding: 40px 0;
    }

    #page-title .page-title h1 {
        font-size: 1.5rem;
    }

    /* Shop preview items */
    .col-lg-4.col-md-4.m-b-30 {
        margin-bottom: 30px;
    }
}

/* --------------------------------------------------------------------------
   Responsive: Extra Small / Mobile (max-width: 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    /* Logo on small mobile */
    #header .header-inner #logo img,
    #header .header-inner .logo img {
        max-height: 40px;
    }

    /* Hero slider minimum height and text */
    .inspiro-slider {
        min-height: 360px;
    }

    .inspiro-slider .slide {
        min-height: 360px;
    }

    .inspiro-slider .slide .slide-captions h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .inspiro-slider .slide .slide-captions p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .inspiro-slider .slide .slide-captions .btn {
        padding: 8px 18px;
        font-size: 12px;
    }

    /* Section spacing */
    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.4rem;
    }

    /* CTA bar */
    section.background-grey.text-center.p-t-60.p-b-40 h3 {
        font-size: 1.2rem;
    }

    /* Counter section stacks fully */
    .counter.text-lg span {
        font-size: 2rem;
    }

    .counter + .lead {
        font-size: 0.85rem;
    }

    /* Services cards */
    .col-lg-4.col-md-4 {
        margin-bottom: 30px;
    }

    /* Online lessons icon boxes */
    section .col-lg-4.col-md-4.text-center.m-b-30 {
        margin-bottom: 25px;
    }

    /* Contact section */
    section .col-lg-4.col-md-5.m-b-30 {
        margin-bottom: 30px;
    }

    /* Newsletter section stacks */
    section[style*="background-color: #1a1a2e"] .col-lg-5,
    section[style*="background-color: #1a1a2e"] .col-lg-7 {
        text-align: center;
    }

    section[style*="background-color: #1a1a2e"] .d-flex {
        justify-content: center !important;
    }

    /* Page title */
    #page-title {
        padding: 30px 0;
    }

    #page-title .page-title h1 {
        font-size: 1.3rem;
    }
}

/* --------------------------------------------------------------------------
   Responsive: Extra Extra Small (max-width: 320px)
   -------------------------------------------------------------------------- */
@media (max-width: 320px) {
    /* Ensure hero slider still has minimum height */
    .inspiro-slider,
    .inspiro-slider .slide {
        min-height: 360px;
    }

    .inspiro-slider .slide .slide-captions h1 {
        font-size: 1.3rem;
    }

    .inspiro-slider .slide .slide-captions p {
        font-size: 0.8rem;
    }

    /* Further reduce section heading */
    section h2 {
        font-size: 1.25rem;
    }

    /* Counter section */
    .counter.text-lg span {
        font-size: 1.8rem;
    }

    /* Buttons */
    .btn-rounded {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* --------------------------------------------------------------------------
   Image Responsiveness (Prevent Overflow)
   -------------------------------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
}

.team-image img,
.post-image img,
.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --------------------------------------------------------------------------
   Utility: Smooth Transitions
   -------------------------------------------------------------------------- */
a,
.btn,
.form-control,
.team-member,
.post-item {
    transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   Shop Product Grid
   -------------------------------------------------------------------------- */
#product-grid .product-description {
    text-align: center;
    padding: 10px 0;
}
#product-grid .product-title {
    max-width: 100%;
    float: none;
}
#product-grid .product-title h5 {
    font-size: 14px;
    margin-top: 10px;
}
#product-grid .product-price {
    width: 100%;
    float: none;
    margin-top: 5px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Homepage Coaches & News - Consistent sizing
   -------------------------------------------------------------------------- */
.team-members .team-member .team-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
}
.team-members .col-lg-4 {
    display: flex;
}
.team-members .team-member {
    width: 100%;
}
#blog.post-3-columns .post-item {
    display: flex;
}
#blog.post-3-columns .post-item .post-item-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
}
#blog.post-3-columns .post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
}

/* Remove borders on news post items */
#blog.post-3-columns .post-item.border {
    border: none !important;
}
#blog.post-3-columns .post-item.border .post-item-wrap {
    border: none;
}

/* --------------------------------------------------------------------------
   Shop Cart - Product Thumbnail Alignment
   -------------------------------------------------------------------------- */
.cart-product-thumbnail img {
    max-width: 60px;
    float: left;
    margin-right: 12px;
}

.cart-product-thumbnail .cart-product-thumbnail-name {
    padding-top: 8px;
    display: block;
    overflow: hidden;
    font-weight: 600;
}

.cart-product-description {
    max-width: 200px;
    font-size: 12px;
}

.cart-product-description span {
    display: block;
}

.cart-product-quantity .minus,
.cart-product-quantity .plus {
    background-color: #fff;
    border: 1px solid #eee;
    margin: 0 -4px;
    padding: 5px 12px;
    cursor: pointer;
}

.cart-product-quantity .qty {
    border: 1px solid #eee;
    max-width: 40px;
    padding: 5px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Logo - remove vertical-align middle (from Bootstrap img rule)
   -------------------------------------------------------------------------- */
#header .header-inner #logo img,
#header #header-wrap #logo img {
    vertical-align: initial;
}

/* --------------------------------------------------------------------------
   Blog Post Carousel - consistent image height
   -------------------------------------------------------------------------- */
.post-image .carousel img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Shop Grid - consistent product image height
   -------------------------------------------------------------------------- */
#product-grid .product-image img {
    width: 100%;
    height: 300px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   Form placeholders - lighter so they're clearly distinct from real input
   -------------------------------------------------------------------------- */
.form-control::placeholder {
    color: #b0b0b0;
    opacity: 1;
}

.form-control::-webkit-input-placeholder {
    color: #b0b0b0;
}

.form-control::-moz-placeholder {
    color: #b0b0b0;
    opacity: 1;
}
