/* Add Aptos Body font-face declarations */
@font-face {
  font-family: 'Aptos Body';
  src: url('https://c.s-microsoft.com/static/fonts/aptos/AptosBody-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aptos Body';
  src: url('https://c.s-microsoft.com/static/fonts/aptos/AptosBody-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* General resets */
*,
*:before,
*:after {
    box-sizing: border-box;
}

/* Apply Aptos Body to all elements and add smooth rendering */
html, body {
    font-family: 'Aptos Body', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-smooth: always;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* Update the existing body * selector to use Aptos Body */
body * {
    font-family: 'Aptos Body', 'Open Sans', sans-serif;
}

a {
    color: #5FBCEA;
}
a:active,
a:focus,
a:hover {
    color: #156A9C;
}

/* Layout and visibility */
.hidden {
    display: none !important;
}
.hr-logo,
.menu-box p,
header {
    position: relative;
}

/* Accessibility for SVG images in IE9 */
.ie9 img[src*=".svg"] {
    width: 100%;
}
@media screen and (-ms-high-contrast: active),
(-ms-high-contrast: none) {
    img[src*=".svg"] {
        width: 100%;
    }
}

/* Styling for headers with improved font rendering */
header h1,
header h3,
header p {
    color: #FFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header h1 {
    font-size: 3em;
    font-weight: 300;
    margin-bottom: 0;
    line-height: 100%;
}

/* Add smooth rendering to all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Aptos Body', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* Grey background styles - REMOVED */
.grey-bg {
    background-color: unset; /* Removed grey background */
}
.grey-bg blockquote,
.grey-bg h1,
.grey-bg h2,
.grey-bg h3,
.grey-bg h4,
.grey-bg h5,
.grey-bg h6,
.grey-bg li,
.grey-bg p,
.grey-bg ul,
section a.button,
section a.button:active,
section a.button:focus,
section a.button:hover {
    color: #FFF;
}

/* Links and buttons */
.grey-bg cite {
    color: #ABABAB;
}

/* Borders */
.border-grey-radius {
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Sidebars and columns */
.sidebar {
    background-color: #FAFAFA;
    padding: 0 0 32px;
}
.sidebar [class*=block-grid-] {
    margin-left: 1.1rem;
}

/* Capitalize text */
.text-capitalize {
    text-transform: capitalize;
}

/* Fixed size elements */
.fixed-size-100 {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    max-width: 100px;
    max-height: 100px;
}

/* Button and link styles for various sections */
.page-base a,
.page-school a,
.page-learning a,
.page-parent a,
.page-misc a {
    color: #A3CD42;
}
.page-base a:active,
.page-school a:active,
.page-learning a:active,
.page-parent a:active,
.page-misc a:active {
    color: #728F2E;
}
.page-school .side-nav li a:not(.button):active,
.page-learning .side-nav li a:not(.button):active,
.page-parent .side-nav li a:not(.button):active,
.page-misc .side-nav li a:not(.button):active {
    color: #728F2E;
}

/* Notification bar styling */
section.page-notification {
    background-color: #a3cd41;
    text-align: center;
}
section.page-notification p {
    margin: 0;
    padding: 2px;
}

/* Backgrounds */
.white-bg {
    background-color: #fff;
    border-radius: 0 0 50% 50%;
}
.header-base,
.header-school {
    background-color: #A3CD42;
}
.header-learning {
    background-color: #F58220;
}
.header-parent {
    background-color: #5FBCEA;
}
.header-misc {
    background-color: #EE3A80;
}

/* Hero section */
#homepage-hero {
    background: url() center center no-repeat fixed #5FBCEA;
    background-size: cover;
    padding: 30px 20px;
}
#homepage-hero h1 {
    font-weight: 700;
    text-shadow: 2px 2px 5px #000;
}
#homepage-hero h3 {
    text-shadow: 2px 2px 2px #000;
}

/* Twitter Widget */
#twitter-widget-0 {
    height: 450px !important;
}

/* Table styles */
.gridtable tr,
.gridtable td,
.gridtable th {
    border: 1px solid black;
}

/* Team member container */
.team-member-container .team-member {
    border-radius: 50%;
    display: block;
    width: 150px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2px;
}
.team-member-container p {
    margin-top: 5px;
}

/* Tick and Cross Mark Styles */
.cross-mark {
    color: red;
    font-size: 18px;
}
.tick-mark {
    color: green;
    font-size: 18px;
}

/* Ensure navigation also uses the smooth font rendering */
.top-bar, 
.top-bar-section ul li a {
    font-family: 'Aptos Body', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Additional font smoothing for dropdown menus */
.custom-dropdown-menu a {
    font-family: 'Aptos Body', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   MOBILE RESPONSIVE STYLES - Added June 2025
   ======================================== */

/* Mobile utility classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    background: #333;
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.mobile-menu-toggle:before {
    content: "☰ Menu";
}

/* Mobile styles (up to 767px) */
@media screen and (max-width: 767px) {
    
    /* Show/hide mobile elements */
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Header adjustments for mobile */
    header h1 {
        font-size: 2em; /* Reduced from 3em */
        text-align: center;
        padding: 10px;
    }
    
    #homepage-hero {
        padding: 20px 15px; /* Reduced padding */
        background-attachment: scroll; /* Remove fixed for mobile performance */
    }
    
    #homepage-hero h1 {
        font-size: 1.8em;
    }
    
    #homepage-hero h3 {
        font-size: 1.2em;
    }
    
    /* Navigation adjustments */
    .top-bar {
        background: #333;
    }
    
    .top-bar-section ul {
        display: none; /* Hidden by default, shown via JS */
        flex-direction: column;
        width: 100%;
        background: #333;
    }
    
    .top-bar-section ul.show {
        display: flex;
    }
    
    .top-bar-section ul li {
        width: 100%;
        border-bottom: 1px solid #555;
    }
    
    .top-bar-section ul li a {
        display: block;
        padding: 15px 20px;
        color: white;
        text-decoration: none;
    }
    
    /* Content and layout */
    .sidebar {
        margin-top: 20px;
        padding: 15px;
    }
    
    /* Make team member images smaller on mobile */
    .team-member-container .team-member {
        width: 100px;
        height: 100px;
    }
    
    /* Table responsive */
    .gridtable {
        font-size: 14px;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    /* Fixed size elements adjustment */
    .fixed-size-100 {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        max-width: 80px;
        max-height: 80px;
    }
    
    /* Twitter widget mobile */
    #twitter-widget-0 {
        height: 300px !important;
    }
    
    /* Foundation grid adjustments for mobile */
    .row {
        max-width: 100%;
        margin: 0 15px;
    }
    
    [class*="large-"], 
    [class*="medium-"], 
    [class*="small-"] {
        width: 100%;
        float: none;
    }
    
    /* Button adjustments */
    .button, 
    a.button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
        padding: 15px;
    }
    
    /* Notification bar mobile */
    section.page-notification {
        padding: 10px 15px;
    }
    
    section.page-notification p {
        font-size: 14px;
    }
}

