/*
 Theme Name:   Redruth Divi Child
 Theme URI:    https://www.redruth-tc.gov.uk
 Description:  Redruth Town Council child theme based on Divi
 Author:        thstudio
 Author URI:    https://www.thstudio.co.uk
 Template:      Divi
 Version:       1.0.0
 License:       GNU General Public License v2 or later
 License URI:   http://www.gnu.org/licenses/gpl-2.0.html
*/

@import url("../Divi/style.css");

/* Add your custom CSS below this line */


/*
 * Redruth Town Council — Divi Child Theme
 * Interim site styles
 * 
 * Brand colours:
 * Primary red:   #C8102E
 * Dark:          #1a1a1a
 * Mid grey:      #555555
 * Light grey:    #f5f5f5
 * Border grey:   #e0e0e0
 * White:         #ffffff
 */


/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    z-index: 9999999;
    padding: 12px 24px;
    background: #C8102E;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border-bottom-right-radius: 4px;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #1a1a1a;
    outline-offset: -4px;
}


/* ============================================================
   FOCUS STYLES
   ============================================================ */
:focus-visible {
    outline: 3px solid #C8102E;
    outline-offset: 3px;
    border-radius: 2px;
}

/* White focus ring on red/dark backgrounds */
#main-header a:focus-visible,
#top-header a:focus-visible,
.et_pb_section--dark a:focus-visible,
.et_pb_fullwidth_header a:focus-visible,
.et_pb_section.red-bg a:focus-visible,
footer a:focus-visible,
#et-footer-nav a:focus-visible {
    outline-color: #ffffff;
}


/* ============================================================
   GLOBAL TYPOGRAPHY
   ============================================================ */
body {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }

/* Divi heading overrides */
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3 {
    color: #1a1a1a;
}


/* ============================================================
   COLOURS — DIVI GLOBAL OVERRIDES
   ============================================================ */

/* Primary accent */
.et_pb_button,
.et_pb_promo_button,
a.et_pb_button {
    background-color: #C8102E !important;
    border-color: #C8102E !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 12px 28px !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
}

.et_pb_button:hover,
a.et_pb_button:hover {
    background-color: #a00d24 !important;
    border-color: #a00d24 !important;
    transform: translateY(-1px) !important;
}

/* Secondary/outline button */
.et_pb_button.btn-outline,
a.et_pb_button.btn-outline {
    background-color: transparent !important;
    border-color: #C8102E !important;
    color: #C8102E !important;
}
.et_pb_button.btn-outline:hover,
a.et_pb_button.btn-outline:hover {
    background-color: #C8102E !important;
    color: #ffffff !important;
}


/* ============================================================
   HEADER
   ============================================================ */
#main-header {
    border-bottom: 4px solid #C8102E;
    background: #ffffff !important;
}

#main-header .et-menu-nav > ul > li > a,
#main-header .et_pb_menu__menu > nav > ul > li > a {
    color: #1a1a1a !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 0 16px !important;
}

#main-header .et-menu-nav > ul > li > a:hover {
    color: #C8102E !important;
}

/* Active menu item */
#main-header .et-menu-nav > ul > li.current-menu-item > a,
#main-header .et-menu-nav > ul > li.current-menu-ancestor > a {
    color: #C8102E !important;
}

/* Dropdown menus */
#main-header .et-menu-nav ul .sub-menu {
    background: #C8102E !important;
    border-top: 3px solid #a00d24 !important;
}
#main-header .et-menu-nav ul .sub-menu a {
    color: #ffffff !important;
    font-size: 14px !important;
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}
#main-header .et-menu-nav ul .sub-menu a:hover {
    background: #a00d24 !important;
    color: #ffffff !important;
}

/* Top bar */
#top-header {
    background: #1a1a1a !important;
    font-size: 13px !important;
}
#top-header a {
    color: #ffffff !important;
}
#top-header a:hover {
    color: #f0b8c0 !important;
}

/* Mobile hamburger */
#et_mobile_nav_menu .mobile_menu_bar:before {
    color: #C8102E !important;
}

/* Mobile menu */
.et_mobile_menu {
    background: #C8102E !important;
    border-top: 3px solid #a00d24 !important;
}
.et_mobile_menu li a {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}
.et_mobile_menu .menu-item-has-children > a:after {
    border-top-color: #ffffff !important;
}


/* ============================================================
   PAGE HEADER / HERO SECTIONS
   ============================================================ */

/* Standard page banner */
.page-banner {
    background-color: #C8102E;
    padding: 60px 0 !important;
}
.page-banner h1 {
    color: #ffffff !important;
    font-size: 2.6rem !important;
    margin: 0 !important;
}
.page-banner .cornish-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    font-style: italic;
    margin-top: 6px;
    display: block;
}

/* Full width hero on homepage */
.et_pb_fullwidth_header.home-hero {
    background-color: #1a1a1a !important;
}
.et_pb_fullwidth_header.home-hero .et_pb_fullwidth_header_subhead {
    color: rgba(255,255,255,0.85) !important;
}


/* ============================================================
   SECTIONS
   ============================================================ */

/* Light grey alternate sections */
.et_pb_section.section-grey {
    background-color: #f5f5f5 !important;
}

/* Red accent sections */
.et_pb_section.section-red {
    background-color: #C8102E !important;
}
.et_pb_section.section-red h2,
.et_pb_section.section-red h3,
.et_pb_section.section-red p,
.et_pb_section.section-red li {
    color: #ffffff !important;
}
.et_pb_section.section-red .et_pb_button {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #C8102E !important;
}

