/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    background-color: #000000;  /* Ensure black background */
    padding-top: 0;
    min-height: 100vh; /* Ensure body covers full viewport height */
}

/* THE STYLING CODE FOR THE MENU BOX  */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    /*background: rgb(0, 0, 0); /* White background */
    background-color: #1a1a2e;
    background-image: linear-gradient(to right, #1a1a2e, #16213e);
    color: rgb(0, 0, 0); /* Black text */
    padding: 30px 0 0 0;  /* Add padding to the top of header instead */
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    /* Removed position property entirely */
    z-index: 1000; /* Ensure header is above background */
}


.logo {
    width: 100%; /* Adjust size as needed */
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 40px; /* Center the logo and add spacing */
}

/*header h1 {
    display: none; /* Hide the old h1 text, since the logo replaces it */
/*}

header p {
    font-size: 1.2em;
    font-weight: 300;
}*/


nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    background-color: #101820;
    padding: 5px 40px;  /* Increased horizontal padding */
    position: relative;
    z-index: 1000;
    min-height: 50px; /* Ensure nav has minimum height */
}

nav.open {
    z-index: 1000; /* Maintain z-index when open */
}

/* Ensure menu-toggle is always first and on the left */
nav .menu-toggle {
    order: -1; /* Place menu-toggle first in flex order */
    margin-right: auto; /* Push everything else to the right */
}

/* Hide dropdowns by default - hamburger menu style */
nav .dropdown {
    display: none;
}

/* Show dropdowns when nav is open */
nav.open {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-bottom: 20px;
    display: flex !important;
}

nav.open .dropdown {
    display: block !important;
    width: auto !important; /* Let width be determined by content */
    margin: 5px 0 !important;
    max-width: 100% !important; /* But don't exceed container width */
    min-width: auto !important;
    position: relative !important; /* Important for absolute positioning of dropdown-content */
}

/* Add margin to first and last dropdown when menu is open */
nav.open .dropdown:first-child {
    margin-left: 20px;
}

nav.open .dropdown:last-child {
    margin-right: 20px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1em;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin: 0 5px;
}

nav a:hover {
    background-color: #4654A3;
    color: rgb(0,0,0)
}

.menu-toggle {
    font-size: 1.5em;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    padding: 10px 20px;
    font-weight: 500;
    z-index: 10001;
    position: relative;
    background-color: transparent;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    user-select: none;
    -webkit-user-select: none;
    visibility: visible !important;
    opacity: 1 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Add text shadow for better visibility */
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 80px;
}

/*@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
    }

    nav.open {
        display: flex;
    }
}*/
/* Hamburger menu styling for all screen sizes */

.dropdown-content a {
    padding-left: 16px;  /* Standard padding for dropdown items */
}

.dropbtn {
    text-align: left;
    white-space: normal;
    text-align-last: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

nav.open .dropdown {
    position: relative; /* Ensure dropdowns can be positioned relative to their parent */
}

nav.open .dropdown {
    position: relative; /* Make dropdown the positioning context */
    z-index: 1; /* Default z-index */
}

nav.open .dropdown.active {
    z-index: 10004; /* Higher z-index when dropdown is active */
}

nav.open .dropbtn {
    width: auto; /* Let width be determined by content */
    display: inline-block; /* Allow button to shrink to content */
}

nav.open .dropdown-content {
    display: none;  /* Keep dropdown hidden by default */
    position: absolute; /* Use absolute positioning to appear to the right */
    left: calc(100% + 5px); /* Position to the right of the dropdown with small gap */
    top: 0; /* Align with the top of the dropdown */
    width: auto; /* Let width be determined by content */
    min-width: 160px; /* Minimum width for readability */
    max-width: 250px; /* Maximum width to prevent overflow */
    margin: 0; /* Reset margins */
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2); /* Add shadow for depth */
    padding: 0; /* Reset padding */
    background-color: #101820 !important; /* Solid dark background */
    background: #101820 !important; /* Ensure background is set */
    z-index: 10003 !important; /* High z-index to appear above menu items */
    opacity: 1 !important; /* Ensure full opacity */
    border-radius: 8px !important; /* Rounded corners */
    overflow: hidden !important; /* Prevent content overflow */
}

nav.open .dropdown:hover .dropdown-content {
    display: block !important;  /* Show dropdown on hover when menu is open (desktop) */
    z-index: 10007 !important; /* Very high z-index to appear above all menu items */
    opacity: 1 !important; /* Ensure full opacity */
    background-color: #101820 !important; /* Solid background */
}

