/*
Theme Name: fd-theme
Theme URI: 
Author: FD
Author URI: 
Description: Custom WordPress theme for ENER NEW TECH LTD, rebuilt from scratch with clean, semantic markup, native logo/menus, and ACF integrations.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fd-theme
*/

/* ----------------------------------------------------
   1. VARIABLES & SYSTEM DEFAULTS
   ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto+Slab:wght@400&family=Roboto:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --color-primary: #1D798E;
    --color-secondary: #5D6D80;
    --color-text: #242424;
    --color-accent: #001D3B;
    --color-white: #ffffff;
    --color-black: #000000;
    
    /* Typography */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Roboto Slab', serif;
    --font-navigation: 'Open Sans', sans-serif;
    
    /* Structure */
    --container-width: 1140px;
    --transition-speed: 0.3s;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-accent);
}

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

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

/* ----------------------------------------------------
   2. UTILITIES & LAYOUTS
   ---------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.content-section {
    padding: 100px 0;
}

@media (max-width: 1024px) {
    .content-section {
        padding: 50px 0;
    }
}

@media (max-width: 767px) {
    .content-section {
        padding: 30px 0;
    }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 21px;
    font-weight: 700;
    line-height: 25px;
    border-radius: 99px;
    padding: 15px 75px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.btn:hover, .btn:focus {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn i {
    margin-left: 15px;
}

@media (max-width: 767px) {
    .btn {
        font-size: 16px;
        padding: 10px 40px;
    }
}

/* ----------------------------------------------------
   3. HEADER (STICKY & RESPONSIVE)
   ---------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    transition: height var(--transition-speed) linear, background-color var(--transition-speed) linear, box-shadow var(--transition-speed) linear;
    height: 70px;
}

.site-header.scrolled {
    background-color: var(--color-white);
    height: 50px;
    box-shadow: 0px 6px 30px -4px rgba(0,0,0,.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo */
.custom-logo-link {
    display: inline-block;
}

.custom-logo-link img {
    max-height: 60px;
    width: auto;
    transition: max-height var(--transition-speed) linear;
}

.site-header.scrolled .custom-logo-link img {
    max-height: 40px;
}

/* Nav Menu */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-navigation ul li a {
    font-family: var(--font-navigation);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    padding: 10px 14px;
    text-transform: uppercase;
    transition: color var(--transition-speed) ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
    color: var(--color-primary);
}

/* Hamburger menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.menu-toggle:hover {
    color: var(--color-accent);
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        padding: 80px 30px 30px;
        transition: right var(--transition-speed) ease;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .main-navigation ul li {
        width: 100%;
    }
    
    .main-navigation ul li a {
        display: block;
        font-size: 14px;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Adjust content for fixed header */
body {
    padding-top: 70px;
}

/* ----------------------------------------------------
   4. HERO SECTIONS
   ---------------------------------------------------- */
.hero {
    position: relative;
    min-height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 70px 20px;
    background-image: url('assets/images/iStock-1277739465-scaled.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--color-white);
}

.hero.home-hero {
    min-height: 100vh;
    padding: 100px 20px;
}

/* Fixed background for larger displays on home page */
@media (min-width: 1025px) {
    .hero.home-hero {
        background-attachment: fixed;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-secondary);
    opacity: 0.5;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-primary);
    font-weight: 600;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.88);
    color: var(--color-white);
    margin-bottom: 20px;
}

.hero.home-hero .hero-title {
    font-size: 70px;
}

.hero.page-hero .hero-title {
    font-size: 30px;
}

.hero-description {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 20px;
    line-height: 40px;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.91);
    color: var(--color-white);
    max-width: 900px;
    margin: 0 auto 30px;
}

@media (max-width: 1024px) {
    .hero.home-hero .hero-title {
        font-size: 50px;
    }
    
    .hero-description {
        font-size: 25px;
    }
}

@media (max-width: 767px) {
    .hero {
        padding: 50px 20px;
    }
    
    .hero.home-hero {
        padding: 30px 20px;
    }
    
    .hero.home-hero .hero-title {
        font-size: 25px;
    }
    
    .hero.page-hero .hero-title {
        font-size: 21px;
        line-height: 1.4;
    }
    
    .hero-description {
        font-size: 16px;
        line-height: 1.5;
    }
}

/* ----------------------------------------------------
   5. TEMPLATE COMPONENT STYLES
   ---------------------------------------------------- */
.template-content-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Text editor block styling */
.text-editor {
    width: 100%;
}

.text-editor p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.text-editor ul, .text-editor ol {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.text-editor ul li, .text-editor ol li {
    margin-bottom: 0.5rem;
}

.text-editor strong {
    font-weight: 700;
}

/* Page efficiency list structure styles */
.highlight-text {
    width: 100%;
    font-family: var(--font-primary);
    font-weight: 500;
    font-style: italic;
    text-decoration: underline;
    color: var(--color-secondary);
    font-size: 19px;
    text-align: left;
}

.section-subtitle {
    width: 100%;
    color: var(--color-primary);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 24px;
    text-align: left;
}

.patent-subtitle {
    width: 100%;
    color: var(--color-secondary);
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 24px;
    text-align: center;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Icon list for patent link */
.patent-link-list {
    list-style: none;
    width: 100%;
    text-align: center;
}

.patent-link-item a {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
    transition: color var(--transition-speed) ease;
}

.patent-link-item a:hover {
    color: var(--color-primary);
}

.patent-link-item .icon {
    margin-right: 10px;
    font-size: 14px;
}

/* Images alignment */
.image-centered {
    text-align: center;
    width: 100%;
}

.image-centered img {
    height: auto;
    border-radius: 4px;
}

/* Button wrapper spacing */
.btn-wrapper {
    margin-top: 30px;
    width: 100%;
    text-align: center;
}

/* ----------------------------------------------------
   6. FOOTER
   ---------------------------------------------------- */
.site-footer {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0;
}

.site-footer .container {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
}

.footer-contact-title {
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-white);
    margin-bottom: 5px;
}

.footer-contact-email {
    font-family: var(--font-navigation);
    font-weight: 400;
    font-size: 16px;
    line-height: 27px;
    color: var(--color-white);
    margin-bottom: 15px;
    display: inline-block;
}

.footer-contact-email:hover {
    color: var(--color-primary);
}

.footer-divider {
    border: none;
    border-top: 3px solid var(--color-white);
    width: 200px;
    margin: 15px auto;
}

.footer-copyright {
    font-family: var(--font-navigation);
    font-weight: 400;
    font-size: 14px;
    line-height: 27px;
    color: var(--color-white);
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .site-footer .container {
        padding: 50px 30px;
    }
}
