@charset "utf-8";

/* ==========================================================================
   ROOT & GLOBAL PREFERENCES
   ========================================================================== */
:root {
    color-scheme: light !important;           /* Strongly prefer light appearance – helps Safari/iOS avoid dark tint/veil */
    --text-darkmode: #e8e8e8;             /* Fallback light text for dark mode tables */
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
body {
    background-color: #0f1e3a;                   /* medium-dark blue-gray – keeps mood but far less aggressive */
    background: linear-gradient(to bottom, #0d1b33 0%, #17294a 100%);  /* softer gradient */
    /* ... keep all other body rules ... */
    font-family: Verdana, Geneva, sans-serif;
    color: #003;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

a {
    color: #fff;
}

p a {
    color: #003;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
#header {
    background-image: url(../images/bgtop.png);
    background-repeat: repeat-x;
    height: auto;
    min-height: 211px;
    overflow: visible;
    padding-bottom: 0;
    margin-bottom: 0;
}

#logo a {
    background-image: url(../images/MSBlogo2.png);
    width: 570px;
    height: 87px;
    background-repeat: no-repeat;
    background-size: contain;
    text-indent: -9999px;
    position: relative;
    top: 68px;
    display: block;
    margin: 0 auto;
}

#nav {
    list-style: none;
    margin-top: 57px;
    margin-left: 0;
    position: relative;
    z-index: 6000;
    padding: 0;
    text-align: center;
}

#nav li {
    display: inline;
    margin-left: 10px;
    margin-right: 6px;
}

#nav li a {
    font-size: 12px;
    font-weight: bold;
    color: #ced0d4;
    text-decoration: none;
    padding: 8px 12px;
    display: inline-block;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
#mainarea {
    background-image: url(../images/bgcontent.png);
    background-repeat: repeat-x;
    background-position: top left;
    padding-bottom: 20px;
    margin-top: 0;
    padding-top: 0;
}

#homecontent {
    background-color: #fff;
    margin-top: 0;
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

/* Text visibility overrides */
#homecontent p,
#homecontent h2,
#homecontent h3 {
    color: #003 !important;
}

#homecontent a {
    color: #006 !important;
}

#homecontent p {
    font-size: 16px;
    margin: 0.8em 0;
}

#homecontent h2 {
    font-size: 38px;
    font-weight: lighter;
    margin: 0 0 0.5em 0;
    color: #003;
}

#homecontent h3 {
    font-size: 15px;
    margin: 0 0 0.3em 10px;
}

/* Contact-specific */
#contacttext {
    margin-left: 25px;
    margin-top: 0 !important;
    padding-top: 0 !important;
    font-size: 14px !important;
    font-weight: normal !important;
}

#contacttext a {
    color: #ced0d4;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
#footer {
    background-image: url(../images/footer.png);
    height: 91px;
    background-repeat: repeat-x;
}

#footer p {
    padding-top: 10px;
    margin: 0;
}

#copy,
#lala {
    font-size: 10px;
    color: #233245;
    margin: 0;
}

#lala a {
    color: #233245;
}

/* ==========================================================================
   REPERTOIRE TABLES
   ========================================================================== */
#tableheader1 {
    background-image: url(../images/tableheader1.png);
    background-repeat: repeat-x;
}

#tableheader2 {
    background-image: url(../images/tableheader2.png);
    background-repeat: repeat;
}

#operaticheader,
#orchestralheader {
    text-indent: -9999px;
    background-repeat: no-repeat;
}

#operaticheader {
    background-image: url(../images/smheader_operatic.png);
    height: 34px;
    width: 103px;
    margin: 3px 3px 0 0;
}

#orchestralheader {
    background-image: url(../images/smheader_orchestral.png);
    width: 248px;
    height: 28px;
    margin: 3px 3px 0 0;
}

.tablerow1,
.tablerow1a,
.tablerow2 {
    background-repeat: repeat-x;
}

.tablerow1 {
    background-image: url(../images/column1.png);
    height: 28px;
}

.tablerow1a {
    background-image: url(../images/colunm1a.png);
    height: 47px;
}

.tablerow1a td {
    padding-top: 6px;
}

.tablerow2 {
    background-image: url(../images/column2.png);
    height: 24px;
}

td {
    padding: 3px 5px;
}

/* Dark, readable table text (overrides light colors) */
#rep td,
#rep2 td,
.tablefontgrey,
.tablefontwhite {
    color: #003 !important;
    font-weight: bold !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE ADJUSTMENTS (optimized for iPhone/Safari)
   ========================================================================== */
@media only screen and (max-width: 767px) {

    /* Full-width, safe padding */
    .container_12,
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Force vertical stacking – text above image */
    [class*="grid_"],
    .grid_5.alpha,
    .grid_7.omega {
        width: 100% !important;
        float: none !important;
        margin: 0 0 30px 0 !important;
        clear: both !important;
    }

    /* Prevent overlap from earlier negative positioning */
    #homecontent {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 30px !important;
    }

    /* Responsive logo */
    #logo a {
        width: 100% !important;
        height: auto !important;
        background-size: contain !important;
        background-position: center !important;
        margin: 20px auto 15px auto !important;
        top: 0 !important;
    }

    /* Vertical nav with touch-friendly size */
    #nav {
        text-align: center !important;
        margin: 10px 0 30px 0 !important;
    }

    #nav li {
        display: block !important;
        margin: 12px 0 !important;
    }

    #nav a {
        padding: 12px 20px !important;
        display: block !important;
        font-size: 16px !important;
    }

    /* Images below text, never overlap */
    img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 20px auto !important;
    }

    /* Readable text sizes */
    body {
        font-size: 16px !important;
    }

    h2 {
        font-size: 28px !important;
    }

    h3 {
        font-size: 22px !important;
    }

    p {
        margin: 0 0 1.2em 0 !important;
    }

    /* Tables scroll if needed */
    table {
        width: 100% !important;
        min-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
}

/* Tablet (768–959px) – keep some 2-column layout if space allows */
@media only screen and (min-width: 768px) and (max-width: 959px) {
    .container_12 {
        width: 100% !important;
        padding: 0 10px !important;
    }

    .grid_7,
    .grid_5 {
        width: 48% !important;
        margin: 1% !important;
        float: left !important;
    }

    .grid_7.omega {
        float: right !important;
    }
}

/* Dark mode table text fix – ensures readability when browser forces dark theme */
@media (prefers-color-scheme: dark) {
    #rep td,
    #rep2 td,
    .tablefontgrey,
    .tablefontwhite {
        color: #f0f0f0 !important;  /* light gray – visible on darkened backgrounds */
    }

    #tableheader1 td,
    #tableheader2 td {
        color: #ffffff !important;
    }

    /* Prevent extreme darkening of column images */
    .tablerow1,
    .tablerow1a,
    .tablerow2 {
        filter: brightness(1.1) contrast(1.05) !important;
    }
}

/* Disable forced color inversion on tables */
#rep,
#rep2,
#rep td,
#rep2 td {
    color-scheme: light !important;
    forced-color-adjust: none !important;
}