/* 
 * Main Stylesheet
 * Additional styles for the 1Percent theme
 * 
 * @package 1Percent
 */

/* ===========================
   Header & Navigation
   =========================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.main-navigation {
    padding: 25px 0;
    transition: padding 0.3s ease;
}

.site-header.scrolled .main-navigation {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.site-header.scrolled .site-title {
    color: var(--color-dark);
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    height: auto;
    max-height: 60px;
    width: auto;
    transition: max-height 0.3s ease;
}

.site-header.scrolled .custom-logo {
    max-height: 45px;
}

/* Dual Logo Styling */
.custom-logo-link {
    position: relative;
    display: block;
    line-height: 0;
}

.logo-light,
.logo-dark {
    height: auto;
    max-height: 60px;
    width: auto;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.logo-dark {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.site-header:not(.scrolled) .logo-light {
    opacity: 1;
}

.site-header:not(.scrolled) .logo-dark {
    opacity: 0;
}

.site-header.scrolled .logo-light {
    opacity: 0;
}

.site-header.scrolled .logo-dark {
    opacity: 1;
}

.site-header.scrolled .logo-light,
.site-header.scrolled .logo-dark {
    max-height: 45px;
}

.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 45px;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.site-header.scrolled .nav-menu a {
    color: var(--color-gray-700);
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--color-accent);
}

.nav-menu .current-menu-item > a {
    color: var(--color-accent);
}

.site-header:not(.scrolled) .nav-menu .current-menu-item > a {
    color: var(--color-white);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
    width: 100%;
}

.nav-actions {
    flex: 0 0 auto;
}

.nav-actions .btn {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    text-transform: uppercase;
    background: rgba(30, 41, 59, 0.6);
    color: #ffffff;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(6, 182, 212, 0.3);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-actions .btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #06b6d4;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.site-header.scrolled .nav-actions .btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(6, 182, 212, 0.4);
}

.site-header.scrolled .nav-actions .btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #06b6d4;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: all 0.3s ease;
}

.site-header.scrolled .mobile-menu-toggle span {
    background: var(--color-dark);
}

/* Header Spacer */
.header-spacer {
    height: 0px;
}

/* Responsive Navigation */
@media (max-width: 992px) {
    .header-spacer {
        height: 70px;
    }

    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-white);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        padding: 100px 30px 30px;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu-wrapper.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-gray-200);
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
        color: var(--color-dark);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-actions .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .site-branding .site-title {
        font-size: 1.4rem;
    }
}

/* Mobile menu overlay */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* ===========================
   Footer
   =========================== */

.site-footer {
    background: var(--color-dark);
    color: var(--color-gray-300);
    padding-top: 60px;
}

.footer-widgets {
    padding-bottom: 40px;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-widget-area .widget {
    margin-bottom: 30px;
}

.footer-widget-area .widget-title {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-area ul li {
    margin-bottom: 10px;
}

.footer-widget-area a {
    color: var(--color-gray-300);
    transition: var(--transition-fast);
}

.footer-widget-area a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
}

.footer-bottom-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    margin: 0;
    font-size: 14px;
}

.copyright a {
    color: var(--color-white);
    font-weight: 600;
}

.footer-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.footer-nav-menu a {
    font-size: 14px;
    color: var(--color-gray-300);
}

@media (max-width: 768px) {
    .footer-bottom-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================
   Blog & Archive Layouts
   =========================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.post-card .post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.post-card .post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card .post-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .entry-meta {
    font-size: 14px;
    color: var(--color-gray-600);
    margin-bottom: 15px;
}

.post-card .entry-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.post-card .entry-title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.post-card .entry-title a:hover {
    color: var(--color-primary);
}

.post-card .entry-excerpt {
    color: var(--color-gray-600);
    margin-bottom: 20px;
    flex: 1;
}

.post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.post-card .read-more:hover {
    gap: 12px;
    color: var(--color-secondary);
}

.post-card .read-more .arrow {
    transition: var(--transition-fast);
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ===========================
   Single Post
   =========================== */

.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    margin-bottom: 20px;
}

.single-post .entry-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--color-gray-600);
    margin-bottom: 20px;
}

.single-post .post-thumbnail {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post .entry-content {
    margin-bottom: 40px;
}

.single-post .entry-content > * {
    margin-bottom: 1.5rem;
}

.single-post .entry-footer {
    padding-top: 30px;
    border-top: 1px solid var(--color-gray-200);
}

.single-post .entry-footer span {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

/* ===========================
   Sidebar
   =========================== */

.widget-area {
    padding-left: 40px;
}

.widget {
    background: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
}

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

.widget ul li {
    margin-bottom: 12px;
}

.widget a {
    color: var(--color-gray-700);
    transition: var(--transition-fast);
}

.widget a:hover {
    color: var(--color-primary);
}

@media (max-width: 992px) {
    .widget-area {
        padding-left: 0;
        margin-top: 60px;
    }
}

/* ===========================
   Page & Content Areas
   =========================== */

.content-area {
    flex: 1;
    padding: 60px 0;
}

.page-header {
    margin-bottom: 50px;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 15px;
}

.archive-description {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    max-width: 700px;
    margin: 0 auto;
}

/* Two-column layout for blog/archive pages with sidebar */
.site-content .content-area-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
}

.no-sidebar .site-content .content-area-wrapper {
    grid-template-columns: 1fr;
}

@media (max-width: 992px) {
    .site-content .content-area-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Pagination & Navigation
   =========================== */

.posts-navigation,
.post-navigation,
.posts-pagination {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--color-gray-200);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: 8px;
    color: var(--color-gray-700);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}

.nav-links a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.page-numbers {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.page-numbers .page-numbers {
    padding: 10px 16px;
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: 8px;
    color: var(--color-gray-700);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.page-numbers .page-numbers:hover,
.page-numbers .page-numbers.current {
    border-color: var(--color-primary);
    color: var(--color-white);
    background: var(--gradient-primary);
}

/* ===========================
   Accessibility
   =========================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    background-color: var(--color-white);
    box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.2);
    color: var(--color-primary);
    display: block;
    font-size: 14px;
    font-weight: 700;
    left: -9999em;
    outline: none;
    padding: 15px 23px 14px;
    text-decoration: none;
    text-transform: none;
    top: -9999em;
}

.skip-link:focus {
    clip: auto;
    height: auto;
    left: 6px;
    top: 7px;
    width: auto;
    z-index: 100000;
}

/* ===========================
   Front Page Specific
   =========================== */

.front-page-content {
    width: 100%;
}

/* ===========================
   Back to Top Button
   =========================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===========================
   Responsive Images
   =========================== */

img {
    height: auto;
    max-width: 100%;
}

/* ===========================
   WordPress Core Alignments
   =========================== */

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}
