/*
Theme Name: SureNano Theme
Theme URI: https://surenano.com
Author: SureNano
Description: Custom WordPress theme for SureNano.
Version: 1.0.0
Text Domain: surenano
*/

/* 
 * The theme uses Tailwind CSS via CDN as defined in the original HTML.
 * Additional custom styles from index.html are moved here.
 */

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
    scroll-behavior: smooth;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.scroll-progress.is-active {
    opacity: 1;
}

.scroll-progress__bar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #f55d00 0%, #38bdf8 100%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1; /* Keeping it opaque since it's the specific image they want */
}

.hero-bg-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Using a very subtle white wash so the text is still somewhat readable, but letting the image shine through */
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.hero-content a, .hero-content button {
    pointer-events: auto;
}

@media (max-width: 767px) {
    .scroll-progress {
        height: 2px;
    }

    .hero-bg::after {
        background: linear-gradient(to bottom, rgba(255,255,255,0.58) 0%, rgba(255,255,255,0.86) 55%, rgba(255,255,255,0.94) 100%);
    }

    .hero-bg-media {
        object-position: 64% center;
    }

    .hover-card:hover {
        transform: none;
        box-shadow: inherit;
    }

    .market-card-glow {
        opacity: 0.22;
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Contact Us nav button styling - works whether rendered by WP menu or fallback */
#navbar .menu-item a[href*="contact"],
#navbar a[href*="contact"].nav-link-plain {
    background-color: #f55d00;
    color: #ffffff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(245,93,0,0.35);
    white-space: nowrap;
}

#navbar .menu-item a[href*="contact"]:hover {
    background-color: #c2410c;
    color: #ffffff !important;
}

/* Card Hover Effects */
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Remove list styles from nav menus */
.menu-1-container ul,
.hidden.lg\:flex ul,
#mobile-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Allow wrapping if elements are too many */
}

/* Dropdown Menu Styles */
.menu-1-container li {
    position: relative;
    display: flex;
    align-items: center;
}

.menu-1-container li > a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0; /* Give some breathing room for standard hover items */
}

.menu-1-container li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.5rem 0 !important;
    z-index: 100;
    flex-direction: column !important;
    gap: 0 !important;
}

.menu-1-container li:hover > ul.sub-menu {
    display: flex;
}

.menu-1-container li ul.sub-menu li {
    width: 100%;
    padding: 0;
}

.menu-1-container li ul.sub-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #1f2937 !important;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-1-container li ul.sub-menu li a:hover {
    background-color: #fcf5ee;
    color: #f55d00 !important;
}

.menu-1-container ul,
.hidden.lg\:flex ul {
    gap: 1.5rem; /* space-x-6 equivalent */
    align-items: center;
}

/* Base styles for sub-menus on mobile */
#mobile-menu li {
    position: relative;
    width: 100%;
}

#mobile-menu ul.sub-menu {
    display: none;
    padding-left: 1rem !important;
    margin-top: 0.25rem !important;
    border-left: 2px solid #fce7d9;
    flex-direction: column !important;
    gap: 0.25rem !important;
    background: transparent;
    width: 100%;
}

/* For mobile, we want to allow clicking to expand or use current menu states */
#mobile-menu li.menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#mobile-menu li.menu-item-has-children > a::after {
    content: "▼";
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

#mobile-menu li.current-menu-item > ul.sub-menu,
#mobile-menu li.current-menu-ancestor > ul.sub-menu,
#mobile-menu li:hover > ul.sub-menu {
    display: flex;
}

nav#mobile-menu ul,
#mobile-menu div > ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/* Style the exact last item in the desktop nav menu to look like the CTA button */
.menu-1-container ul > li:last-child {
    margin-left: 1rem !important; /* Space between normal links and button */
}

/* Pagination Styles for News Loop */
.pagination ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.pagination ul li a,
.pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background: white;
    color: #4b5563;
    text-decoration: none;
}

.pagination ul li a:hover {
    background: #fdf2f8;
    color: #f55d00;
    border-color: #fce7d9;
}

.pagination ul li span.current {
    background: #f55d00;
    color: white;
    border-color: #f55d00;
}

.pagination ul li a.next,
.pagination ul li a.prev {
    width: auto;
    padding: 0 1rem;
}

.menu-1-container ul > li:last-child > a {
    background-color: #f55d00 !important;
    color: white !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 9999px !important; /* full pill shaped */
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 4px 6px -1px rgba(245, 93, 0, 0.3), 0 2px 4px -1px rgba(245, 93, 0, 0.1) !important;
    border: 2px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.25 !important;
    height: max-content !important;
}

