/* ===========================
   Resources Page Styles
   =========================== */


/* Page Headings */

.center-text {
    text-align: center;
    margin-bottom: 15px;
}

h1.center-text {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 20px;
}

p.center-text {
    font-size: 1.1rem;
    color: var(--text-muted, #555);
}

.password-form {
    margin-top: 100px;
}


/* Form wrapper */

form {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}


/* Input field */

#password-field {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.25s ease;
    background: #f9fafb;
}


/* Placeholder styling */

#password-field::placeholder {
    color: #94a3b8;
}


/* Focus effect */

#password-field:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}


/* Button styling */

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}


/* Hover effect */

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
}


/* Active click */

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}


/* Responsive tweaks */

@media (max-width: 480px) {
    form {
        padding: 1.5rem;
        border-radius: 12px;
    }
    #password-field,
    .btn-submit {
        font-size: 14px;
        padding: 12px;
    }
}


/* ===========================
   Grid of Resource Cards
   =========================== */

.resources-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.resource-card {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    flex: 0 0 calc(20% - 15px);
    max-width: calc(20% - 15px);
    text-decoration: none;
    color: var(--text-color, #111);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}


/* Image inside card - smaller size */

.resource-card img {
    width: 80%;
    /* smaller than full width */
    max-height: 120px;
    margin: 10px auto;
    object-fit: contain;
    display: block;
}


/* Card text */

.resource-card h3 {
    margin: 8px 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.resource-card p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted, #555);
}


/* ===========================
   Dark Mode Support
   =========================== */

body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-mode .resource-card {
    --card-bg: #1e1e1e;
    --text-color: #f5f5f5;
}


/* Make the description text white in dark mode */

body.dark-mode p.center-text {
    color: #ffffff;
}


/* Keep the Download FMPro button blue even in dark mode */

body.dark-mode #download-btn {
    --btn-bg: #007bff;
    /* blue background */
    --btn-hover-bg: #0056b3;
    /* darker blue on hover */
    color: #fff;
}


/* ===========================
   Download Button
   =========================== */

.btn-primary {
    display: inline-block;
    background-color: var(--btn-bg, #007bff);
    color: #fff;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin: 25px auto;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--btn-hover-bg, #0056b3);
}

body.dark-mode .btn-primary {
    --btn-bg: #2a2a2a;
    --btn-hover-bg: #444;
    color: #fff;
}


/* ===========================
   Video Tutorials Grid
   =========================== */

.aiovg {
    margin-top: 40px;
}

.aiovg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.aiovg-col {
    flex: 0 0 calc(20% - 15px);
    max-width: calc(20% - 15px);
}

.aiovg-thumbnail {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.aiovg-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.aiovg-responsive-container {
    display: block;
    width: 100%;
    position: relative;
}

.aiovg-responsive-element {
    width: 80%;
    /* smaller than full width */
    max-height: 120px;
    margin: 10px auto;
    object-fit: contain;
    display: block;
}

.aiovg-caption {
    padding: 10px 8px;
}

.aiovg-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    text-align: center;
}

.aiovg-count {
    font-size: 0.85rem;
    color: var(--text-muted, #555);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aiovg-svg-icon {
    margin-right: 4px;
    fill: currentColor;
}


/* Dark Mode Video Cards */

body.dark-mode .aiovg-thumbnail {
    --card-bg: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .aiovg-count {
    color: #aaa;
}


/* ===========================
   Responsive Adjustments
   =========================== */

@media (max-width: 1200px) {
    .resource-card,
    .aiovg-col {
        flex: 0 0 calc(33.33% - 15px);
        max-width: calc(33.33% - 15px);
    }
}

@media (max-width: 768px) {
    .resource-card,
    .aiovg-col {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 576px) {
    .resource-card,
    .aiovg-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}