
/* SFR Pro Display Black Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYBLACKITALIC.OTF') format('opentype');
  font-weight: 900;
  font-style: italic;
}

/* SFR Pro Display Bold */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYBOLD.OTF') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* SFR Pro Display Heavy Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYHEAVYITALIC.OTF') format('opentype');
  font-weight: 800;
  font-style: italic;
}

/* SFR Pro Display Light Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYLIGHTITALIC.OTF') format('opentype');
  font-weight: 300;
  font-style: italic;
}

/* SFR Pro Display Medium */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYMEDIUM.OTF') format('opentype');
  font-weight: 500;
  font-style: normal;
}

/* SFR Pro Display Medium Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYMEDIUMITALIC.OTF') format('opentype');
  font-weight: 500;
  font-style: italic;
}

/* SFR Pro Display Regular */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYREGULAR.OTF') format('opentype');
  font-weight: 400;
  font-style: normal;
}

/* SFR Pro Display Semibold Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYSEMIBOLDITALIC.OTF') format('opentype');
  font-weight: 600;
  font-style: italic;
}

/* SFR Pro Display Thin Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYTHINITALIC.OTF') format('opentype');
  font-weight: 200;
  font-style: italic;
}

/* SFR Pro Display Ultra Light Italic */
@font-face {
  font-family: 'SFR Pro Display';
  src: url('fonts/SFRPRODISPLAYULTRALIGHTITALIC.OTF') format('opentype');
  font-weight: 100;
  font-style: italic;
}

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

body {
    font-family: 'SFR Pro Display', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    min-height: 100vh;
    background: linear-gradient(0deg, #2f3a52, #2f3a5280 41%, #fff);
}

/* Main wrapper for sticky footer layout */
body > div {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Header */
header {
    background: linear-gradient(0deg, #2f3a52, #2f3a5280 41%, #fff);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 0;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Main content */
main {
    flex: 1;
    flex-grow: 1;
    padding: 40px 20px;
    min-height: 0; /* Important for proper flex behavior */
}

/* H5P Container */
#h5p-container {
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
    padding: 0;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

/* Loading indicator */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    color: #64748b;
}

#loading p {
    font-size: 1.125rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Spinner animation */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error styles */
.error {
    padding: 40px;
    text-align: center;
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 20px;
}

.error h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-details {
    text-align: left;
    margin-top: 20px;
    background: rgba(255,255,255,0.5);
    padding: 15px;
    border-radius: 6px;
}

.error-details ul {
    margin-left: 20px;
}

.error-details li {
    margin-bottom: 8px;
}

/* Fallback content styles */
.h5p-fallback {
    padding: 30px;
}

.h5p-fallback h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.h5p-fallback p {
    margin-bottom: 10px;
    font-size: 1rem;
}

.content-details {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.content-details h4 {
    color: #495057;
    margin-bottom: 15px;
}

.content-details pre {
    background: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.4;
    max-height: 300px;
}

.instructions {
    margin-top: 25px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.instructions h4 {
    color: #1976d2;
    margin-bottom: 15px;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions code {
    background: #263238;
    color: #80cbc4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* H5P Content Adjustments */
.h5p-iframe-wrapper {
    border-radius: 12px;
    overflow: hidden;
}

/* Make H5P content responsive */
.h5p-content {
    width: 100% !important;
    height: auto !important;
}

.h5p-interactive-video {
    width: 100% !important;
    max-width: none !important;
}

/* Footer */
footer {
  border-top: 1px solid #eeeeee24;
  margin-top: auto; /* This pushes footer to bottom */
  flex-shrink: 0; /* Prevent footer from shrinking */
  padding: 15px 0;
}

.simple-footer {
  text-align: center;
  padding: 0;
}

.n3team-logo-link {
  display: inline-block;
  transition: all 0.3s ease;
  padding: 0 20px;
  border-radius: 5px;
}

.n3team-logo {
  height: 75px;
  width: auto;
  transition: all 0.3s ease;
}

.n3team-logo-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.n3team-logo-link:hover .n3team-logo {
  transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 40px 20px;
    }

    header h1 {
        font-size: 2.25rem;
    }

    header p {
        font-size: 1.125rem;
    }

    main {
        padding: 20px;
    }

    #h5p-container {
        border-radius: 12px;
    }

    .n3team-logo {
        height: 35px;
    }

    .n3team-logo-link {
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    main {
        padding: 15px;
    }

    footer {
        padding: 20px 0;
    }

    .n3team-logo {
        height: 30px;
    }

    .n3team-logo-link {
        padding: 6px 12px;
    }
}

/* Animation for content loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header {
    animation: slideInDown 0.6s ease-out;
}

#h5p-container {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Custom H5P overrides */
.h5p-container .h5p-content-controls {
    background: rgba(255,255,255,0.98) !important;
    border-top: 1px solid #e2e8f0 !important;
}

.h5p-interactive-video .h5p-video-wrapper {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Professional button styles for H5P interactions */
.h5p-question-button,
.h5p-joubelui-button {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.h5p-question-button:hover,
.h5p-joubelui-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}