/* ========================================
   IMPROVED MOBILE MENU STYLES
   ======================================== */
@media (max-width: 768px) {
    /* Enhanced mobile dropdown styling */
    .custom-dropdown-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        background-color: #2a2a2a !important; /* Darker background for better contrast */
        display: none !important;
        border-top: 2px solid #A3CD42 !important; /* Top border for visual separation */
        margin: 0 !important;
        animation: slideDown 0.3s ease-out;
    }
    
    .custom-dropdown.open .custom-dropdown-menu {
        display: block !important;
    }
    
    .custom-dropdown-menu a {
        padding: 16px 25px 16px 40px !important; /* Increased padding for better touch targets */
        background-color: #2a2a2a !important;
        border-left: 4px solid #A3CD42 !important; /* Thicker green border */
        border-bottom: 1px solid #444 !important; /* Subtle separator between items */
        font-size: 15px !important; /* Slightly larger text */
        color: #ffffff !important;
        text-decoration: none !important;
        display: block !important;
        position: relative !important;
        transition: all 0.2s ease !important; /* Smooth hover transition */
    }
    
    .custom-dropdown-menu a:hover,
    .custom-dropdown-menu a:focus {
        background-color: #A3CD42 !important; /* Green background on hover */
        color: #333 !important; /* Dark text on green background */
        border-left: 4px solid #ffffff !important; /* White border on hover */
        transform: translateX(4px) !important; /* Slight slide effect */
    }
    
    .custom-dropdown-menu a:last-child {
        border-bottom: none !important;
    }
    
    /* Add arrow indicator for submenu items */
    .custom-dropdown-menu a:before {
        content: "→" !important;
        margin-right: 8px !important;
        color: #A3CD42 !important;
        font-weight: bold !important;
    }
    
    .custom-dropdown-menu a:hover:before {
        color: #333 !important;
    }
    
    /* Improve main dropdown button styling on mobile */
    .custom-dropdown > a {
        position: relative !important;
        background-color: #333 !important;
        padding: 18px 20px !important; /* More padding */
        border-bottom: 1px solid #555 !important;
        font-size: 16px !important;
        transition: all 0.2s ease !important;
    }
    
    .custom-dropdown > a:hover {
        background-color: #444 !important;
    }
    
    /* Enhanced dropdown arrow */
    .custom-dropdown > a:after {
        content: "▼" !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 12px !important;
        color: #A3CD42 !important;
        transition: transform 0.3s ease !important;
    }
    
    .custom-dropdown.open > a:after {
        transform: translateY(-50%) rotate(180deg) !important; /* Rotate arrow when open */
        color: #ffffff !important;
    }
    
    .custom-dropdown.open > a {
        background-color: #A3CD42 !important;
        color: #333 !important;
    }
    
    /* Smooth slide animation for dropdowns */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Improve non-dropdown menu items */
    .top-bar-section ul li:not(.custom-dropdown) a {
        padding: 18px 20px !important;
        border-bottom: 1px solid #555 !important;
        font-size: 16px !important;
        transition: all 0.2s ease !important;
    }
    
    .top-bar-section ul li:not(.custom-dropdown) a:hover {
        background-color: #A3CD42 !important;
        color: #333 !important;
        transform: translateX(4px) !important;
    }
    
    /* Add visual feedback for touch */
    .custom-dropdown > a:active,
    .custom-dropdown-menu a:active {
        background-color: #728F2E !important;
    }
}

/* Tablet styles (768px to 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    
    header h1 {
        font-size: 2.5em;
    }
    
    #homepage-hero h1 {
        font-size: 2.2em;
    }
    
    .team-member-container .team-member {
        width: 120px;
        height: 120px;
    }
    
    /* Two column layout for tablets */
    .tablet-two-column {
        display: flex;
        gap: 20px;
    }
    
    .tablet-two-column > div {
        flex: 1;
    }
}

/* Large desktop (1024px and up) - keep existing styles */
@media screen and (min-width: 1024px) {
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .top-bar-section ul {
        display: flex !important;
        flex-direction: row;
    }
    
    /* Ensure desktop navigation works properly */
    .top-bar-section ul li {
        width: auto;
        border-bottom: none;
    }
}

/* Utility classes for responsive design */
@media screen and (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .margin-bottom-mobile {
        margin-bottom: 20px !important;
    }
}

@media screen and (min-width: 768px) {
    .hide-on-desktop {
        display: none !important;
    }
}