/* For touch devices, show dropdown on click/tap instead of hover */
@media (hover: none) and (pointer: coarse) {
    nav.open .dropdown.active .dropdown-content {
        display: block !important;  /* Show dropdown when parent has 'active' class */
        position: absolute !important; /* Ensure absolute positioning on touch devices */
        left: calc(100% + 5px) !important; /* Position to the right of the dropdown */
    }
}

/* Also support iPad OS specifically */
@supports (-webkit-touch-callout: none) {
    nav.open {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
nav.open .dropdown {
    display: block !important;
    width: auto !important; /* Let width be determined by content, not 100% */
    max-width: 100% !important; /* But don't exceed container width */
    min-width: auto !important;
    margin: 5px 0 !important;
    position: relative !important; /* Important for absolute positioning of dropdown-content */
}
    
    nav.open .dropdown {
        position: relative !important; /* Make dropdown the positioning context */
    }
    
    nav.open .dropdown {
        position: relative !important; /* Make dropdown the positioning context */
        z-index: 1 !important; /* Lower z-index for dropdown container */
    }
    
    nav.open .dropdown.active {
        z-index: 10004 !important; /* Higher z-index when active */
    }
    
    nav.open .dropdown-content {
        position: absolute !important; /* Position to the right on iPad */
        left: calc(100% + 5px) !important; /* Position to the right of the dropdown with gap */
        top: 0 !important; /* Align with the top of the dropdown */
        width: auto !important;
        min-width: 160px !important;
        max-width: 250px !important; /* Prevent dropdowns from being too wide */
        margin: 0 !important;
        background-color: #101820 !important; /* Fully opaque background */
        background: #101820 !important; /* Ensure background is set */
        box-shadow: 0px 8px 16px rgba(0,0,0,0.2) !important;
        z-index: 10005 !important; /* Very high z-index to appear above all menu items */
        opacity: 1 !important; /* Ensure full opacity */
        border-radius: 8px !important; /* Rounded corners */
        overflow: hidden !important; /* Prevent content overflow */
    }
    
    /* If screen is too narrow, position dropdown below instead of to the right */
    @media (max-width: 600px) {
        nav.open .dropdown-content {
            left: 0 !important; /* Position below on very narrow screens */
            top: 100% !important; /* Position below the parent */
            margin-left: 0 !important;
            margin-top: 5px !important;
        }
    }
    
    nav.open .dropdown.active .dropdown-content {
        display: block !important;
    }
    
    nav.open .dropbtn {
        width: auto !important; /* Let width be determined by content */
        display: inline-block !important; /* Allow button to shrink to content */
        text-align: left !important;
        padding: 10px 20px !important; /* Maintain padding */
    }
}

@media (max-width: 768px) {
    nav {
        padding: 5px 20px;
    }
}

/* iPad OS and iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #ffffff !important;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
        touch-action: manipulation;
        background-color: transparent !important;
        border: none !important;
        outline: none !important;
    }
    
    nav {
        display: flex !important;
        visibility: visible !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex-direction: row !important;
    }
    
    /* Ensure menu toggle is always visible and on the left on iPad */
    nav .menu-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 10001 !important;
        width: auto !important;
        height: auto !important;
        min-width: 80px !important;
        min-height: 44px !important; /* iOS recommended touch target size */
        order: -1 !important; /* Ensure it's first */
        margin-right: auto !important; /* Push everything else to the right */
        margin-left: 0 !important; /* Ensure no left margin pushes it right */
        left: 0 !important; /* Explicit left positioning */
        right: auto !important; /* Ensure it's not positioned on the right */
    }
    
    /* Ensure text content is visible */
    .menu-toggle * {
        color: #ffffff !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}


.container {
    padding-top: 40px;
    max-width: 1000px;
    margin: auto;
    /*height: 1000px;*/
    height:auto;
    text-align:center;

}
.container-flash {
    padding-top: 60px;
    max-width: 1000px;
    margin: auto;
    height: auto; /* Change from 30px to auto */
    text-align: center;
    position: relative;
    z-index: 1; /* Ensure content is above overlay */
}
h2 {
    color:rgb(249, 91, 61); /*  23, 150, 50*/
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 15px;
}

p, ul {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    background: #16213e;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    color:rgb(23, 150, 50);
}
#topics-lab {
    color:rgb(255,255,255);
}
/*ul li:hover {
    transform: translateY(-5px);
    background: rgb(23, 150, 50);*/
/*}*/


.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
   
 
}