.menu-1-container ul > li:last-child > a:hover {
    background-color: #d14d00 !important; 
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 8px -1px rgba(245, 93, 0, 0.4), 0 4px 6px -1px rgba(245, 93, 0, 0.2) !important;
    color: white !important;
}

/* Style the exact last item in the mobile nav menu to look like the mobile CTA button */
#mobile-menu ul > li:last-child > a {
    display: block !important;
    margin-top: 1rem !important;
    background-color: #f55d00 !important;
    color: white !important;
    text-align: center !important;
    border-radius: 0.375rem !important; /* rounded-md */
    padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
    border-left: none !important;
}

#mobile-menu ul > li:last-child > a:hover {
    background-color: #c24100 !important;
    color: white !important;
}

.menu-1-container li,
.hidden.lg\:flex li,
#mobile-menu li {
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.menu-1-container li::before,
.hidden.lg\:flex li::before,
#mobile-menu li::before {
    content: none !important;
    display: none !important;
}

/* Market Card Glow Effects */
.market-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.hover-card:hover .market-card-glow {
    opacity: 1;
}

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-section.is-visible .timeline-item {
    opacity: 1;
    transform: translateY(0);
}
.timeline-line {
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.5s ease-out;
}
.fade-in-section.is-visible .timeline-line {
    transform: scaleX(1);
}

/* Single post content typography: keeps Gutenberg + Word-pasted text readable */
.single .entry-content {
    color: #4b5563;
    font-size: 1.125rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.single .entry-content > * + * {
    margin-top: 1.25em;
}

.single .entry-content .is-layout-flow > * + *,
.single .entry-content .is-layout-constrained > * + * {
    margin-block-start: var(--wp--style--block-gap, 1.25em);
}

.single .entry-content p {
    margin: 0 0 1.15em;
}

.single .entry-content p:last-child {
    margin-bottom: 0;
}

.single .entry-content .wp-block-paragraph {
    margin-top: 0;
    margin-bottom: 1.15em;
}

.single .entry-content .wp-block-freeform > * + * {
    margin-top: 1.15em;
}

.single .entry-content p:empty {
    display: none;
}

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
.single .entry-content h5,
.single .entry-content h6 {
    color: #1f4d80;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5em;
}

.single .entry-content h2 {
    font-size: 1.75rem;
}

.single .entry-content h3 {
    font-size: 1.45rem;
}

.single .entry-content ul,
.single .entry-content ol {
    margin: 0 0 1.15em;
    padding-left: 1.5rem;
}

.single .entry-content ul,
.single .entry-content ul.wp-block-list {
    list-style: disc outside;
}

.single .entry-content ol,
.single .entry-content ol.wp-block-list {
    list-style: decimal outside;
}

.single .entry-content li {
    display: list-item;
}

.single .entry-content li + li {
    margin-top: 0.45em;
}

.single .entry-content a {
    color: #f55d00;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.single .entry-content a:hover {
    color: #c2410c;
}

.single .entry-content blockquote,
.single .entry-content .wp-block-quote {
    margin: 1.5em 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #f55d00;
    background: #fff7ed;
    border-radius: 0.5rem;
    color: #374151;
}

.single .entry-content figure,
.single .entry-content table,
.single .entry-content pre {
    margin: 1.4em 0;
}

.single .entry-content img {
    max-width: 100%;
    height: auto;
}

.single .entry-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.single .entry-content th,
.single .entry-content td {
    border: 1px solid #e5e7eb;
    padding: 0.625rem 0.75rem;
    text-align: left;
}

.single .entry-content code {
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 0.375rem;
    padding: 0.1rem 0.35rem;
}

.single .entry-content pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
}

/* Cleanup for common classes/styles carried over from Word paste */
.single .entry-content .MsoNormal,
.single .entry-content [class*="Mso"] {
    font-size: inherit !important;
    line-height: inherit !important;
    margin-bottom: 1.15em;
}

.single .entry-content span[style*="font-family"] {
    font-family: inherit !important;
}

.single .entry-content span[style*="color"] {
    color: inherit;
}

@media (max-width: 767px) {
    .single .entry-content {
        font-size: 1.03rem;
        line-height: 1.82;
    }

    .single .entry-content h2 {
        font-size: 1.45rem;
    }

    .single .entry-content h3 {
        font-size: 1.25rem;
    }
}
