/* Import all styles from home.php */
:root {
    --primary: #1a3c34;
    --primary-dark: #132a24;
    --secondary: #ffd700;
    --secondary-dark: #e6c200;
    --accent: #ff6b6b;
    --dark: #212529;
    --light: #f8fafc;
    --gray: #64748b;
    --green-white: #28a745;
    --light-gray: #e2e8f0;
    --gradient: linear-gradient(135deg, #1a3c34, #2a5c50);
    --gradient-light: linear-gradient(135deg, rgba(26, 60, 52, 0.1), rgba(42, 92, 80, 0.1));
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation (Updated with new structure) */
header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: var(--primary-dark);
}

header.scrolled {
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1;
    flex-shrink: 0;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-dark);
    letter-spacing: 0.5px;
}

.logo-sub {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--light);
    margin-top: 2px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 0rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.nav-links>li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
    display: block;
    font-size: 0.95rem;
}

.nav-links>li>a {
    padding: 0rem 1rem;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links>li>a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--light-gray);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links>li>a:hover::after {
    width: calc(100% - 2rem);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 0.8rem 0;
    z-index: 999;
}

.nav-links>li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    padding: 0.1rem 1.5rem;
    font-size: 0.95rem;
    color: var(--dark);
    display: block;
}

.dropdown a:hover {
    background: var(--light-gray);
    color: var(--primary);
    padding-left: 2rem;
}

.dropdown-header {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.has-dropdown>a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-links>li:hover>.has-dropdown>a::after {
    transform: rotate(180deg);
}

.nav-login-btn {
    padding: 0.5rem 1.5rem !important;
    border: 2px solid var(--secondary);
    border-radius: 50px;
    color: var(--secondary);
    transition: var(--transition);
}

.nav-login-btn:hover {
    background: var(--secondary);
    color: #000;
    transform: translateY(-3px);
}

.mobile-dropdown-toggle {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(26, 60, 52, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--light);
    cursor: pointer;
    z-index: 1001;
    min-height: 44px;
    width: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-nav-buttons {
    display: none;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    padding: 0 1.5rem;
}

/* RESPONSIVE: Below 850px */
@media (max-width: 850px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 100px;
        transition: left 0.4s ease;
        z-index: 999;
        gap: 0;
        overflow-y: auto;
        color: var(--dark);
        background-color: var(--primary);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links>li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-links>li>a {
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile-dropdown-toggle {
        display: flex;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(248, 249, 250, 0.8);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        border-radius: 0;
        width: 100%;
    }

    .dropdown.open {
        max-height: 1000px;
        padding: 0.5rem 0;
    }

    .dropdown a {
        padding: 0.8rem 3rem;
        font-size: 1rem;
    }

    .dropdown-header {
        padding: 0.8rem 3rem 0.3rem;
    }

    .dropdown-divider {
        margin: 0.5rem 3rem;
    }

    .has-dropdown>a::after {
        display: none;
    }

    .nav-buttons {
        display: none;
    }

    .mobile-nav-buttons {
        display: flex;
    }

    .logo-main {
        font-size: 1.5rem;
    }

    .logo-sub {
        font-size: 0.8rem;
    }

    .nav-login-btn {
        border: none !important;
        padding: 1rem 1.5rem !important;
    }
}

@media (max-width: 576px) {
    nav {
        padding: 0.8rem 1rem;
    }

    .logo-main {
        font-size: 1.4rem;
    }

    .logo-sub {
        font-size: 0.75rem;
    }

    .mobile-menu-btn {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .nav-links>li>a {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }

    .dropdown a {
        padding-left: 2.5rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        min-height: 40px;
        font-size: 0.9rem;
    }

    .mobile-nav-buttons {
        padding: 0 1.2rem;
    }
}

/* Tutorials Page Specific Styles */
.hero-section {
    padding: 7rem 0 3rem;
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,192C1248,192,1344,128,1392,96L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

.hero-section .lead {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Section */
.search-section {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.search-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 2.5rem;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(26, 60, 52, 0.1);
}

.search-box i {
    position: absolute;
    left: 1.0rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
}

.search-container p {
    font-size: 0.9rem;
}

/* Categories Section */
.categories-section {
    padding: 3rem 0 1rem;
    font-size: 0.8rem
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--gradient);
}

.category-icon i {
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.category-card:hover .category-icon i {
    color: var(--secondary);
}

.category-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.category-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-count {
    display: inline-block;
    background: var(--light-gray);
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tutorials Grid */
.tutorials-section {
    padding: 2rem 0 6rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--secondary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header .lead {
    color: var(--gray);
    font-size: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tutorial-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.tutorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.tutorial-card:hover .tutorial-image img {
    transform: scale(1.05);
}

.tutorial-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tutorial-badge.beginner {
    background: var(--green-white);
}

.tutorial-badge.intermediate {
    background: var(--secondary);
    color: var(--dark);
}

.tutorial-badge.advanced {
    background: var(--accent);
}

.tutorial-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-category {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tutorial-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.tutorial-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tutorial-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

.tutorial-duration,
.tutorial-date {
    color: var(--gray);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-duration i,
.tutorial-date i {
    font-size: 0.9rem;
}

/* Featured Tutorial */
.featured-tutorial {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--gradient);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.featured-content {
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content .tutorial-badge {
    position: static;
    display: inline-block;
    margin-bottom: 1rem;
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.featured-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.featured-image {
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* Footer (copied from home.php) */
footer {
    background: var(--primary-dark);
    color: #ccc;
    padding: 1rem 2rem 1rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-share {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-share span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-icons a {
    color: var(--secondary);
    font-size: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.social-icons a:hover {
    color: #fff;
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.copyright-text {
    font-size: 0.8rem;
    color: #aaa;
}

.copyright-text strong {
    color: var(--secondary);
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-links span {
    color: rgba(255, 255, 255, 0.3);
}

/* Scroll to Top */
#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
    border: none;
}

#scrollToTop.show {
    opacity: 1;
}

#scrollToTop:hover {
    background: var(--secondary-dark);
    transform: translateY(-5px);
}

/* Responsive Tutorials Page */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 3rem;
    }

    .featured-tutorial {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 300px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 8rem 0 4rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .tutorials-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 7rem 0 3rem;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .search-container {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .tutorials-grid {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 2rem;
    }

    .featured-content h2 {
        font-size: 1.8rem;
    }

    .paths-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h3 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 6rem 0 2rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .search-section {
        margin-top: -2rem;
    }

    .search-container {
        padding: 1.2rem;
        max-width: 800px;
    }

    .search-box input {
        padding: 0.8rem 1rem 0.8rem 3rem;
        font-size: 0.9rem;
    }

    .category-card {
        padding: 2rem 1.5rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .tutorial-card {
        margin-bottom: 1.5rem;
    }

    .featured-content h2 {
        font-size: 1.6rem;
    }

    .cta-content h3 {
        font-size: 1.8rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

/* Animation delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}


/* Add a hover effect for the tutorial title link */
.tutorial-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.tutorial-title a:hover {
    color: var(--primary);
}

.tutorial-card:hover .tutorial-title a {
    color: var(--primary);
}

/* Make the entire tutorial card clickable for better UX */
.tutorial-card {
    position: relative;
}

.tutorial-card .tutorial-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}



/* Additional inline styles if needed */
.tutorial-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

.tutorial-card {
    position: relative;
}

.tutorial-card .tutorial-title a {
    position: relative;
    z-index: 2;
}