.image-gallery img {
    width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.10);
}

footer {
    background-color: #101820;
    color: #ffffff;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

a {
    color: rgb(255,255,255);
    text-decoration: none;
   
}
*{
    box-sizing: border-box;
}
.box-link {
    display: block; /* Makes the link cover the entire box */
    text-decoration: none; /* Removes underline */
    color: inherit; /* Ensures the link color matches the text or box styling */
}
.box-link:hover {transform: translateY(-5px);
    background: rgb(23, 150, 50);}

a:hover {
    color: #2575fc;
}
#PPQ-title{
    text-align: center;
}
.question-container {
    padding-top: 40px;
    max-width: 1200px;
    margin: auto;
    height: 1000px;
    position: relative;
    z-index: 1;
}
/*Revision Notes formating */

.revision-video {
    position: relative;
    padding-bottom: 56.25%;  /* 16:9 Aspect Ratio for Video */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}
.revision-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.revision-pictures img {
    width: 100%;
    height: auto;
    object-fit: contain;  /* Ensures the whole image fits within the box */
    display: block;
}
/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .revision-pictures img {
        width: 100%;
        max-width: 100%;  /* Ensures it doesn't exceed the container */
        height: auto;
    }
}




/* adobe pdf viewer styling */
#adobe-dc-view {
    width: 100%; /* Adjust width as needed */
    height: 800px; /* Modify height for desired size */
    margin: auto; /* Center the viewer */
    max-width: 600px; /* Optional: Limit maximum width */
    margin: auto;
    /*margin-left: 10px;*/
   
 
}


.pdf-container {
    display: flex;
    justify-content: center;/*space-between;*/
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 1000px;
    margin: 0;
    padding: 0;
    /*margin-left: 40px;
    margin-right: 40px;*/
 
}
.pdf-container-ppq {
    display: flex;
    justify-content: space-around;
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 1000px;
    margin-left: 40px;
    margin-right: 40px;
  }

  .pdf-view {
    width: 45%;
    height: 600px;
    border: 1px solid #ccc;
  }

.left-pdf {
    width: 100%;
    height: 750px;
    /* border: 100px;
    border-color: rgb(255,255,255);*/
}

.overlay {
    width: 100%;
    height: 750px;
    position: relative;
    text-align: center;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 750px;
    background-color: #e0e0e0;
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 1;
    margin-left: 50px;
}

.right-pdf {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 750px;
    z-index: 2;
    margin-left: 50px;
}

.overlay:hover .placeholder {
    display: none;
}

.overlay:hover .right-pdf {
    display: block;
}

/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
    min-width: 120px;
    max-width: 150px;
}

/* Ensure dropdown appears above other nav items when hovered */
.dropdown:hover {
    z-index: 10000;
}

/* When nav is open and dropdown is hovered, ensure it's above everything */
nav.open .dropdown:hover {
    z-index: 10006 !important;
}

nav.open .dropdown:hover .dropdown-content {
    z-index: 10007 !important;
}

.dropbtn {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1em;
    text-align: left;
    white-space: normal;
    text-align-last: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 100%; /* Position to the right of the parent */
    top: 0; /* Align with the top of the parent */
    background: #101820 !important; /* Solid dark background matching nav */
    background-color: #101820 !important; /* Solid dark background matching nav */
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 9999 !important; /* Very high z-index to ensure it's above all nav items */
    border-radius: 8px; /* Added curved corners to dropdown box */
    overflow: hidden; /* This ensures the inner items don't overflow the curved corners */
    opacity: 1 !important; /* Ensure full opacity */
    margin-left: 5px; /* Small gap between parent and dropdown */
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    background: transparent; /* Ensure links don't have their own background */
}

.dropdown-content a:hover {
    background-color: #575757;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
}


/*buttons on gcse and a level pages */

