/* styles.css - Homepage & Global Styles */

/* --- Global Resets & Base Styles --- */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-color: #6c757d;
    --text-dark: #2c3e50;
    --text-light: #f8f9fa;
    --bg-light: #ffffff;
    --bg-off-white: #f8f9fa;
}
body, html {
    margin: 0; padding: 0;
    font-family: 'Roboto', sans-serif; /* Use a highly readable font for body text */
    color: #333;
    background-color: var(--bg-off-white);
    scroll-behavior: smooth;
    line-height: 1.7;
}
.container { width: 90%; max-width: 1140px; margin: 0 auto; }
.main-container { width: 100%; }

.main-content {
    flex-grow: 1;
    display: flex;
    align-items: center; /* Vertically center the login form */
    justify-content: center;
    padding-top: 100px; /* Adjust this value based on your actual header height + some extra space */
                       /* Example: 70px (header) + 30px (breathing room) = 100px */
    padding-bottom: 0px; /* Existing bottom padding */
    padding-left: 0px; /* Add some horizontal padding for smaller screens */
    padding-right: 0px;
    box-sizing: border-box; /* Ensure padding is included in width/height calculations */
    min-height: 100vh;
    flex-direction: column;
}

.loading-fullpage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    color: #555;
}
.loading-fullpage .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color, #007bff);
    animation: spin 1s ease infinite;
    margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--text-dark); }
