/*
Theme Name: NovaPulse
Theme URI: https://novapulsestudio.com
Author: NovaPulse Studio
Author URI: https://novapulsestudio.com
Description: Modern theme with Light/Dark/Gray-Black schemes, clean flexbox hero, sticky nav, responsive hamburger menu, mobile background support, overlay opacity, content width control, customizable line-height, multiple entrance animations, card toggle, advanced footer, optional sidebars, scroll reveal animation.
Version: 3.0.15
License: GPL v2 or later
Text Domain: novapulse
*/

:root {
    --body-bg: #f5f6f8; --body-text: #2c3e50; --card-bg: #ffffff;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.04);
    --input-bg: #ffffff; --input-border: #dce1e5; --input-focus-border: #0066cc;
    --input-text: #2c3e50; --input-placeholder: #94a3b8;
    --heading-color: #1a202c; --link-color: #0066cc; --border-subtle: #e8ecf0;
    --nav-bg: #ffffff; --nav-text: #4a5568; --nav-hover: #0066cc;
    --site-title-color: #1a202c; --sticky-nav-bg: rgba(255,255,255,0.95);
    --btn-bg: #0066cc; --btn-text: #ffffff; --btn-font-size: 1rem;
    --btn-padding-y: 12px; --btn-padding-x: 24px; --btn-radius: 8px;
    --content-padding: 20px;
    --hero-fallback-bg: #1a1d28;
    --hero-desktop-bg-image: none; --hero-mobile-bg-image: none;
    --hero-bg-size: cover; --hero-bg-position: center center;
    --hero-mobile-bg-size: contain; --hero-mobile-bg-position: center center;
    --hero-overlay-opacity: 0.45; --hero-content-max-width: 800px;
    --hero-title-color: #ffffff; --hero-subtitle-color: rgba(255,255,255,0.9);
    --hero-description-color: rgba(255,255,255,0.85);
    --sidebar-left-width: 300px;
    --sidebar-right-width: 300px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:var(--body-text);background:var(--body-bg);line-height:1.7;-webkit-font-smoothing:antialiased;transition:background 0.3s,color 0.3s}
a{color:var(--link-color);text-decoration:none;transition:color 0.2s}a:hover{color:var(--nav-hover)}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,h4,h5,h6{color:var(--heading-color);line-height:1.3;margin-bottom:0.6em}
.container{width:90%;margin:0 auto;padding:var(--content-padding) 0}
.site-header .container{max-width:var(--nav-max-width,1200px)}
.site-main>.container,.site-main .container{max-width:var(--content-max-width,1200px)}
.site-footer .container{max-width:var(--footer-max-width,1200px)}