.year-buttons {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.year-button {
    display: inline-block;
    background-color: #4654A3;
   color: #ffffff;
    text-decoration: none;
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 5px;
   
    transition: background-color 0.3s ease;
   /* border: 1px solid #ffffff;
    border-color: #F95B3D;*/

}




.year-button:hover {
    background-color: #1a1a2e;
    color: #ffffff;
}
/*flashcard styling */
/* Flashcard Styles */
.flashcard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto; /*80vh;*/ /* Ensure the container fills the viewport height */
    margin-top: 40px; 
    padding: 20px;
    position: relative;
  }
  
  .flashcard-stack {
    position: relative;
    width: 600px;
    height: 400px;
  }
  
  .flashcard {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fff;
    color: #000; /* Ensure text visibility */
    border: 10px solid #333;
    border-radius: 20px;
    border-color: rgb(249, 91, 61);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 5; /* Ensure it's above other elements */
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.flashcard:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}
  
  .hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.4s ease;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent content from overflowing the border */
    box-sizing: border-box;
  }
  
  .visible {
    visibility: visible;
    opacity: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent content from overflowing the border */
    box-sizing: border-box;
  }
  
  .flashcard .question {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    position: absolute;
    box-sizing: border-box;
  }
  
  .flashcard .answer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
  }
  .flashcard-image {
    max-width: calc(100% - 20px); /* Account for border and padding */
    max-height: calc(100% - 20px); /* Account for border and padding */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Ensure image stays behind the border */
}
  /*stack for maximum 30 cards*/
  .flashcard:nth-child(1) {
    z-index: 60;
}
.flashcard:nth-child(2) {
    z-index: 59;
}
.flashcard:nth-child(3) {
    z-index: 58;
}
.flashcard:nth-child(4) {
    z-index: 57;
}
.flashcard:nth-child(5) {
    z-index: 56;
}
.flashcard:nth-child(6) {
    z-index: 55;
}
.flashcard:nth-child(7) {
    z-index: 54;
}
.flashcard:nth-child(8) {
    z-index: 53;
}
.flashcard:nth-child(9) {
    z-index: 52;
}
.flashcard:nth-child(10) {
    z-index: 51;
}
.flashcard:nth-child(11) {
    z-index: 50;
}
.flashcard:nth-child(12) {
    z-index: 49;
}
.flashcard:nth-child(13) {
    z-index: 48;
}
.flashcard:nth-child(14) {
    z-index: 47;
}
.flashcard:nth-child(15) {
    z-index: 46;
}
.flashcard:nth-child(16) {
    z-index: 45;
}
.flashcard:nth-child(17) {
    z-index: 44;
}
.flashcard:nth-child(18) {
    z-index: 43;
}
.flashcard:nth-child(19) {
    z-index: 42;
}
.flashcard:nth-child(20) {
    z-index: 41;
}
.flashcard:nth-child(21) {
    z-index: 40;
}
.flashcard:nth-child(22) {
    z-index: 39;
}
.flashcard:nth-child(23) {
    z-index: 38;
}
.flashcard:nth-child(24) {
    z-index: 37;
}
.flashcard:nth-child(25) {
    z-index: 36;
}
.flashcard:nth-child(26) {
    z-index: 35;
}
.flashcard:nth-child(27) {
    z-index: 34;
}
.flashcard:nth-child(28) {
    z-index: 33;
}
.flashcard:nth-child(29) {
    z-index: 32;
}
.flashcard:nth-child(30) {
    z-index: 31;
}

.flashcard:nth-child(31) {
  z-index: 30;
}
.flashcard:nth-child(32) {
  z-index: 29;
}
.flashcard:nth-child(33) {
  z-index: 28;
}
.flashcard:nth-child(34) {
  z-index: 27;
}
.flashcard:nth-child(35) {
  z-index: 26;
}
.flashcard:nth-child(36) {
  z-index: 25;
}
.flashcard:nth-child(37) {
  z-index: 24;
}
.flashcard:nth-child(38) {
  z-index: 23;
}
.flashcard:nth-child(39) {
  z-index: 22;
}
.flashcard:nth-child(40) {
  z-index: 21;
}
.flashcard:nth-child(41) {
  z-index: 20;
}
.flashcard:nth-child(42) {
  z-index: 19;
}
.flashcard:nth-child(43) {
  z-index: 18;
}
.flashcard:nth-child(44) {
  z-index: 17;
}
.flashcard:nth-child(45) {
  z-index: 16;
}
.flashcard:nth-child(46) {
  z-index: 15;
}
.flashcard:nth-child(47) {
  z-index: 14;
}
.flashcard:nth-child(48) {
  z-index: 13;
}
.flashcard:nth-child(49) {
  z-index: 12;
}
.flashcard:nth-child(50) {
  z-index: 11;
}
.flashcard:nth-child(51) {
  z-index: 10;
}
.flashcard:nth-child(52) {
  z-index: 9;
}
.flashcard:nth-child(53) {
  z-index: 8;
}
.flashcard:nth-child(54) {
  z-index: 7;
}
.flashcard:nth-child(55) {
  z-index: 6;
}
.flashcard:nth-child(56) {
  z-index: 5;
}
.flashcard:nth-child(57) {
  z-index: 4;
}
.flashcard:nth-child(58) {
  z-index: 3;
}
.flashcard:nth-child(59) {
  z-index: 2;
}
.flashcard:nth-child(60) {
  z-index: 1;}

