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

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1200px !important;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Header Styles - Consistent for all pages */
header.header,
header.header.header,
body header.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    position: relative;
    z-index: 1000;
}

header.header .navbar,
header.header .navbar.navbar-dark,
header.header .navbar.navbar-expand-lg,
body header.header .navbar,
body header.header .navbar.navbar-dark {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    padding: 0.75rem 0 !important;
    background-color: transparent !important;
}

header.header .navbar-brand,
header.header .navbar-brand.d-flex,
header.header .navbar-brand.align-items-center,
body header.header .navbar-brand {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: white !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
}

header.header .navbar-brand:hover,
header.header .navbar-brand:focus,
body header.header .navbar-brand:hover {
    color: white !important;
}

header.header .navbar-brand i,
header.header .navbar-brand .me-2,
body header.header .navbar-brand i {
    font-size: 1.3rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 0.5rem !important;
    color: white !important;
}

header.header .navbar-brand span,
body header.header .navbar-brand span {
    display: inline-block !important;
    vertical-align: middle !important;
    color: white !important;
}

header.header .navbar-nav .nav-link,
header.header .navbar-dark .navbar-nav .nav-link,
body header.header .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
    padding: 0.5rem 1rem !important;
}

header.header .navbar-nav .nav-link:hover,
header.header .navbar-nav .nav-link:focus,
header.header .navbar-dark .navbar-nav .nav-link:hover,
body header.header .navbar-nav .nav-link:hover {
    color: white !important;
}

header.header .navbar-dark .navbar-nav .nav-link,
body header.header .navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
}

header.header .navbar-dark .navbar-nav .nav-link:hover,
header.header .navbar-dark .navbar-nav .nav-link:focus,
body header.header .navbar-dark .navbar-nav .nav-link:hover {
    color: white !important;
}

header.header .navbar-toggler,
header.header .navbar-dark .navbar-toggler,
body header.header .navbar-toggler {
    border-color: rgba(255,255,255,0.3) !important;
    padding: 0.25rem 0.5rem !important;
}

header.header .navbar-toggler-icon,
header.header .navbar-dark .navbar-toggler-icon,
body header.header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

header.header .navbar-toggler:focus,
header.header .navbar-dark .navbar-toggler:focus,
body header.header .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255,255,255,0.25) !important;
}

header.header .dropdown-menu,
body header.header .dropdown-menu {
    border: none !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    padding: 10px 0 !important;
    margin-top: 10px !important;
    min-width: 250px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
    animation: dropdownFadeIn 0.3s ease-out !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header.header .dropdown-item,
body header.header .dropdown-item {
    padding: 12px 25px !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    border-left: 3px solid transparent !important;
    margin: 2px 8px !important;
    border-radius: 8px !important;
    position: relative !important;
    overflow: hidden !important;
}

header.header .dropdown-item::before,
body header.header .dropdown-item::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 3px !important;
    height: 100% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    transform: scaleY(0) !important;
    transition: transform 0.3s ease !important;
}

header.header .dropdown-item:hover::before,
body header.header .dropdown-item:hover::before {
    transform: scaleY(1) !important;
}

header.header .dropdown-item:hover,
body header.header .dropdown-item:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%) !important;
    color: white !important;
    border-left-color: #3b82f6 !important;
    transform: translateX(5px) !important;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3) !important;
}

header.header .dropdown-item i,
body header.header .dropdown-item i {
    width: 20px !important;
    text-align: center !important;
    transition: transform 0.3s ease !important;
}

header.header .dropdown-item:hover i,
body header.header .dropdown-item:hover i {
    transform: scale(1.2) rotate(5deg) !important;
    color: white !important;
}

header.header .dropdown-divider,
body header.header .dropdown-divider {
    margin: 8px 15px !important;
    border-top: 1px solid rgba(30, 58, 138, 0.1) !important;
    opacity: 0.5 !important;
}

