/*
Theme Name: EasyTheme
Theme URI: https://sunnywebstudio.com
Author: the Sunnywebstudio, Aleksei Sukhoverkhov
Author URI: https://sunnywebstudio.com
Description: A lightweight, high-performance starter theme designed for building simple single-page websites and landing pages. Optimized for Elementor.
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easytheme
Tags: one-column, custom-colors, custom-menu, custom-logo, featured-images, translation-ready, e-commerce, blog
*/

/* --- 1. Base Reset & Layout --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

#page {
    width: 100%;
    overflow-x: hidden;
}

.et-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 2. Top Bar --- */
.et-top-bar {
    background-color: var(--et-primary-color, #1e73be);
    color: #fff;
    padding: 10px 0;
    width: 100%;
}

.et-top-left, .et-top-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.et-info-item, .et-info-item a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}

/* --- 3. Main Header & Navigation --- */
.et-main-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.site-branding img {
    max-height: 60px;
    width: auto;
}

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

.main-navigation a {
    font-weight: 700;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--et-secondary-color, #1a1a1a);
}

.main-navigation li {
    position: relative;
}

/* Desktop Dropdown Arrows */
@media (min-width: 992px) {
    .menu-item-has-children > a::after {
        content: ' ▼';
        font-size: 10px;
        margin-left: 5px;
        vertical-align: middle;
        opacity: 0.7;
    }
    
    .main-navigation ul ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        min-width: 200px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .main-navigation li:hover > ul {
        display: block;
    }
}

/* --- 4. Mobile Layout --- */
@media (max-width: 991px) {
    .et-top-bar {
        display: none;
    }

    /* Fixed Hamburger: Flexbox Centering */
    .et-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background-color: var(--et-primary-color, #ffb100);
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-left: auto;
        padding: 0;
        overflow: hidden;
    }

    .et-hamburger-box {
        width: 24px;
        height: 18px; /* Total height of the bar group */
        position: relative;
        display: block;
    }

    .et-hamburger-inner, 
    .et-hamburger-inner::before, 
    .et-hamburger-inner::after {
        width: 24px;
        height: 2px;
        background-color: #fff;
        position: absolute;
        transition: 0.3s;
        left: 0;
    }

    /* Middle bar vertically centered */
    .et-hamburger-inner { 
        top: 50%; 
        transform: translateY(-50%); 
    }

    /* Top and Bottom bars */
    .et-hamburger-inner::before { 
        content: ""; 
        top: -8px; 
    }
    .et-hamburger-inner::after { 
        content: ""; 
        top: 8px; 
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--et-primary-color, #ffb100);
        z-index: 9999;
    }

    .main-navigation.is-active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }

    .main-navigation a {
        color: #fff !important;
        padding: 12px 20px;
        display: block;
        font-weight: 600;
    }

    /* Mobile Sub-menu Trigger (Plus/Minus Icons) */
    .sub-menu-trigger {
        position: absolute;
        right: 0;
        top: 0;
        width: 50px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        border-left: 1px solid rgba(255,255,255,0.2);
        z-index: 5;
    }

    .main-navigation ul ul {
        display: none !important;
        position: static;
        background-color: rgba(0,0,0,0.05);
        width: 100%;
        padding: 0;
    }

    .main-navigation li.sub-menu-open > ul {
        display: block !important;
    }
}

/* --- 5. Social Icons --- */
.et-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    color: #ffffff;
}

.et-social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Hide Hamburger Button on Desktop */
@media (min-width: 992px) {
    .et-hamburger {
        display: none !important;
    }
}

/* --- 6. Sticky Header Support --- */

/* Reset overflow to allow sticky positioning */
html, body, #page, .site {
    overflow: visible !important;
    height: auto !important;
}

/* Sticky styles for Desktop view */
@media (min-width: 992px) {
    .site-header {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 9999;
        width: 100%;
        transition: all 0.3s ease; /* Smooth transition for the entire header */
    }

    /* Main Menu Background & Shadow for visibility on scroll */
    .et-main-header {
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transition: padding 0.3s ease; /* Smooth padding reduction */
    }

    /* Transition for logo scaling */
    .site-branding img {
        transition: max-height 0.3s ease;
    }

    /* Styles applied when page is scrolled (triggered via JS) */
    .header-scrolled .et-main-header {
        padding: 5px 0; /* Reduced header padding */
    }

    .header-scrolled .site-branding img {
        max-height: 40px; /* Reduced logo height (original: 60px) */
    }
}

