/*
Theme Name: AlphaReach
Theme URI: https://alphareach.tech/
Author: AlphaReach
Description: Custom WordPress theme for AlphaReach Technologies.
Version: 1.0.0
Text Domain: alphareach
*/

:root {
    --primary-color: #0aec33;
    --dark-blue: #012641;
    --light-gray: #f2f2f2;
    --deep-black: #0f0f0f;
    --soft-gray: #eaeaea;
    --text-black: #0f0f0f;
    --marquee-speed: 8s;
    --font-family: 'Onest', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #fff;
    color: var(--text-black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Bar */

.navbar {
    position: sticky;
    top: 0;
    background: white;
    padding: 16px 0;
    z-index: 1000;
    width: 100%;
    border-bottom: var(--primary-color) 1px solid;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    flex: 0;
}

.logo img {
    height: 45px;
    width: auto;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1002;
}

.profile-container {
    position: relative;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: var(--color-green) 2px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    margin-top: 10px;
}

/* For desktop - show on hover and click */
@media (min-width: 769px) {
    .profile-container:hover .profile-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* For mobile - show on click only */
@media (max-width: 768px) {
    .profile-container.active .profile-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.nav-and-profile {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1002;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 19px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-green);
}

.login-btn {
    background: var(--deep-black);
    color: white;
    padding: 10px 30px;
    border-radius: 35px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.login-btn:hover {
    background: var(--deep-black);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.hamburger span {
    background: #333;
    height: 3px;
    width: 30px;
    margin: 5px 0;
    transition: all 0.3s ease;
    transform-origin: left center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -2px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 2px);
}

@media (max-width: 768px) {
    .nav-and-profile {
        gap: 0;
    }

    .right-section {
        order: -1;
        margin-left: auto;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        background: white;
        width: 100%;
        height: 100vh;
        padding: 80px 20px 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
        transition: right 0.3s ease;
        justify-content: flex-start;
        gap: 20px;
        margin-left: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-link {
        font-size: 24px;
        padding: 15px 0;
    }

    .contact-btn {
        margin-top: 20px;
        padding: 15px 30px;
        font-size: 18px;
    }
}

/* --- Blog Hero Section --- */
.blog-hero {
    background-color: var(--dark-blue);
    color: #fff;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(10, 236, 51, 0.05) 0%, transparent 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Search & Filter --- */
.blog-controls {
    max-width: 1200px;
    margin: -2rem auto 3rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 10;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border: 1px solid var(--soft-gray);
    border-radius: 8px;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tag-btn {
    padding: 0.5rem 1.2rem;
    background: var(--light-gray);
    border: none;
    border-radius: 20px;
    font-family: var(--font-family);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tag-btn.active {
    background: var(--primary-color);
    color: var(--deep-black);
}

.tag-btn:hover:not(.active) {
    background: var(--soft-gray);
}

/* --- Featured Post --- */
.featured-section {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.featured-img {
    height: 400px;
    background: #eee url('https://images.unsplash.com/photo-1521737711867-e3b97375f902?auto=format&fit=crop&w=800&q=80') center/cover;
}

.featured-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-label {
    display: inline-block;
    background: rgba(10, 236, 51, 0.1);
    color: #089d22;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.featured-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-content p {
    color: #666;
    margin-bottom: 2rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
}

/* --- Blog Grid --- */
.blog-grid-section {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
}

.grid-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.grid-header h3 {
    font-size: 1.8rem;
}

.blog-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--soft-gray);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
}

.card-body {
    padding: 1.5rem;
}

.card-body h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.blog-card:hover h4 {
    color: var(--primary-color);
}

.card-body p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    text-decoration: none;
    color: var(--dark-blue);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.read-more i {
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* --- Reading Progress Bar --- */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background-color: var(--primary-color);
    z-index: 1001;
}

/* --- Article Header --- */
.article-header {
    max-width: 800px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
    text-align: center;
}

.article-header .post-label {
    display: inline-block;
    background: rgba(10, 236, 51, 0.1);
    color: #089d22;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--dark-blue);
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}

.article-meta .author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
}

.article-featured-image {
    width: 100%;
    max-width: 1000px;
    height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin: 0 auto 3rem;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- Article Content Layout --- */
.article-container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 2rem;
    align-items: start;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    padding-right: 2rem;
}

.table-of-contents {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table-of-contents h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents ul li a {
    text-decoration: none;
    color: var(--text-black);
    display: block;
    padding: 0.5rem 0;
    transition: var(--transition);
    font-size: 0.95rem;
}

.table-of-contents ul li a:hover,
.table-of-contents ul li a.active {
    color: var(--primary-color);
    transform: translateX(5px);
}

.table-of-contents ul li ul {
    padding-left: 1rem;
    border-left: 2px solid var(--soft-gray);
    margin-top: 0.5rem;
}

.table-of-contents ul li ul li a {
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--dark-blue);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-content blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: var(--light-gray);
    border-radius: 5px;
    font-style: italic;
    color: #555;
    quotes: "\201C" "\201D" "\2018" "\2019";
}

/* --- Author Bio --- */
.author-bio {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--soft-gray);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.author-bio .author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.author-info h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.author-info p {
    font-size: 0.95rem;
    color: #555;
}

/* --- Social Share --- */
.social-share {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
    text-align: center;
}

.social-share h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-blue);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: var(--transition);
}

.share-buttons a.facebook {
    background-color: #3b5998;
}

.share-buttons a.twitter {
    background-color: #00acee;
}

.share-buttons a.linkedin {
    background-color: #0e76a8;
}

.share-buttons a.whatsapp {
    background-color: #25d366;
}

.share-buttons a:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* --- Related Articles --- */
.related-articles {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.related-articles h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-blue);
    text-align: center;
}

/* --- Newsletter Section --- */
.newsletter-banner {
    background: var(--primary-color);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 0;
}

.newsletter-container {
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--deep-black);
    font-weight: 600;
}

.newsletter-container p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
}

.newsletter-form-inline {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.newsletter-form-inline input {
    flex: 1;
    max-width: 350px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
}

.newsletter-form-inline button {
    background: var(--dark-blue);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form-inline button:hover {
    opacity: 0.9;
}

/* Layout Utility Classes (Bootstrap Equivalents) */
.container {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.footer-section {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 992px) {
    .footer-about {
        flex: 0 0 35%;
        max-width: 35%;
    }
    .footer-links {
        flex: 0 0 20%;
        max-width: 20%;
    }
    .newsletter {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .footer-about, .newsletter {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 30px;
    }
    .footer-links {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 30px;
    }
}

/* Footer Section */
.footer {
    background-color: var(--text-black);
    color: white;
    padding: 60px 0 20px;
}

.footer-logo {
    max-height: 40px;
    margin-bottom: 20px;
}

.footer-about p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-icons {
    margin-bottom: 30px;
}

.social-icons a {
    color: white;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.footer-links h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.newsletter form {
    margin-bottom: 20px;
}

.newsletter p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.newsletter-input {
    display: flex;
}

.newsletter-input input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 4px 0 0 4px;
}

.newsletter-input input:focus {
    outline: none;
}

.newsletter-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-input button:hover {
    background-color: #09d62d;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.6;
}

@media (max-width: 767px) {
    .footer-section {
        margin-bottom: 30px;
    }


    .footer .row {
        display: flex;
        flex-wrap: wrap;
    }


    .footer-about {
        width: 100%;
    }


    .footer-links {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }


    .newsletter {
        width: 100%;
        margin-top: 15px;
    }
}

.static a {
    color: var(--dark-blue);
}

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

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-img {
        height: 300px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .article-container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .table-of-contents {
        max-width: 100%;
    }

    .article-header h1 {
        font-size: 2.5rem;
    }

    .article-featured-image {
        height: 300px;
    }
}

@media (max-width: 768px) {

    .blog-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .newsletter-form-inline {
        flex-direction: column;
    }

    .blog-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    /* Featured Image - Add padding on mobile */
    .article-featured-image {
        margin: 0 1rem 3rem 1rem;
    }

    /* Social Share - Hide text on mobile, show only icons */
    .share-buttons a .share-text {
        display: none;
    }

    .share-buttons a {
        padding: 0.8rem 1rem;
        justify-content: center;
    }

    .share-buttons a i {
        margin: 0;
    }

    /* Newsletter form on mobile */
    .newsletter-form-inline input,
    .newsletter-form-inline button {
        width: 100%;
    }
}