header.header .dropdown-toggle::after,
body header.header .dropdown-toggle::after {
    transition: transform 0.3s ease !important;
    margin-left: 8px !important;
}

header.header .dropdown-toggle[aria-expanded="true"]::after,
body header.header .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg) !important;
}

/* Active dropdown item styling */
.dropdown-item.active,
.dropdown-item:active {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

/* Better spacing for dropdown items */
.dropdown-menu li:first-child .dropdown-item {
    margin-top: 5px;
}

.dropdown-menu li:last-child .dropdown-item {
    margin-bottom: 5px;
}

/* Enhanced dropdown menu for mobile */
@media (max-width: 991px) {
    .dropdown-menu {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(30, 58, 138, 0.15);
    }
    
    .dropdown-item {
        padding: 14px 25px;
        font-size: 1rem;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 2px;
}

.hero-buttons {
    margin-top: 30px;
}

.hero-buttons .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: none !important;
    transition: none !important;
}

.hero-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Hero Shapes */
.hero-shapes {
    position: relative;
    height: 400px;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Styles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 2px;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.category-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.category-thumbnail-top {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
    background: #f0f0f0;
}

.category-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.category-card:hover .category-thumbnail-image {
    transform: scale(1.05);
}

.category-card-content {
    padding: 30px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-card .category-thumbnail-top + .category-card-content {
    padding-top: 25px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
    overflow: hidden;
    position: relative;
}

.category-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.category-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.category-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #60a5fa;
}

/* Tutorial Cards */
.tutorial-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tutorial-image {
    height: 120px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.tutorial-content {
    padding: 20px;
}

.tutorial-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.tutorial-description {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tutorial-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: #999;
}

.tutorial-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Latest Tutorial Cards */
.latest-tutorial-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.latest-tutorial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.tutorial-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Featured Tutorials Section */
.featured-tutorials {
    background: #f8f9fa;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.newsletter-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.newsletter-form .form-control {
    border: none;
    border-radius: 25px 0 0 25px;
    padding: 15px 20px;
    font-size: 1rem;
}

.newsletter-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 15px 25px;
    font-weight: 600;
}

/* Footer - Consistent styling for all pages */
footer.footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

footer.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

footer.footer h5, 
footer.footer h6 {
    color: white !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white !important;
}

.footer-description {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.social-link:hover {
    background: white;
    color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.copyright {
    color: rgba(255,255,255,0.7);
}

.footer-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: white;
}

footer.footer .text-white-50 {
    color: rgba(255,255,255,0.85) !important;
    transition: color 0.3s ease;
}

footer.footer .text-white-50:hover {
    color: white !important;
    text-decoration: underline;
}

footer.footer a.text-white-50 {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer.footer a.text-white-50:hover {
    color: white !important;
    text-decoration: underline !important;
}

footer.footer hr {
    border-color: rgba(255,255,255,0.2) !important;
    opacity: 1;
}

/* Utility Classes */
.bg-light {
    background-color: #f8f9fa !important;
}

.text-primary {
    color: #3b82f6 !important;
}

/* Bootstrap Override for Light Blue Theme */
.bg-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%) !important;
}

/* Duplicate removed - using header.header scoped styles above */

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary {
    border: 2px solid #3b82f6;
    color: #3b82f6;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: #3b82f6;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-card {
        margin-bottom: 20px;
    }
    
    .newsletter-section .row {
        text-align: center;
    }
    
    .newsletter-form {
        margin-top: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .categories-section,
    .featured-tutorials,
    .latest-tutorials {
        padding: 40px 0;
    }
    
    .category-card-content {
        padding: 20px 15px;
    }
    
    .category-thumbnail-top {
        height: 150px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
}

/* Subcategory Styles */
.subcategory-card {
    display: block;
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.subcategory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
    border-color: #3b82f6;
}

.subcategory-card.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

.subcategory-icon {
    margin-bottom: 15px;
}

.subcategory-icon i {
    font-size: 2rem;
    color: #3b82f6;
}

.subcategory-card.active .subcategory-icon i {
    color: white;
}

.subcategory-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.subcategory-card.active .subcategory-title {
    color: white;
}

.subcategory-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.4;
}

.subcategory-card.active .subcategory-description {
    color: rgba(255,255,255,0.9);
}

.subcategories-section {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (992px) */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .hero-image-container {
        height: 300px;
        margin-top: 30px;
    }
    
    .hero-image {
        max-height: 300px;
    }
    
    .category-card {
        margin-bottom: 20px;
    }
    
    .tutorial-card {
        margin-bottom: 20px;
    }
}

/* Mobile devices (768px) */
@media (max-width: 768px) {
    /* Header & Navigation */
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav {
        background: rgba(255,255,255,0.1);
        border-radius: 10px;
        padding: 15px;
        margin-top: 10px;
    }
    
    .navbar-toggler {
        border-color: rgba(255,255,255,0.5);
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 0 40px 0;
    }
    
    .hero-section h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-section .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
    
    /* Category Section */
    .categories-section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .category-card {
        padding: 25px 20px;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.95rem;
    }
    
    /* Tutorials Section */
    .tutorials-section {
        padding: 40px 0;
    }
    
    .tutorial-card {
        margin-bottom: 20px;
    }
    
    .tutorial-title {
        font-size: 1.15rem;
    }
    
    .tutorial-description {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px 0;
    }
    
    .footer-section h5 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .footer-section ul li {
        margin-bottom: 8px;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    /* Breadcrumb */
    .breadcrumb-nav {
        padding: 12px 0;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
    }
}

/* Small mobile devices (576px) */
@media (max-width: 576px) {
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 50px 0 35px 0;
    }
    
    .hero-section h1 {
        font-size: 1.65rem;
        margin-bottom: 15px;
    }
    
    .hero-section p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .hero-section .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-image-container {
        height: 250px;
        margin-top: 30px;
    }
    
    .hero-image {
        max-height: 250px;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    /* Categories */
    .categories-section {
        padding: 35px 0;
    }
    
    .category-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .category-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .category-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .category-stats {
        font-size: 0.85rem;
        gap: 10px;
    }
    
    /* Tutorial Cards */
    .tutorials-section {
        padding: 35px 0;
    }
    
    .tutorial-card {
        padding: 18px;
        border-radius: 12px;
    }
    
    .tutorial-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .tutorial-description {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .tutorial-meta {
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 15px 0;
    }
    
    .footer-section {
        margin-bottom: 25px;
        text-align: center;
    }
    
    .footer-section h5 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .footer-section ul li {
        margin-bottom: 6px;
    }
    
    .footer-section ul li a {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
    
    /* Breadcrumb */
    .breadcrumb-nav {
        padding: 10px 0;
    }
    
    .breadcrumb-item {
        font-size: 0.85rem;
    }
    
    /* Subcategories */
    .subcategory-card {
        padding: 18px;
        margin-bottom: 15px;
    }
    
    .subcategory-icon i {
        font-size: 1.75rem;
    }
    
    .subcategory-title {
        font-size: 1rem;
    }
    
    .subcategory-description {
        font-size: 0.85rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.3rem;
    }
}

/* Extra small devices (380px) */
@media (max-width: 380px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .tutorial-title {
        font-size: 1rem;
    }
}

/* Landscape orientation fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0 30px 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .hero-section p {
        margin-bottom: 15px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .hero-section,
    .navbar,
    .breadcrumb-nav {
        display: none !important;
    }
    
    .tutorial-content,
    .category-content {
        color: #000;
        font-size: 12pt;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover,
    .tutorial-card:hover,
    .btn:hover {
        transform: none;
    }
    
    .category-card:active,
    .tutorial-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: translateY(0);
    }
}