/* NAV */
.site-header{background:var(--nav-bg);box-shadow:0 1px 8px rgba(0,0,0,0.06);position:relative;z-index:1000}
.site-header.sticky{position:fixed;top:0;left:0;width:100%;background:var(--sticky-nav-bg);box-shadow:0 4px 24px rgba(0,0,0,0.1);animation:slideDown 0.35s ease;backdrop-filter:blur(12px)}
@keyframes slideDown{from{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}
.nav-container{display:flex;align-items:center;justify-content:space-between;padding:15px 0}
.site-branding{display:flex;align-items:center;gap:14px}
.custom-logo-link img{max-height:48px;width:auto}
.site-title{font-size:1.5rem;font-weight:700;margin:0;letter-spacing:-0.3px}
.site-title a{color:var(--site-title-color)}.site-title a:hover{color:var(--nav-hover)}
.main-navigation{position:relative}
.main-navigation ul{list-style:none;margin:0;padding:0}
.main-navigation .primary-menu{display:flex;gap:4px}
.main-navigation .primary-menu a{display:block;padding:10px 20px;color:var(--nav-text);font-weight:500;font-size:0.95rem;border-radius:8px;transition:background 0.25s,color 0.25s}
.main-navigation .primary-menu a:hover,.main-navigation .primary-menu a:focus{background:rgba(0,0,0,0.04);color:var(--nav-hover)}
.menu-toggle{display:none;background:none;border:none;cursor:pointer;padding:12px;color:var(--nav-text);border-radius:8px}
.menu-toggle:hover{background:rgba(0,0,0,0.04)}
.hamburger-icon{display:inline-block;width:22px;height:2px;background:var(--nav-text);position:relative;border-radius:2px;transition:background 0.3s}
.hamburger-icon::before,.hamburger-icon::after{content:"";position:absolute;left:0;width:100%;height:2px;background:var(--nav-text);border-radius:2px;transition:transform 0.3s}
.hamburger-icon::before{top:-7px}.hamburger-icon::after{top:7px}
.menu-toggle[aria-expanded="true"] .hamburger-icon{background:transparent}
.menu-toggle[aria-expanded="true"] .hamburger-icon::before{transform:translateY(7px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] .hamburger-icon::after{transform:translateY(-7px) rotate(-45deg)}
@media(max-width:1024px){
    .menu-toggle{display:flex;align-items:center}
    .main-navigation .primary-menu{
        display:block;position:absolute;top:calc(100% + 14px);right:0;
        background:var(--nav-bg);border-radius:14px;box-shadow:0 16px 48px rgba(0,0,0,0.14);
        padding:8px 0;min-width:220px;width:auto;white-space:nowrap;
        opacity:0;visibility:hidden;transform:translateY(-12px);
        transition:opacity 0.28s,transform 0.28s,visibility 0.28s;
    }
    .main-navigation.toggled .primary-menu{opacity:1;visibility:visible;transform:translateY(0)}
    .main-navigation .primary-menu li{display:block}
    .main-navigation .primary-menu a{padding:13px 28px;border-radius:0}
}
.sticky-spacer{display:none}.site-header.sticky+.sticky-spacer{display:block;height:var(--header-height,78px)}

/* HERO */
.hero-section {
    background-color: var(--hero-fallback-bg);
    background-image: var(--hero-desktop-bg-image);
    background-size: var(--hero-bg-size);
    background-position: var(--hero-bg-position);
    background-repeat: no-repeat;
    /* Height auto-fits to image — min-height only as fallback when no image is set */
    min-height: var(--hero-min-height, 0px);
    height: auto;
    display: flex; align-items: center; justify-content: center;
    color: #fff; margin-top: 0; position: relative; overflow: hidden;
    padding: 0;
}
/* When no slider images exist, restore padding for text-only hero */
.hero-section.hero-no-images {
    min-height: 80vh;
    padding: 60px 20px;
}
/* Slider image — drives the natural height of the hero */
.hero-slide-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    position: relative; /* stacks in normal flow */
    z-index: 0;
}
/* All slides stacked on top of first via absolute positioning */
.hero-slide-img.hero-slide-stacked {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
}
/* Content sits on top */
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0, var(--hero-overlay-opacity)); z-index: 1; }
.hero-content {
    position: absolute; z-index: 3;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}
