/* =========================================
   Academy Content Stylesheet
   Universal Stylesheet with Theme Variables
   ========================================= */

/* CSS Variables for Academy Theming */
:root {
    --academy-primary-color: #00aeef;      /* Main brand color */
    --academy-secondary-color: #2c3e50;    /* Secondary text color */
    --academy-accent-color: #ff6b6b;       /* Accent color for CTAs */
    --academy-highlight-bg: #e3f2fd;       /* Highlight background */
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    background-color: #ffffff;
}

/* Typography */
h1 {
    color: var(--academy-secondary-color);
    border-bottom: 3px solid var(--academy-primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 2.2em;
    font-weight: bold;
}

h2 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: bold;
}

h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.2em;
    font-weight: bold;
}

h4, h5, h6 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Text Emphasis */
.highlight {
    background-color: #f39c12;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

strong {
    color: var(--academy-secondary-color);
    font-weight: bold;
}

em {
    font-style: italic;
    color: #34495e;
}

/* Lists */
ul, ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
}

ul ul, ol ol, ul ol, ol ul {
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Special Content Boxes */
.coaching-tip {
    background-color: #ecf0f1;
    border-left: 4px solid var(--academy-primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.coaching-tip strong {
    color: var(--academy-primary-color);
}

.warning-box {
    background-color: #fdf2e9;
    border-left: 4px solid #e67e22;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.success-box {
    background-color: #eafaf1;
    border-left: 4px solid #27ae60;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.quote-box {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

th, td {
    border: 1px solid #d5dbdb;
    padding: 15px 18px;
    text-align: center;
    vertical-align: middle;
}

th {
    background: linear-gradient(135deg, #0098d1, var(--academy-primary-color));
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

th:first-child {
    text-align: left;
    background: linear-gradient(135deg, #34495e, var(--academy-secondary-color));
    width: 40%;
}

td:first-child {
    text-align: left;
    font-weight: 500;
    background-color: #f8f9fa;
    border-right: 2px solid var(--academy-primary-color);
}

tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background-color: #e8f4fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

/* Skill level styling in table cells */
td {
    font-weight: bold;
    font-size: 1.1em;
}

/* Buttons and Links */
.download-link, .action-button {
    background-color: #27ae60;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.download-link:hover, .action-button:hover {
    background-color: #229954;
    text-decoration: none;
}

.primary-button {
    background-color: var(--academy-primary-color);
}

.primary-button:hover {
    background-color: #0098d1;
}

.secondary-button {
    background-color: #95a5a6;
}

.secondary-button:hover {
    background-color: #7f8c8d;
}

/* Navigation */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.nav-button {
    background-color: var(--academy-primary-color);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s;
    min-width: 200px;
    text-align: center;
}

.nav-button:hover {
    background-color: #0098d1;
    text-decoration: none;
}

.prev-button {
    background-color: #95a5a6;
}

.prev-button:hover {
    background-color: #7f8c8d;
}

.chapter-info {
    text-align: center;
    color: #34495e;
}

/* Media Elements */
.video-placeholder {
    background-color: var(--academy-secondary-color);
    color: white;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1.1em;
}

.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-caption {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* Diagram Containers */
.play-section {
    background-color: #f8f9fa;
    border: 2px solid var(--academy-primary-color);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.diagram-step {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--academy-primary-color);
}

.diagram-placeholder {
    background: linear-gradient(135deg, var(--academy-secondary-color), #34495e);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-right: 20px;
    min-width: 200px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-left: 15px;
}

.step-title {
    color: var(--academy-secondary-color);
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.step-description {
    margin-bottom: 10px;
}

.key-actions {
    list-style: none;
    padding-left: 0;
}

.key-actions li {
    background-color: #ecf0f1;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 3px solid var(--academy-primary-color);
}

.scoring-opportunity {
    background-color: #27ae60;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: bold;
}

/* Dividers */
hr {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #ecf0f1;
}

.section-divider {
    border-top: 3px solid var(--academy-primary-color);
    margin: 50px 0;
}

/* Footer Styles */
.footer-info {
    text-align: center;
    margin-top: 30px;
    color: #6c757d;
    font-size: 0.9em;
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

/* Play Concepts List */
.concept-list {
    background-color: #f8f9fa;
    border-left: 4px solid var(--academy-primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.concept-list h4 {
    color: var(--academy-secondary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

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

.concept-list li {
    background-color: white;
    margin: 8px 0;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid var(--academy-primary-color);
    font-weight: 500;
}

/* Code and Technical Content */
code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 4px solid var(--academy-primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
        font-size: 16px;
        max-width: 100%;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.3em;
    }

    .chapter-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-button {
        width: 100%;
        min-width: unset;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px 8px;
    }

    .coaching-tip, .warning-box, .success-box, .quote-box {
        padding: 12px;
        margin: 15px 0;
    }

    .diagram-step {
        flex-direction: column;
    }

    .diagram-placeholder {
        margin-right: 0;
        margin-bottom: 15px;
        min-width: auto;
        width: 100%;
    }

    .step-content {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .video-placeholder, .diagram-placeholder {
        padding: 25px 15px;
        font-size: 1em;
    }

    .download-link, .action-button {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
}

/* Print Styles */
@media print {
    body {
        max-width: none;
        padding: 0;
        color: black;
        background: white;
    }

    .chapter-navigation,
    .download-link,
    .action-button {
        display: none;
    }

    .coaching-tip,
    .warning-box,
    .success-box {
        border: 2px solid #333;
        background: white;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.margin-top-small { margin-top: 10px; }
.margin-top-medium { margin-top: 20px; }
.margin-top-large { margin-top: 30px; }

.margin-bottom-small { margin-bottom: 10px; }
.margin-bottom-medium { margin-bottom: 20px; }
.margin-bottom-large { margin-bottom: 30px; }

.hidden { display: none; }
.visible { display: block; }

/* Popup Styles */
.info-icon {
    display: inline-block;
    background-color: var(--academy-primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    line-height: 20px;
    transition: background-color 0.3s;
}

.info-icon:hover {
    background-color: #0098d1;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid var(--academy-primary-color);
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.popup-title {
    color: var(--academy-secondary-color);
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--academy-primary-color);
    padding-bottom: 5px;
}

.popup-content {
    color: #555;
    line-height: 1.5;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #95a5a6;
    cursor: pointer;
}

.close-btn:hover {
    color: #7f8c8d;
}