main { display: block; } /* For older browsers */
.section-padding { padding: 60px 0; width: 100%; }
.bg-light { background-color: var(--bg-light); border-top: 1px solid #e9ecef; border-bottom: 1px solid #e9ecef; }
.section-title { font-size: 2.5em; text-align: center; margin-bottom: 20px; }
.section-subtitle { text-align: center; font-size: 1.1em; color: #6c757d; max-width: 600px; margin: 0 auto 50px auto; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 12px 28px; font-size: 1em; font-weight: 500; text-align: center; text-decoration: none; border-radius: 25px; transition: all 0.3s ease; cursor: pointer; border: 2px solid transparent; }
.btn-lg { padding: 15px 35px; font-size: 1.1em; }
.btn-primary { background-color: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2); }
.btn-primary:hover { background-color: var(--primary-hover-color); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border-color: var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: #fff; }

/* --- Hero Section --- */
#hero { background: linear-gradient(135deg, #6dd5ed, #2193b0); color: #fff; padding: 100px 0; text-align: center;  width: 100%; }
#hero h1 { font-size: 3em; margin-bottom: 20px; color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.2); }
#hero .subtitle { font-size: 1.3em; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; opacity: 0.9; color: #fff; }
.hero-cta a { margin: 0 10px; }
#hero-cta .btn-secondary { background-color: #fff; color: #212529; }

/* --- Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-item { background-color: var(--bg-light); padding: 30px; border-radius: 8px; text-align: left; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.feature-item h3 { font-size: 1.4em; margin-bottom: 10px; color: #34495e; }
.feature-item p { font-size: 0.95em; color: #555; }

/* --- Target Audience Section --- */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.audience-card { padding: 30px; border: 1px solid #e0e7ef; border-radius: 8px; }
.audience-card h3 { font-size: 1.8em; color: var(--primary-color); }
.audience-card ul { list-style: none; padding-left: 0; margin: 20px 0 30px 0; }
.audience-card ul li { margin-bottom: 10px; display: flex; align-items: center; }
.check-icon { color: #28a745; margin-right: 10px; font-size: 1.2em; }

/* --- FAQ Section --- */
.faq-container { max-width: 800px; }
.faq-item { border-bottom: 1px solid #e0e7ef; margin-bottom: 15px; }
.faq-question { background: none; border: none; width: 100%; text-align: left; padding: 15px 0; font-size: 1.2em; font-weight: 500; color: var(--text-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; font-size: 1.5em; color: var(--primary-color); transition: transform 0.3s ease; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer p { padding: 0 0 15px 0; margin: 0; }

/* --- CTA Section --- */
#cta { background-color: var(--primary-color); color: #fff; text-align: center; }
#cta h2 { color: #fff; font-size: 2.2em; }
#cta p { color: #e0e7ef; }
#cta .btn-primary { background-color: #ffc107; color: #212529; }
#cta .btn-primary:hover { background-color: #e0a800; }

/* --- Responsive --- */
@media (max-width: 768px) {
    #hero h1 { font-size: 2.2em; }
    #hero .subtitle { font-size: 1.1em; }
    .section-title { font-size: 2em; }
    .audience-grid { grid-template-columns: 1fr; }
}



/* ==========================================================================
   Google Material Symbols - Global Styles
   ========================================================================== */

/* --- Base Icon Style --- */
.material-symbols-outlined {
  /* Font properties that make the icon font work correctly */
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Default icon size, can be overridden */
  line-height: 1;   /* Prevents extra vertical space */
  letter-spacing: normal;
  text-transform: none;
  display: inline-block; /* Ensures it behaves like an icon */
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  
  /* Feature settings for better rendering */
  -webkit-font-feature-settings: 'liga';
  -moz-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;

  /* --- Custom Alignment & Sizing --- */
  vertical-align: middle; /* Best default for aligning with text on the same line */
  user-select: none;      /* Prevents users from accidentally selecting the icon text */
}


/* --- Sizing Variants (Optional but Recommended) --- */
/* Use these classes to easily change icon size */
.material-symbols-outlined.md-18 { font-size: 18px; }
.material-symbols-outlined.md-20 { font-size: 20px; }
.material-symbols-outlined.md-24 { font-size: 24px; } /* Default */
.material-symbols-outlined.md-36 { font-size: 36px; }
.material-symbols-outlined.md-48 { font-size: 48px; }


/* --- Styles for Icons Inside Buttons --- */
.btn .material-symbols-outlined {
    /* Adjust vertical alignment specifically for buttons if needed */
    vertical-align: bottom; /* Often looks better than 'middle' inside a button */
    /* Adjust size to be relative to the button's font size */
    font-size: 1.2em;
    /* The 'gap' property on the button is the best way to handle spacing,
       but margin-right is a good fallback. */
    margin-right: 0.4em;
}

/* For icon-only buttons (like your toggles) */
.btn-icon-only .material-symbols-outlined {
    margin-right: 0; /* No margin needed if it's the only child */
    vertical-align: middle; /* Revert to middle for better centering */
}


/* --- Color Variants (Optional) --- */
.material-symbols-outlined.md-light { color: rgba(255, 255, 255, 1); }
.material-symbols-outlined.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-symbols-outlined.md-inactive { color: rgba(0, 0, 0, 0.26); }


/* --- Filled Style (Optional) --- */
/* If you want to use the "filled" version of an icon */
.material-symbols-outlined.filled {
  font-variation-settings:
  'FILL' 1,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

.error-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    margin: 20px auto; /* Center it within its parent container */
    max-width: 600px;
    background-color: #fff8f8; /* A very light, subtle red */
    border: 1px solid #f5c6cb;
    border-left: 5px solid #dc3545; /* A strong red accent on the left */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* You can also add an icon for more visual impact */
.error-page-container::before {
    content: 'error'; /* Google Material Symbols icon name */
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 48px; /* Large icon */
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    color: #dc3545; /* Red icon color */
    margin-bottom: 15px;
}

.error-page-container .error-message {
    font-size: 2em; /* e.g., 32px */
    font-weight: 600;
    color: #721c24; /* A dark, desaturated red for the heading */
    margin-top: 0;
    margin-bottom: 10px;
}

.error-page-container .error-description {
    font-size: 1.1em;
    color: #58151c; /* A slightly lighter dark red for the body text */
    line-height: 1.7;
    margin-bottom: 0; /* Remove bottom margin if it's the last element */
}

/* --- Share Modal Styles --- */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.share-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.share-modal {
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.share-modal-overlay.visible .share-modal {
    transform: scale(1);
}

.share-modal h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
}

/* --- Modal Styles (can be shared across modals) --- */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; 
    align-items: flex-start; 
    justify-content: center;
    z-index: 2000; 
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    /* --- NEW: Add padding for mobile view --- */
    padding: 20px; /* Add some padding around the modal on small screens */
    box-sizing: border-box;
    /* --- NEW: Make the overlay itself scrollable on small/short screens --- */
    overflow-y: auto;
}
.modal-overlay.visible {
    opacity: 1; 
    visibility: visible; 
    transition: opacity 0.3s ease;
}
.modal-content {
    background-color: #ffffff; 
    padding: 25px 30px; 
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 90%; 
    max-width: 500px; 
    position: relative;
    transform: scale(0.95); 
    transition: transform 0.3s ease;
    max-height: 90vh; /* Prevent modal from being taller than the viewport */
    overflow-y: auto; /* Add a scrollbar if content is too long */
    margin-top: 5vh; /* Push down from the top on mobile */
    margin-bottom: 5vh; /* Ensure space at the bottom for scrolling */
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close-btn {
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: none; 
    border: none;
    font-size: 28px; 
    line-height: 1; 
    color: #adb5bd; 
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.modal-close-btn:hover { 
    color: #212529; 
    transform: rotate(90deg); 
}

.modal-content h2 { 
    font-size: 1.8em; 
    color: #2c3e50; 
    text-align: center; 
    margin-top: 0; 
    margin-bottom: 10px; 
}

.modal-subtitle { /* New class for the paragraph */
    font-size: 1em;
    color: #555e68;
    text-align: center;
    margin-bottom: 25px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.modal-content .modal-subtitle { 
    font-size: 1em; 
    color: #555e68; 
    text-align: center; 
    margin-bottom: 25px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.modal-content .form-group { margin-bottom: 15px; }
.modal-content label { display: block; margin-bottom: 5px; }
.modal-content input[type="text"] { width: calc(100% - 80px); padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.modal-content .copy-btn { padding: 8px 12px; margin-left: 10px; cursor: pointer; }


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0; /* Header should not shrink */
}
.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.modal-body {
    flex-grow: 1; /* Body takes all available vertical space */
    position: relative; /* For positioning status messages */
    overflow: hidden; /* The iframe will handle its own scrolling */
}

/* --- Responsive adjustments for the modal on mobile --- */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px; /* Reduce padding on very small screens */
    }
    .modal-content {
        padding: 20px 15px; /* Reduce internal padding */
        margin-top: 2vh;
        margin-bottom: 2vh;
    }
    .modal-content h2 {
        font-size: 1.5em;
    }
}




.question-code-snippet {
    margin: 18px 0;
    font-size: 0.9em; /* Make code font slightly smaller than body text */
}

/* 
   Prism.js will apply its own styles to <pre> and <code>.
   The styles below are fallbacks or overrides if you're NOT using a Prism theme.
   It's highly recommended to use a theme like prism-okaidia.css.
*/
.question-code-snippet pre {
    background-color: #2d2d2d; /* Default dark background */
    color: #f8f8f2; /* Default light text */
    padding: 1.2em;
    border-radius: 8px;
    overflow-x: auto; /* Allow horizontal scrolling for long lines */
    border: 1px solid #444;
}

.question-code-snippet code {
    font-family: 'Fira Code', 'Courier New', monospace; /* A good monospaced font */
    white-space: pre; /* Preserve whitespace and prevent wrapping */
}

.question-image {
    width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 6px;
}

.option-label {
    display: flex; /* Align radio button and text nicely */
    align-items: flex-start;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.option-label:hover {
    background-color: #f8f9fa;
}

.option-label input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px; /* Align with first line of text */
}