/*
Theme Name: Ahmed Showky Portfolio
Theme URI: https://ahmedshowky.com
Author: Ahmed Showky
Author URI: https://ahmedshowky.com
Description: A modern, responsive portfolio theme for WordPress with dark/light mode support, built with Bootstrap 5 and featuring smooth animations.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ash-showky-theme
Tags: portfolio, responsive, bootstrap, dark-mode, custom-header, custom-menu, featured-images, blog
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    transition: all 0.3s ease;
}

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    text-align: center;
    font-style: italic;
    margin-top: 0.5em;
}

/* Navigation */
.navbar-brand.logo {
    font-weight: bold;
    color: var(--bs-primary);
    text-decoration: none;
}

.logo-name {
    color: var(--bs-body-color);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bs-body-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

/* Theme Toggle */
#switchTheme {
    background: none;
    border: none;
    color: var(--bs-body-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#switchTheme:hover {
    color: var(--bs-primary);
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    
    .offcanvas-body {
        padding: 2rem 1rem;
    }
}

/* WordPress Admin Bar Adjustment */
.admin-bar #header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar #header {
        top: 46px;
    }
}

/* Blog and Post Styles */
.post-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bs-body-bg);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.entry-title a {
    color: var(--bs-body-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--bs-primary);
}

/* Single Post Styles */
.single-post .entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.single-post .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Sidebar Styles */
.widget-area {
    position: sticky;
    top: 2rem;
}

.widget {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bs-body-color);
}

/* Search Form */
.search-form .input-group {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bs-border-color);
}

.comment-item {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination .page-link {
    color: var(--bs-primary);
    border-color: var(--bs-border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Footer Styles */
.footer-menu {
    margin: 0;
    padding: 0;
}

.footer-menu li {
    display: inline-block;
    margin-left: 1rem;
}

.footer-menu a {
    color: var(--bs-body-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: var(--bs-primary);
}

/* Social Share Buttons */
.share-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Related Posts */
.related-posts .card {
    border: 1px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.related-posts .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 404 Page */
.error-404 .page-title {
    font-size: 8rem;
    font-weight: 900;
    color: var(--bs-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .error-404 .page-title {
        font-size: 4rem;
    }
    
    .widget-area {
        position: static;
        margin-top: 2rem;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary-dark);
}

/* Partners Section */
#partners {
    padding: 100px 0px;
    min-height: 100vh;
    background-image: url(/assets/images/grid.png);
    background-size: contain;
}

/* Fixed container - never moves */
.partners-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

/* Slider wrapper - also fixed */
.partners-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Track that displays partners in grid */
.partners-track {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    /* No animation - static display */
}

.partner-item {
    flex: 0 0 calc(25% - 30px); /* 4 items per row (25% each minus gap) */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    min-width: 120px;
    max-width: 200px;
    padding: 10px;
    margin-bottom: 20px; /* Space between rows */
}

.partner-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.partner-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.partner-item a:hover {
    text-decoration: none;
    color: inherit;
}

.partner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    background: var(--bs-light);
    border: 2px dashed var(--bs-border-color);
    border-radius: 8px;
    color: var(--bs-muted);
    font-weight: 500;
    text-align: center;
    padding: 10px;
}

.partner-logo {
    max-height: 60px;
    max-width: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Partners Static Display - No Animation */
/* Animation removed - partners are now displayed in a static grid */

/* Partners Navigation Buttons */
.partners-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.partners-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.partners-nav.prev {
    left: 10px;
}

.partners-nav.next {
    right: 10px;
}

/* Responsive Partners */
@media (max-width: 768px) {
    .partners-track {
        gap: 20px;
    }
    
    .partner-item {
        flex: 0 0 calc(50% - 10px); /* 2 items per row on mobile */
    }
    
    .partners-slider {
        overflow: visible; /* No scrolling needed */
    }
}
    
    .partner-logo {
        max-height: 40px;
        max-width: 120px;
        width: 100%;
        height: auto;
    }
    
    .partner-item {
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .partners-nav {
        display: flex;
    }
}

@media (max-width: 480px) {
    .partner-item {
        flex: 0 0 calc(100% - 10px); /* 1 item per row on small mobile */
        min-width: 100px;
    }

    .partner-logo {
        max-height: 35px;
        max-width: 100px;
    }

    .partners-nav {
        display: none; /* Hide navigation buttons - not needed for static display */
    }
}

/* Dark mode adjustments for partners */
[data-bs-theme="dark"] .partner-placeholder {
    background: var(--bs-dark);
    border-color: var(--bs-secondary);
    color: var(--bs-light);
}

/* Partner hover effects */
.partner-item a:hover .partner-logo {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Admin styles for partners */
.partner-logo-preview img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Testimonial Avatar Placeholder */
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
}

/* Admin styles for testimonials */
.testimonial-avatar-preview img {
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide Testimonials Section */
#testimonials {
    display: none !important;
}

/* Typing Animation Cursor */
.cursor-blink {
    animation: blink 1s infinite;
    color: var(--bs-primary);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}