/* Dark sections */
.et_pb_section.section-dark {
    background-color: #1a1a1a !important;
}
.et_pb_section.section-dark h2,
.et_pb_section.section-dark h3,
.et_pb_section.section-dark p,
.et_pb_section.section-dark li {
    color: #ffffff !important;
}


/* ============================================================
   QUICK LINK / SERVICE CARDS (Divi Blurb module)
   ============================================================ */
.et_pb_blurb {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom: 4px solid #C8102E !important;
    border-radius: 4px;
    padding: 28px 24px !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.et_pb_blurb:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.et_pb_blurb .et_pb_module_header {
    color: #C8102E !important;
    font-size: 1.1rem !important;
    margin-bottom: 10px !important;
}
.et_pb_blurb_description {
    font-size: 14px !important;
    color: #555555 !important;
}
.et_pb_blurb .et_pb_button {
    margin-top: 16px !important;
    font-size: 13px !important;
    padding: 8px 20px !important;
}


/* ============================================================
   MEETINGS TABLE
   ============================================================ */
.meetings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 20px 0 30px;
}
.meetings-table thead tr {
    background: #C8102E;
    color: #ffffff;
}
.meetings-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.meetings-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.15s ease;
}
.meetings-table tbody tr:hover {
    background: #fdf0f2;
}
.meetings-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}
.meetings-table tbody tr:nth-child(even):hover {
    background: #fdf0f2;
}
.meetings-table td {
    padding: 12px 16px;
    vertical-align: middle;
}
.meetings-table .download-link {
    display: inline-block;
    padding: 5px 14px;
    background: #C8102E;
    color: #ffffff !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.meetings-table .download-link:hover {
    background: #a00d24;
}

/* Divi Table module override */
.et_pb_table table thead tr {
    background: #C8102E !important;
    color: #ffffff !important;
}
.et_pb_table table thead th {
    color: #ffffff !important;
    font-weight: 700 !important;
}
.et_pb_table table tbody tr:hover {
    background: #fdf0f2 !important;
}


/* ============================================================
   NOTICES / ALERT BOXES
   ============================================================ */
.notice-box {
    background: #fff8e1;
    border-left: 5px solid #C8102E;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-size: 15px;
}
.notice-box strong {
    color: #C8102E;
}


/* ============================================================
   DOCUMENT DOWNLOAD LINKS
   ============================================================ */
.doc-download-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.doc-download-list li {
    margin-bottom: 8px;
}
.doc-download-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #C8102E !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.doc-download-list a:before {
    content: "↓";
    font-weight: 900;
    font-size: 14px;
}
.doc-download-list a:hover {
    background: #fdf0f2;
    border-color: #C8102E;
}


/* ============================================================
   DISCOVER REDRUTH BANNER
   ============================================================ */
.discover-banner {
    background: #1a1a1a !important;
    text-align: center;
    padding: 40px 0 !important;
}
.discover-banner p {
    color: rgba(255,255,255,0.85) !important;
    font-size: 1.1rem !important;
    margin-bottom: 20px !important;
}
.discover-banner .et_pb_button {
    background: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
}
.discover-banner .et_pb_button:hover {
    background: #ffffff !important;
    color: #1a1a1a !important;
}


/* ============================================================
   FOOTER
   ============================================================ */
#footer-widgets {
    background: #1a1a1a !important;
    padding: 50px 0 30px !important;
}
#footer-widgets h4.widgettitle {
    color: #ffffff !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-bottom: 2px solid #C8102E !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
}
#footer-widgets .widget p,
#footer-widgets .widget li,
#footer-widgets .widget address {
    color: rgba(255,255,255,0.75) !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}
#footer-widgets .widget a {
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
#footer-widgets .widget a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}
#footer-widgets ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#footer-widgets ul li {
    padding: 3px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}

/* Bottom footer bar */
#et-footer-nav {
    background: #111111 !important;
}
#et-footer-nav .bottom-nav,
#et-footer-nav .bottom-nav a {
    color: rgba(255,255,255,0.55) !important;
    font-size: 12px !important;
}
#et-footer-nav .bottom-nav a:hover {
    color: #ffffff !important;
}
.et_pb_footer_divider {
    border-color: rgba(255,255,255,0.1) !important;
}


/* ============================================================
   CORNISH SUBTITLE UTILITY
   ============================================================ */
.cornish {
    font-style: italic;
    color: #888888;
    font-size: 0.9em;
    display: block;
    margin-top: 4px;
}
h1 + .cornish,
h2 + .cornish {
    margin-top: -12px;
    margin-bottom: 20px;
}


/* ============================================================
   SCREEN READER ONLY UTILITY
   ============================================================ */
.sr-only {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }

    .page-banner {
        padding: 40px 0 !important;
    }
    .page-banner h1 {
        font-size: 2rem !important;
    }

    .meetings-table {
        font-size: 13px;
    }
    .meetings-table thead th,
    .meetings-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 767px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .meetings-table thead {
        display: none;
    }
    .meetings-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        border-bottom: 4px solid #C8102E !important;
    }
    .meetings-table td {
        display: block;
        text-align: left;
        padding: 8px 14px;
    }
    .meetings-table td:before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        color: #C8102E;
        letter-spacing: 0.05em;
        margin-bottom: 2px;
    }
}


/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}