/* Flashcard Buttons Container */
.flashcard-buttons {
    
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 0px;
    margin-bottom: 100px;
}


/* General Flashcard Button Styling */
.flashcard-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #2575fc;
    color: #ffffff;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: inline-block;
    
}
.flashcard-button2 {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #23a456;
    color: #ffffff;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: inline-block;
}

/* Flashcard Button Hover State */
.flashcard-button:hover {
    background-color: #1a1a2e;
}
.flashcard-button2:hover {
    background-color: #1a1a2e;
}
  /*.flashcard {
    z-index: auto;
}*/
  /* Stack Order */
  /*.flashcard:nth-child(1) {
    z-index: 3;
  }
  
  .flashcard:nth-child(2) {
    z-index: 2;
  }
  
  .flashcard:nth-child(3) {
    z-index: 1;
  }*/
  /* multiple choice styles */
  .multiple-choice-quiz {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    background: #16213e;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    margin-top: 60px; /* Changed back to 60px */
    position: relative;
    z-index: 2;
}

.multiple-choice-quiz .question {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: center;

}

.multiple-choice-quiz .answers {
    list-style: none;
    padding: 0;
}

.multiple-choice-quiz .answers li {
    background: #1a1a2e;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: #ffffff;
}


.multiple-choice-quiz .answers li:hover {
    background-color: #4654A3;
}


.multiple-choice-quiz .answers li.correct {
    background-color: #23a456;
}

.multiple-choice-quiz .answers li.wrong {
    background-color: #a42323;
} 
.answer-label {
    display: block;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 5px;
}

.answer-label input[type="radio"] {
    margin-right: 10px;
}
.correct-highlight {
    background-color: #23a456;
    font-weight: bold;
    /*color: lightgreen;*/
}

/* Responsive Adjustments for Flashcards and Header */
/*.flashcard-container {
    height: auto; /* Allow flexible height */
   /* padding: 20px; /* Add padding for smaller screens */
/*}*/

.flashcard-stack {
    width: 90%; /* Adjust width to fit within smaller viewports */
    max-width: 600px; /* Maintain a reasonable maximum width */
    margin: 0 auto; /* Center flashcard stack */
}



/* Media Query for Smaller Screens */
@media (max-width: 768px) {
    .flashcard-container {
        padding: 10px; /* Further reduce padding for very small screens */
    }
    .flashcard-stack {
        width: 100%; /* Use the full width of smaller screens */
    }
    header {
        padding: 10px; /* Reduce header padding */
        font-size: 0.9em; /* Slightly decrease font size */
    }
}


/* Ensure header text is not hidden */
.container-flash {
    padding-top: 20px; /* Increase top padding */
    margin-bottom: 20px; /* Add space below the title */
    text-align: center;
}

h2, h3 {
    z-index: 5; /* Ensure text appears above other elements */
    position: relative; /* Ensure stacking order respects this */
    margin-bottom: 10px; /* Add space below headers */
}

/*.flashcard-container {
    margin-top: 40px; /* Add sufficient space between text and flashcards */
/*}*/
/* CONTACT FORM STYLING*/

input[name="name"],
  input[name="email"] {
    width: 500px; /* Adjust as needed */
  }

  textarea[name="question"] {
    width: 500px;
    height: 100px; /* Adjust as needed */
  }

  /*test*/
  

.question-image {
    max-width: 100%;
    margin-bottom: 20px;
    display: block;
    border: 2px solid #f95b3d; /* This should match your h2 color - adjust if different */
    border-radius: 4px; /* Optional: adds slightly rounded corners */
}

/* STEM Splat Game Styles */
.game-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    width: 90%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Add these new styles */
.game-container h2,
.game-container p {
    text-align: center;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background-color: #16213e;
    color: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #4654A3;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
    width: 100%;
}

.card.selected {
    background-color: #4654A3;
    transform: scale(1.02);
}

.card.matched {
    background-color: #23a456;
    border-color: #1a7f41;
}

#timer {
    font-size: 24px;
    margin: 20px 0;
    color: white;
    text-align: center;
}

.game-container .question {
    text-align: center;
    color: white;
    padding: 20px;
}

@media screen and (max-width: 768px) {
    .game-container {
        width: 95%;
        padding: 5px;
    }
    
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .card {
        font-size: 13px;
        padding: 10px;
        min-width: 0;
    }
}