/* --- 7. Footer Styles --- */

.site-footer {
    /* No background here, so it's invisible if empty */
    padding: 0;
    margin-top: auto;
    width: 100%;
}

/* This area only exists if widgets are active */
.footer-widgets-area {
    background-color: var(--et-primary-color);
    color: #ffffff;
    padding: 60px 0 20px;
}

.footer-widgets-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    justify-content: center;
}

.footer-widget-column {
    flex: 1 1 25%;
    padding: 0 15px;
    margin-bottom: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-widget-column .widget-title {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: none !important;
    width: 100%;
}

/* Default WP widgets centering */
.footer-widget-column .widget {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Copyright section stays consistent */
.footer-bottom {
    background-color:  var(--et-primary-color);
    padding: 20px 0;
    width: 100%;
}

.footer-copyright {
    text-align: center;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.9rem;
    color: #ffffff;
}

.footer-copyright p a.designer-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.footer-copyright p a.designer-link:hover {
    opacity: 0.8;
}

/* --- 8. Responsive Adjustments --- */

@media (max-width: 992px) {
    .footer-widget-column {
        flex: 1 1 50%;
    }
}

@media (max-width: 600px) {
    .footer-widget-column {
        flex: 1 1 100%;
    }
}

/* ---Form 7--- */

/* Stretch Contact Form 7 fields to full container width */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100% !important; /* Forces fields to fill the parent container */
    max-width: 100%;        /* Prevents overflow */
    box-sizing: border-box; /* Ensures padding is included in the total width */
    margin-top: 5px;        /* Space between label and input */
    margin-bottom: 15px;    /* Space between form rows */
    padding: 10px;          /* Inner spacing for better readability */
    border: 1px solid #ccc; /* Subtle border for definition */
    border-radius: 4px;     /* Matches standard UI rounding */
}

/* Specific styling for the message area */
.wpcf7-form textarea {
    height: 150px;          /* Sets a comfortable default height */
    resize: vertical;       /* Allows users to expand only downwards */
}

/* Styling for the Submit button */
.wpcf7-form input[type="submit"] {
    cursor: pointer;
    background-color: #ffffff; /* White background as seen in your layout */
    color: #000080;           /* Dark blue text color */
    border: none;
    padding: 10px 30px;
    font-weight: bold;
    transition: 0.3s ease;    /* Smooth transition for hover effects */
}

.wpcf7-form input[type="submit"]:hover {
    background-color: #f0f0f0; /* Slight gray tint on hover */
}

/* --- Required WordPress Classes --- */
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px auto; }
.wp-caption { background: #f3f3f3; padding: 5px; border: 1px solid #ddd; text-align: center; }
.wp-caption-text { font-size: 11px; font-style: italic; }
.sticky { border: 1px solid #eee; }
.gallery-caption { font-size: 11px; }
.bypostauthor { font-weight: bold; }

/* Accessible hidden text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
|--------------------------------------------------------------------------
| WordPress Required Core Classes (Draft)
|--------------------------------------------------------------------------
| These classes are recommended by WordPress Theme Check.
| They are currently commented out to keep the stylesheet lightweight.
| Enable them if you plan to use standard WP Editor (Gutenberg) features.
|
*/

/*
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px auto; }
.wp-caption { background: #f3f3f3; padding: 5px; border: 1px solid #ddd; text-align: center; max-width: 100%; }
.wp-caption-text { font-size: 11px; font-style: italic; }
.sticky { background: #fff; border: 1px solid #eee; }
.gallery-caption { font-size: 11px; }
.bypostauthor { font-weight: bold; }

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
*/

/* --- Single Post Tags Styling --- */
.post-tags-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.post-tags-container .tags-label {
    font-weight: bold;
    margin-right: 5px;
}

.post-tags-container a {
    color: #000080;
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-tags-container a:hover {
    opacity: 0.7;
}