/* Resources Section Styling */


/* Note: Page header, section navigation, and content section base styles are in styles.css */

.resources-theme {
    background: linear-gradient( 135deg, rgba(24, 71, 138, 1) 0%, rgba(109, 205, 59, 1) 100%);
}


/* Resources Grid */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border-top: 4px solid rgba(24, 71, 138, 1);
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.resource-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.85;
}

.resource-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.resource-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.resource-list li:last-child {
    border-bottom: none;
}

.resource-list a {
    color: rgba(24, 71, 138, 1);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

html.dark-mode .resource-list a {
    color: rgba(109, 205, 59, 1);
}

.resource-list a:hover {
    color: rgba(247, 117, 18, 1);
    margin-left: 5px;
}


/* Featured Resources */

.featured-resources {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 3rem;
    margin: 3rem 0;
    border: 2px solid var(--border-color);
}

.featured-resources h2 {
    margin-top: 0;
    color: var(--text-color);
}

.featured-item {
    background: var(--bg-color);
    border-left: 4px solid rgba(24, 71, 138, 1);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.featured-item:last-child {
    margin-bottom: 0;
}

.featured-item:hover {
    box-shadow: 0 4px 12px rgba(24, 71, 138, 0.15);
}

html.dark-mode .featured-item:hover {
    box-shadow: 0 4px 12px rgba(109, 205, 59, 0.15);
}

.featured-item h3 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 1.3rem;
}

.featured-item p {
    color: var(--text-color);
    margin-bottom: 1rem;
    opacity: 0.85;
}


/* Helpful Tips */

.helpful-tips {
    margin: 4rem 0;
}

.helpful-tips h2 {
    margin-top: 2rem;
    color: var(--text-color);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tip {
    background: var(--card-bg);
    border-left: 4px solid rgba(24, 71, 138, 1);
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tip:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tip h4 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.tip p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.85;
}


/* Checklist Styles */

.checklist-section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.checklist-section h3 {
    color: rgba(24, 71, 138, 1);
    margin-top: 0;
    border-bottom: 2px solid rgba(24, 71, 138, 1);
    padding-bottom: 1rem;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
    padding: 0.8rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.checklist-item:hover {
    background: var(--bg-color);
}

.checklist-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.checklist-item input[type="checkbox"]:checked+span {
    text-decoration: line-through;
    color: var(--text-color);
    opacity: 0.6;
}

.checklist-item span {
    flex: 1;
    font-size: 0.95rem;
}

.download-btn {
    background: #16a085;
    color: white;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #138d75;
    transform: translateY(-2px);
}

.checklist-note {
    background: var(--card-bg);
    border-left: 4px solid #16a085;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.checklist-note p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}


/* Responsive - Resources-specific only */

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.6rem;
    }
    .section-content {
        padding: 2rem 1rem;
    }
    .section-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .section-content h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    .resources-grid {
        grid-template-columns: 1fr;
    }
    .tips-grid {
        grid-template-columns: 1fr;
    }
    .featured-resources {
        padding: 2rem;
    }
    .featured-item {
        padding: 1.5rem;
    }
    .tabs {
        gap: 1rem;
        padding: 0 1rem;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .tabs a {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .checklist-section {
        padding: 1.5rem 1rem;
    }
    .checklist-section h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    .checklist-item {
        padding: 0.7rem;
        gap: 0.6rem;
    }
    .checklist-item input[type="checkbox"] {
        min-width: 1.125rem;
        min-height: 1.125rem;
    }
    .checklist-item span {
        font-size: 0.95rem;
    }
    .download-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
    }
    .checklist-note {
        padding: 1rem;
        margin-top: 2rem;
    }
    .checklist-note p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .section-content {
        padding: 1.5rem 0.75rem;
    }
    .page-header h1 {
        font-size: 1.35rem;
    }
    .section-content h2 {
        font-size: 1.25rem;
    }
    .checklist-section {
        padding: 1rem 0.75rem;
    }
    .checklist-item {
        padding: 0.6rem 0.5rem;
        flex-wrap: wrap;
    }
    .checklist-item input[type="checkbox"] {
        min-width: 1rem;
        min-height: 1rem;
    }
    .checklist-item span {
        font-size: 0.9rem;
        min-width: 100%;
    }
    .download-btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    .tabs {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    .tabs a {
        font-size: 0.8rem;
    }
}


/* Secondary Navigation */

.sub-navbar {
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
    position: sticky;
    top: 72px;
    /* Adjusted below main navbar */
    z-index: 900;
}

.sub-nav-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.sub-nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.sub-nav-links a:hover,
.sub-nav-links a.active {
    background: rgba(24, 71, 138, 1);
    color: white;
}

html.dark-mode .sub-navbar {
    background: #2d2d2d;
    border-bottom: 1px solid #444;
}

@media (max-width: 768px) {
    .sub-navbar {
        overflow-x: auto;
        padding: 0.5rem 1rem;
    }
    .sub-nav-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    .sub-nav-links a {
        white-space: nowrap;
        font-size: 0.9rem;
    }
}


/* Enhanced Topic Page Styles */


/* Callout Boxes */

.callout-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.callout-box h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.callout-box.info {
    background: rgba(24, 71, 138, 0.1);
    border-color: rgba(24, 71, 138, 1);
}

.callout-box.warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: #ff9800;
}

.callout-box.tip {
    background: rgba(109, 205, 59, 0.1);
    border-color: rgba(109, 205, 59, 1);
}

.callout-box.danger {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
}

html.dark-mode .callout-box.info {
    background: rgba(24, 71, 138, 0.2);
}

html.dark-mode .callout-box.warning {
    background: rgba(255, 152, 0, 0.2);
}

html.dark-mode .callout-box.tip {
    background: rgba(109, 205, 59, 0.2);
}

html.dark-mode .callout-box.danger {
    background: rgba(244, 67, 54, 0.2);
}


/* Statistics Highlight */

.stat-highlight {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(24, 71, 138, 0.1) 0%, rgba(109, 205, 59, 0.1) 100%);
    border-radius: 10px;
    margin: 1rem 0;
    min-width: 40%;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(24, 71, 138, 1);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

html.dark-mode .stat-number {
    color: rgba(109, 205, 59, 1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}


/* Example Box */

.example-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.example-box h4 {
    margin-top: 0;
    color: rgba(24, 71, 138, 1);
}

html.dark-mode .example-box h4 {
    color: rgba(109, 205, 59, 1);
}


/* Protection Checklist */

.protection-checklist {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.protection-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.protection-checklist li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.protection-checklist li:last-child {
    border-bottom: none;
}

.protection-checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(109, 205, 59, 1);
    font-weight: bold;
    font-size: 1.2rem;
}


/* Related Topics */

.related-topics {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    margin: 3rem 0;
}

.related-topics h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.topic-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.topic-links a {
    display: block;
    padding: 1rem;
    background: rgba(24, 71, 138, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.topic-links a:hover {
    background: rgba(24, 71, 138, 0.1);
    border-color: rgba(24, 71, 138, 1);
    transform: translateY(-2px);
}

html.dark-mode .topic-links a {
    background: rgba(109, 205, 59, 0.05);
}

html.dark-mode .topic-links a:hover {
    background: rgba(109, 205, 59, 0.1);
    border-color: rgba(109, 205, 59, 1);
}


/* Key Points List */

.key-points {
    background: linear-gradient(135deg, rgba(24, 71, 138, 0.05) 0%, rgba(109, 205, 59, 0.05) 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.key-points ul {
    margin: 0;
    padding-left: 1.5rem;
}

.key-points li {
    padding: 0.5rem 0;
}


/* Warning Signs */

.warning-signs {
    background: rgba(255, 152, 0, 0.05);
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.warning-signs h4 {
    margin-top: 0;
    color: #ff9800;
}

.warning-signs ul {
    margin-bottom: 0;
}

html.dark-mode .warning-signs {
    background: rgba(255, 152, 0, 0.1);
}


/* ==========================================
   VIDEO LIBRARY STYLES
   ========================================== */

.hero-image {
    max-width: 90%;
    margin: 2rem auto;
    display: block;
    border-radius: 12px;
}

.video-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-category h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.play-icon {
    width: 15%;
    height: auto;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 2rem;
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.video-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.difficulty.beginner {
    background: #4caf50;
    color: white;
}

.difficulty.intermediate {
    background: #ff9800;
    color: white;
}

.difficulty.advanced {
    background: #f44336;
    color: white;
}

.breadcrumb {
    padding: 1rem 0;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}


/* ==========================================
   COMING SOON BOX
   ========================================== */

.coming-soon-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.coming-soon-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.coming-soon-box p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.coming-soon-box ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-top: 0.5rem;
}


/* ==========================================
   UTILITY CLASSES
   ========================================== */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.inline-block {
    display: inline-block !important;
}

.resource-button {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    background: var(--primary-green);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.resource-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


/* Category heading override for topics/index.html */

.category-card h3.small-heading {
    font-size: 1.1rem;
}


/* Info box with colored link */

.info-link {
    color: var(--primary-color);
    font-weight: 500;
}

.info-link:hover {
    text-decoration: underline;
}


/* Emergency box styling */

.emergency-box {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff0000;
    border-radius: 4px;
}

.emergency-box p {
    margin: 0;
    color: var(--text-color);
}

.emergency-box ul {
    margin-top: 0.5rem;
}

.emergency-box strong {
    font-weight: 600;
}


/* Tool result box */

.tool-result-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}


/* Info tip box */

.info-tip-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(var(--primary-color-rgb, 74, 144, 226), 0.1);
    border-radius: 8px;
}

.info-tip-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* Form spacing utilities */

.form-group {
    margin: 1rem 0;
}

.form-group label {
    margin-left: 1rem;
}


/* Button padding override */

.btn-padding-custom {
    padding: 0.5rem 1rem;
}


/* Secondary text color */

.text-secondary {
    color: var(--text-secondary);
}

.text-small {
    font-size: 0.9rem;
}

.line-height-normal {
    line-height: 1.6;
}

.line-height-relaxed {
    line-height: 1.8;
}


/* ==========================================
   TOOLS & TEMPLATES STYLES
   ========================================== */

.tool-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tool-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.password-generator {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.password-result {
    background: white;
    color: #333;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.2rem;
    margin: 1rem 0;
    word-break: break-all;
    min-height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-options {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
}

.option-group input[type="number"],
.option-group input[type="range"] {
    padding: 0.5rem;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    width: 30%;
    min-width: 80px;
}

.btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--primary-green);
}

.template-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-green);
}

.template-card h4 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
}


/* ==========================================
   EXTERNAL RESOURCES STYLES
   ========================================== */

.resource-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resource-category h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.external-resource {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-green);
}

.external-resource h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.external-resource p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0;
}

.external-resource a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.external-resource a:hover {
    text-decoration: underline;
}

.resource-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--primary-blue);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
}