@media screen and (max-width: 480px) {
    .game-container {
        width: 98%;
        padding: 5px;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .card {
        font-size: 12px;
        min-height: 60px;
        padding: 8px;
    }
}

/* Home Page Specific Styles */
.home-background {
    background-image: url('Background.jpg');
    background-size: cover;
    background-position: top 80px center; /* More specific positioning */
    background-repeat: no-repeat;
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: block;
    background-color: #000000;
}

/* Media query for iOS devices */
@supports (-webkit-touch-callout: none) {
    .home-background {
        background-attachment: scroll;
    }
}

/* For all other devices, keep the fixed background */
@supports not (-webkit-touch-callout: none) {
    .home-background {
        background-attachment: fixed;
    }
}

/* Add a new overlay class */
.content-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

.home-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 40px auto;
    z-index: 2;
    padding: 0 20px;
}

.home-grid-button {
    position: relative;
    aspect-ratio: 2/1;
    background-color: rgba(70, 84, 163, 0.3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    z-index: 2;
    /* Ensure consistent sizing across all devices */
    width: 100%;
    height: auto;
    min-height: 100px;
    max-height: 200px;
}

.home-grid-button:hover {
    transform: scale(1.05);
}

.home-grid-button span {
    color: white;
    font-size: 1.2em;
    text-align: right;
}

/* Ensure all button images are consistently sized */
.home-grid-button img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

/* iPad OS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .home-grid-button {
        /* Ensure consistent sizing on iPad OS */
        width: 100%;
        height: auto;
        min-height: 120px;
        max-height: 150px;
    }
    
    .home-grid-button img {
        /* Force consistent image sizing on iPad OS */
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }
}

/* Home Page Button Grid Responsive Styles */
@media (max-width: 768px) {
    .home-button-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }

    .home-grid-button {
        padding: 15px;
    }

    .home-grid-button span {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .home-button-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 10px;
    }
}

/* Contact Page Specific Button Styles */
.contact-button-grid {
    display: grid;
    grid-template-columns: minmax(auto, 400px);  /* Maximum width of 400px */
    gap: 20px;
    margin: 40px auto;
    z-index: 2;
    padding: 0 20px;
    justify-content: center;  /* Center the grid */
}

@media (max-width: 480px) {
    .contact-button-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

/* Topic Selector Grid Styles */
.topic-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 1080px; /* Increased from 720px (720 * 1.5 = 1080) */
    margin: 32px auto;
    z-index: 2;
    padding: 0 16px;
}

.topic-selector-button {
    position: relative;
    aspect-ratio: 2/1;
    background-color: rgba(70, 84, 163, 0.3);
    border: none;
    border-radius: 6px; /* 80% of original 8px */
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px; /* 80% of original 15px */
    z-index: 2;
}

.topic-selector-button:hover {
    transform: scale(1.05);
}

.topic-selector-button span {
    color: white;
    font-size: 1em; /* Increased from 0.72em to 1em for better readability */
    text-align: right;
}

@media (max-width: 768px) {
    .topic-selector-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 80% of original 150px */
        gap: 8px; /* 80% of original 10px */
    }
}

/* Add z-index to revision-pictures to ensure it's above overlay */
.revision-pictures {
    position: relative;
    z-index: 1;
}

/* Collapsible Paper Sections */
.section-header {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    background-color: rgba(22, 33, 62, 0.7); /* Changed from solid to semi-transparent */
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.toggle-button {
    background: none;
    border: none;
    color: #f95b3d;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.toggle-button:hover {
    transform: scale(1.2);
}

.paper-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

/* Registration Form Styles */
.registration-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #45a049;
}

.error-messages {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
}

.error {
    color: #d32f2f;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.success-messages {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
}

.success {
    color: #2e7d32;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.login-link {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.login-link a {
    color: #4CAF50;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Privacy Policy Styles */
.privacy-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333;
    text-align: left;
}

.privacy-content h3 {
    color: #f95b3d;
    font-size: 1.5em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.privacy-content p {
    color: #333;
    margin-bottom: 1rem;
}

.privacy-content ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.privacy-content li {
    background: none;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    color: #333;
    box-shadow: none;
    border-radius: 0;
}

.privacy-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

.privacy-content a {
    color: #4CAF50;
    text-decoration: none;
}

.privacy-content a:hover {
    text-decoration: underline;
}

.privacy-content strong {
    font-weight: 600;
    color: #333;
}