.hero-content-inner {
    max-width: var(--hero-content-max-width);
    width: 100%;
    display: flex; flex-direction: column;
    gap: var(--hero-gap, 0);
}
.hero-content h1,.hero-content p { margin: 0 !important; padding: 0 !important; }
/* Vertical alignment — moves content block inside the overlay */
.hero-align-v-top    .hero-content { justify-content: flex-start; padding-top: 60px; }
.hero-align-v-center .hero-content { justify-content: center; }
.hero-align-v-bottom .hero-content { justify-content: flex-end; padding-bottom: 60px; }
/* Horizontal alignment — text align on inner block */
.hero-align-h-left   .hero-content-inner { text-align: left; align-items: flex-start; }
.hero-align-h-center .hero-content-inner { text-align: center; align-items: center; }
.hero-align-h-right  .hero-content-inner { text-align: right; align-items: flex-end; }
.hero-title { font-size: clamp(2rem, 5vw, 5rem); font-weight: 800; color: var(--hero-title-color); line-height: 1 !important; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: clamp(1.2rem, 2.5vw, 2.5rem); font-weight: 400; color: var(--hero-subtitle-color); line-height: 1 !important; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.hero-description { font-size: clamp(1rem, 1.8vw, 1.8rem); font-weight: 400; color: var(--hero-description-color); line-height: 1 !important; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* Hero animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.hero-animate-fadeInUp .hero-title,.hero-animate-fadeInUp .hero-subtitle,.hero-animate-fadeInUp .hero-description { animation: fadeInUp 0.8s ease-out forwards; }
.hero-animate-fadeIn .hero-title,.hero-animate-fadeIn .hero-subtitle,.hero-animate-fadeIn .hero-description { animation: fadeIn 0.8s ease-out forwards; }
.hero-animate-slideInLeft .hero-title,.hero-animate-slideInLeft .hero-subtitle,.hero-animate-slideInLeft .hero-description { animation: slideInLeft 0.8s ease-out forwards; }
.hero-animate-slideInRight .hero-title,.hero-animate-slideInRight .hero-subtitle,.hero-animate-slideInRight .hero-description { animation: slideInRight 0.8s ease-out forwards; }
.hero-animate-zoomIn .hero-title,.hero-animate-zoomIn .hero-subtitle,.hero-animate-zoomIn .hero-description { animation: zoomIn 0.8s ease-out forwards; }
.hero-animate-fadeInUp .hero-title,.hero-animate-fadeIn .hero-title,.hero-animate-slideInLeft .hero-title,.hero-animate-slideInRight .hero-title,.hero-animate-zoomIn .hero-title { animation-delay: 0.1s; }
.hero-animate-fadeInUp .hero-subtitle,.hero-animate-fadeIn .hero-subtitle,.hero-animate-slideInLeft .hero-subtitle,.hero-animate-slideInRight .hero-subtitle,.hero-animate-zoomIn .hero-subtitle { animation-delay: 0.2s; }
.hero-animate-fadeInUp .hero-description,.hero-animate-fadeIn .hero-description,.hero-animate-slideInLeft .hero-description,.hero-animate-slideInRight .hero-description,.hero-animate-zoomIn .hero-description { animation-delay: 0.3s; }
.hero-section[class*="hero-animate-"] .hero-title,.hero-section[class*="hero-animate-"] .hero-subtitle,.hero-section[class*="hero-animate-"] .hero-description { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hero-section[class*="hero-animate-"] .hero-title,.hero-section[class*="hero-animate-"] .hero-subtitle,.hero-section[class*="hero-animate-"] .hero-description { animation: none; opacity: 1; } }

@media (max-width: 768px) {
    .hero-section { background-size: var(--hero-mobile-bg-size); background-position: var(--hero-mobile-bg-position); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide-img { transition: none; }
}

/* INPUTS */
input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="number"],input[type="tel"],input[type="date"],textarea,select {
    width:100%;max-width:100%;padding:14px 18px;font-size:1rem;font-family:inherit;color:var(--input-text);background:var(--input-bg);
    border:2px solid var(--input-border);border-radius:10px;outline:none;transition:border-color 0.25s,box-shadow 0.25s;-webkit-appearance:none;appearance:none
}
input:focus,textarea:focus,select:focus{border-color:var(--input-focus-border);box-shadow:0 0 0 4px rgba(0,102,204,0.08)}
input::placeholder,textarea::placeholder{color:var(--input-placeholder);opacity:1}
textarea{min-height:140px;resize:vertical;line-height:1.6}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;padding-right:44px;cursor:pointer}
label{display:block;margin-bottom:6px;font-weight:600;font-size:0.9rem;color:var(--heading-color)}
input[type="submit"],button,.wp-block-button__link,.wp-element-button,.wpcf7-submit{background-color:var(--btn-bg);color:var(--btn-text);font-size:var(--btn-font-size);padding:var(--btn-padding-y) var(--btn-padding-x);border:none;border-radius:var(--btn-radius);cursor:pointer;font-weight:600;letter-spacing:0.2px;transition:opacity 0.2s,transform 0.15s,box-shadow 0.2s;box-shadow:0 2px 8px rgba(0,0,0,0.08)}
input[type="submit"]:hover,button:hover,.wp-block-button__link:hover,.wpcf7-submit:hover{opacity:0.92;transform:translateY(-1px);box-shadow:0 4px 16px rgba(0,0,0,0.12)}

/* Card style */
body.nova-card-style .entry-content .wp-block-group,
body.nova-card-style article.post,
body.nova-card-style article.page {
    background: var(--card-bg); border-radius: 14px; padding: 32px;
    box-shadow: var(--card-shadow); border: 1px solid var(--border-subtle); margin-bottom: 24px;
}
.site-main{padding:40px}.entry-title{font-size:2rem;margin-bottom:18px;color:var(--heading-color)}
.entry-content{color:var(--body-text);line-height:1.8;padding-left:24px !important}
.entry-content p{margin-bottom:1.2em}
.wpcf7-form p{margin-bottom:16px}.wpcf7-not-valid-tip{font-size:0.85rem;margin-top:4px;color:#e74c3c}.wpcf7-response-output{border-radius:10px;padding:14px 20px;margin-top:16px}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.site-main .container.has-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar {
    flex: 0 0 var(--sidebar-width, 300px);
    max-width: 100%;
}

.sidebar-left  { order: 0; }
.content-area   { order: 1; }
.sidebar-right  { order: 2; }

@media (max-width: 1024px) {
    .site-main .container.has-sidebar {
        flex-direction: column;
    }
    .sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* ============================================================
   FOOTER – scheme-aware colors + 4 columns on desktop
   ============================================================ */
.site-footer {
    --footer-bg: var(--body-bg);
    --footer-text: var(--body-text);
    --footer-text-secondary: #9ca3af;
    --footer-accent: var(--link-color);
    --social-icon-color: var(--link-color);
    --social-icon-hover-color: var(--btn-text);
    --social-bg: transparent;
    --social-bg-hover: var(--link-color);
    --social-border: var(--link-color);
    --social-border-hover: var(--link-color);

    background: linear-gradient(180deg, var(--footer-bg) 0%, rgba(0,0,0,0.15) 100%);
    color: var(--footer-text);
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
}

.site-footer .footer-description,
.site-footer .footer-contact li,
.site-footer .footer-menu a,
.site-footer .footer-legal-menu a,
.site-footer .footer-legal-links a,
.site-footer .footer-widget ul li a {
    color: var(--footer-text-secondary);
}

.site-footer .footer-heading {
    color: var(--footer-text);
}

.site-footer .footer-heading::after {
    background: var(--footer-accent);
}

.site-footer .footer-menu a:hover,
.site-footer .footer-contact a:hover,
.site-footer .footer-legal-menu a:hover,
.site-footer .footer-legal-links a:hover,
.site-footer .footer-widget ul li a:hover {
    color: var(--footer-accent);
}

.social-icon {
    color: var(--social-icon-color);
    border-color: var(--social-border);
    background: var(--social-bg);
}
.social-icon:hover {
    color: var(--social-icon-hover-color);
    background: var(--social-bg-hover);
    border-color: var(--social-border-hover);
}

.footer-border {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
}
.footer-main { padding: 70px 0 40px; }

/* FLEXIBLE GRID – 4 columns on desktop */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 600px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col { display: flex; flex-direction: column; }
@media (max-width: 599px) { .footer-col { align-items: center; text-align: center; } }
.footer-logo { margin-bottom: 16px; }
.footer-logo img { max-height: 50px; width: auto; }
.footer-site-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; color: var(--footer-text); }
.footer-site-title a { color: inherit; text-decoration: none; }
.footer-site-title a:hover { color: var(--footer-accent); }
.footer-description { margin: 0 0 20px; font-size: 0.9rem; line-height: 1.6; }
.footer-heading {
    font-size: 1.05rem; font-weight: 600; margin: 0 0 16px;
    position: relative; padding-bottom: 10px;
}
.footer-heading::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 30px; height: 2px; border-radius: 1px;
}
@media (max-width: 599px) { .footer-heading::after { left: 50%; transform: translateX(-50%); } }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu li:last-child { margin-bottom: 0; }
.footer-menu a {
    text-decoration: none; display: inline-block;
    transition: color 0.3s, transform 0.3s; position: relative; padding-left: 0;
}
.footer-menu a::before { content: '\203A'; position: relative; margin-right: 6px; opacity: 0; transition: opacity 0.3s, margin-right 0.3s; }
.footer-menu a:hover { transform: translateX(4px); }
.footer-menu a:hover::before { opacity: 1; margin-right: 10px; }
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.footer-contact li:last-child { margin-bottom: 0; }
.contact-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--footer-accent); }
.contact-icon svg { display: block; }
.footer-contact a { text-decoration: none; transition: color 0.3s; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid;
    transition: all 0.3s ease; text-decoration: none;
}
.social-icon svg { display: block; width: 18px; height: 18px; }
.social-icon:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.footer-sub { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 0; font-size: 0.85rem; }
.footer-sub-grid { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
@media (min-width: 768px) { .footer-sub-grid { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-copyright { white-space: nowrap; }
.footer-legal-menu, .footer-legal-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0; padding: 0; }
.footer-legal-menu a, .footer-legal-links a { text-decoration: none; padding: 4px 10px; transition: color 0.3s; white-space: nowrap; }
.footer-legal-menu li:not(:last-child)::after, .footer-legal-links a:not(:last-child)::after { content: '|'; color: rgba(255,255,255,0.15); margin-left: 4px; }
.footer-widget { margin-bottom: 20px; }
.footer-widget:last-child { margin-bottom: 0; }
.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget ul li { margin-bottom: 8px; }
.footer-widget ul li a { text-decoration: none; transition: color 0.3s; }
@media (prefers-reduced-motion: reduce) { .social-icon,.footer-menu a { transition: none; } }

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Swatches (injected by JS) */
.customize-control-select .swatches { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.customize-control-select .swatches .swatch { width: 28px; height: 28px; border-radius: 4px; border: 1px solid #ccc; display: inline-block; }
