/*
Theme Name:
Theme URI: https://anhquanpc.vn/
Author: AnhQuanPC Team
Description: Theme for introducing AnhQuanPC company, specializing in network infrastructure and security cameras.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:
*/

/* ==========================================================================
   1. IMPORTS & VARIABLES
   ========================================================================== */

/* 1.1 Imports */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');
@import url("assets/css/bootstrap.min.css"); /* Moved general frameworks up */
@import url("assets/css/swiper.css");
@import url("assets/css/plugins.css");
@import url("assets/css/datepicker.css");
@import url("assets/css/style.css");
@import url("assets/css/custom-swiper-1.css");
@import url("assets/css/colors/scheme-1.css");

/* 1.2 Variables (Custom Properties) */
:root {
    --main-blue: #2196f3;
    --main-light-blue: #4fc3f7;
    --main-orange: #ff9800;
    --background: #fff;
    --background-alt: #f5f6fa;
	--menu-blue: #1c3591;
    /* Assuming --primary-gradient and --bg-dark-1 are defined in scheme-1.css or elsewhere,
       but kept here for completeness if they were meant to be global */
}

/* ==========================================================================
   2. BASE STYLES & TYPOGRAPHY
   ========================================================================== */

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: var(--background-alt);
    color: #222;
    margin: 0;
    line-height: 1.5;
}

a:hover {
    color: var(--main-orange);
}

.h2 {
    font-size: 2.5em;
}

h1, h2, h4, h3, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, footer.footer-light h5 {
    font-family: 'Montserrat', Arial, sans-serif;
    text-wrap-style: pretty;
}

h2 {
    font-size: 2em;
}

p {
    text-wrap-style: pretty;
}

.main-text-color {
    color: var(--main-blue);
}

.wp-block-button__link {
    background-color: var(--main-blue);
}

.anhquanpc-list {
    list-style: none !important;
}

.anhquanpc-list > strong {
    font-size: 1.5em;
    color: #0693e3;
}

.mobile {
    display: none;
}

.desktop {
    display: initial;
}

/* ==========================================================================
   3. LAYOUT & STRUCTURE
   ========================================================================== */

.section {
    padding: 50px 0;
}

.content-section {
    padding: 0;
}

.content {
    margin: 0 10%;
    padding: 0;
}

.content figure {
    margin: 0;
}

.content-middle {
    align-items: center;
    display: flex;
    font-size: 1.5em;
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */

.logo-text {
    display: none;
}

#header, #header + hr {
    display: none;
}

main {
    padding-top: 5%
}

.header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1em 1.5em;
    top: 0;
    position: fixed;
}

.header-logo {
    height: 48px;
}

.header-menu {
    display: flex;
    align-items: center;
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0; /* Already defined by margin-right on li, kept for clarity */
}

.header-menu > li {
    position: relative;
    margin-right: 0.5em;
    list-style: none;
}

.header-menu > li:last-child {
    margin-right: 0;
}

.header-menu > li > a {
    color: var(--menu-blue);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: block;
    white-space: nowrap;
}

.header-menu > li > a:hover,
.header-menu > li.current-menu-item > a {
    background: var(--menu-blue);
    color: #fff;
}

/* Sub-Menu */
.header-menu > li.menu-item-has-children > ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(33,150,243,0.10);
    border-radius: 0 0 8px 8px;
    z-index: 10;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.header-menu > li.show-submenu > ul.sub-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

.header-menu > li > ul.sub-menu > li {
    width: 100%;
    list-style: none;
}

.header-menu > li > ul.sub-menu > li > a {
    color: var(--menu-blue);
    background: none;
    padding: 8px 18px;
    font-weight: 500;
    border-radius: 0;
    white-space: nowrap;
    display: block;
    text-decoration: none;
}

.header-menu > li > ul.sub-menu > li > a:hover {
    background: var(--menu-blue);
    color: #fff;
}

/* Header CTAs/Search */
.header-cta {
    background: var(--main-orange);
    color: #fff;
    padding: 0.5em 0.5em;
    border-radius: 24px;
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.5em;
    box-shadow: 0 2px 8px rgba(255,152,0,0.15);
    transition: background 0.2s;
}

.header-cta:hover {
    /* Kept original hover color, but it results in orange background
       and main-blue text, which seems inconsistent with the intent
       of a primary button */
    background: var(--main-orange);
    color: var(--main-blue);
}

.header-search {
    margin-left: 24px;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    font-size: 3em;
}

.main-navigation ul {
    display: flex; /* Display menu as a horizontal bar on desktop */
}

/* ==========================================================================
   5. COMPONENTS (Banner, Services, CTA, Posts, Footer)
   ========================================================================== */

/* 5.1 Banner/Hero */
.banner {
    background: var(--main-light-blue);
    color: #fff;
    text-align: center;
    padding: 64px 16px 32px 16px;
    position: relative;
}

.banner img, .banner video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(33,150,243,0.12);
}

.banner-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 320px;
    overflow: hidden;
}

.banner-blur {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) brightness(0.8);
    opacity: 0.5;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.banner-slogan-group {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 100%;
}

.banner-slogan {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.banner-sub {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--main-orange);
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* 5.2 Services Section */
.services {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 48px 0;
}

.service {
    background: var(--background);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(33,150,243,0.08);
    padding: 32px 24px;
    text-align: center;
    width: 220px;
}

.service-icon {
    font-size: 3rem;
    color: var(--main-blue);
    margin-bottom: 16px;
}

.service-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.service-desc {
    font-size: 0.95rem;
    color: #555;
}

/* 5.3 CTA Section */
.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--main-orange);
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: background-color 0.3s;
}

.anhquanpc-cta-callout {
    padding: 30px;
    border: 1px solid #eee;
    text-align: center;
    margin: 20px 15%;
}

.anhquanpc-cta-callout h2 {
    color: var(--main-blue);
}

/* 5.4 Post List/Cover Blocks */
.post-area {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 -0.75em;
    list-style: none;
}
.post-area li {
    flex: 0 0 33.33333333%;
    width: 33.33333333%;
    position: relative;
    padding: 0 0.75em;
}
.post-area li > div {
    display: initial;
}
.post-area img, .post-area span.wp-block-post-featured-image__overlay {
    border-radius: 20px;
    height: 350px;
}
.post-area a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.75em;
}
.post-area a:hover {
    color: var(--main-orange);
}
.wp-block-cover {
    min-height: 350px;
}
.relative-abs .wp-block-cover__inner-container {
    position: initial;
}
.anhquanpc-project-list-header {
    position: absolute;
    bottom: 0;
    z-index: 99;
}
.main-page .anhquanpc-project-list-header {
    z-index: 0;
}
.hover.rounded-1 .wp-block-cover__inner-container {
    position: static;
    transform: translate(0, 75%);
}
.hover.rounded-1.main-page .wp-block-cover__inner-container {
    transform: initial;
    width: 100%;
    height: 100%;
    position: absolute !important;
    z-index: 999;
}

.padding-bottom-5-per {
    padding-bottom: 5%;
}

/* 5.5 Contact Form (WPCF7) */
.wpcf7-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: var(--background);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.wpcf7-form p {
    margin-bottom: 20px;
}

.wpcf7-form label {
    display: block;
    font-weight: 700;
    color: var(--main-blue);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.wpcf7-form-control:not(.wpcf7-submit) {
    background-color: var(--background);
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wpcf7-textarea {
    resize: vertical;
    min-height: 120px;
}

.wpcf7-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.wpcf7-form-control:focus:not(.wpcf7-submit) {
    border-color: var(--main-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.wpcf7-submit {
    background-color: var(--main-orange);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
    width: auto;
    display: block;
    margin: 30px auto 10px auto;
}

.wpcf7-submit:hover {
    background-color: #e68a00;
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.4);
    transform: translateY(-1px);
}

.wpcf7-not-valid, .wpcf7-form-control.wpcf7-not-valid {
    border-color: #f44336 !important;
}

.wpcf7-response-output {
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 700;
}
.wpcf7-mail-sent-ok {
    background-color: #e8f5e9;
    color: #4caf50;
    border: 1px solid #4caf50;
}

/* 5.6 Footer */
#footer {
    display: none;
}

.footer + hr {
    display: none;
}

.footer {
    background: var(--bg-dark-1);
    color: #fff;
    padding: 32px 16px;
    position: relative;
}

footer>div {
    padding-left: 2em;
}

.footer-links {
    margin: 16px 0;
}

.footer-links a {
    margin: 0 12px;
    text-decoration: none;
    font-weight: 700;
    color: #fff; /* Added to ensure visibility against dark background */
}
.footer-links a:hover {
    color: var(--main-orange);
}


.footer-contact {
    margin: 16px 0;
    font-size: 1rem;
}

.footer-map {
    margin: 24px auto 0 auto;
    max-width: 400px;
}

.copyright {
    position: absolute;
    bottom: 0;
    transform: translate(-20px, 50%);
    text-align: center;
    font-style: italic;
}


/* ==========================================================================
   6. UTILITIES & HELPERS
   ========================================================================== */

/* Spacing */
.gap0 {
    gap: 0 !important;
}
.margin-bottom-0 {
    margin-bottom: 0 !important;
}
.margin-top-0 {
    margin-top: 0 !important;
}
.padding-left-0 {
	padding-left: 0 !important;
}
.no-space-below {
    margin-bottom: 0 !important;
}
.padding-1 {
    padding: 1em !important;
}
.left-0 {
    left:0;
}
.full-right {
    margin-bottom: -1.5em;
}

/* Position/Layout */
.relative-abs {
    position: relative;
}
.abs-top-left {
    position: absolute;
    top: 0;
    left: 0;
}
.height-400 .wp-block-cover {
    height: 450px;
}

/* Hover Effects */
.hover {
    position: relative;
}
.hover-op-1 {
    opacity: 0;
    position: absolute;
    /* Assumes --primary-gradient is defined elsewhere */
    background: linear-gradient(var(--primary-gradient));
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: grid;
    justify-content: center;
    align-items: center;
    padding: 2em;
    transition: opacity 0.3s ease;
}
.hover:hover .hover-op-1 {
    opacity: 1;
}

/* Other Hover/Display Fixes */
.hover div {
    z-index: 9;
    position: initial !important;
}
.hover div.abs {
    position: absolute !important;
}

/* Text & Links */
.no-deco a {
    text-decoration: none !important;
    color: var(--main-blue);
}

.highlight-gray a {
    text-decoration: none;
    font-weight: bold;
    color: var(--main-blue);
}
.highlight-gray a:hover {
    color: var(--main-orange);
}

/* Animation Delays */
.delay-04 {
    animation-delay: 0.4s;
}

.delay-06 {
    animation-delay: 0.6s;
}

/* Other */
.flip-container h3 {
    margin: 2rem;
}
.flip-container p {
    margin: 0 2em;
}

.two-column-container {
    display: -webkit-box;
    display: -moz-box;
    display: box;

    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
}

.two-column-img {
    order: 1;
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    box-ordinal-group: 1;
}

.two-column-content {
    order: 2;
    -webkit-box-ordinal-group: 2;
    -moz-box-ordinal-group: 2;
    box-ordinal-group: 2;
}


/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */

/* 7.1 Marquee */
.marquee {
    font-size: 2em;
}

.marquee span {
    animation-duration: 10s;
    animation-iteration-count: infinite;
    animation-name: marquee-content;
    animation-timing-function: linear;
    padding: 5px 15px;
}

.marquee:hover .marquee span {
    animation-play-state: paused;
}

@keyframes marquee-content {
    from {
        transform: translateX( 0% );
    }
    to {
        transform: translateX( -100% );
    }
}

/* 7.2 Accessibility (Respect user preferences about animations) */
@media (prefers-reduced-motion: reduce) {
  .marquee span {
    animation-iteration-count: 1;
    animation-duration: 0.01s;
    /* instead of animation: none, so an animationend event is
     * still available, if previously attached.
     */
    width: auto;
    padding-left: 0;
  }
}


/* ==========================================================================
   8. MEDIA QUERIES (Mobile Version)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* --- BASE STYLES --- */
    blockquote {
        margin: 0;
        padding: 0;
    }

    body {
        margin: 0;
        line-height: 1.5;
    }

    h2 {
        line-height: 1.5em;
    }

    .mobile {
        display: initial;
    }

    .desktop {
        display: none;
    }

    /* --- HEADER & NAVIGATION --- */
    .header-cta {
        display: none;
    }

    .logo-text {
		display: inline-block;
        color: var(--menu-blue);
        font-family: 'Gotham';
        font-weight: bold;
        vertical-align: bottom;
        transform: translateY(25%);
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1em;
        top: 0;
    }

    .menu-toggle {
        display: block; /* Show the button on mobile */
        background: none;
        border: none;
        cursor: pointer;
        position: absolute;
        top: 0px;
        right: 20px;
        z-index: 200;
        color: var(--menu-blue);
    }

    .menu-toggle:after {
        content:"☰"
    }

    .toggled .menu-toggle:after {
        content:"x";
		color: #fff;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .header.toggled {
        position: fixed;
        height: 100%;
        top: 0;
    }

    .main-navigation {
        display: none;
        position: absolute;
    }

    .main-navigation.toggled {
        display: block;
    }

    .header-menu {
        display: none; /* Hide the menu by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--menu-blue);
        padding-top: 60px;
        z-index: 150;
        overflow-y: auto;
    }

    .header-menu li a {
        font-size: 1em;
		border: none !important;
    }

    .header-menu.toggled {
        display: block;
    }

    /* Menu Structure */
    .header-menu .menu ul {
        flex-direction: column;
    }
    .header-menu .menu li {
        list-style: none;
        padding-top: 5%;
    }

    /* Menu Links */
    .header-menu .menu li a {
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Sub-Menu */
    .header-menu .menu ul.children {
        position: static;
        display: none; /* HIDE THE SUB-MENU BY DEFAULT ON MOBILE */
        background: rgba(0, 0, 0, 0.2);
    }

    .header-menu .menu li.sub-menu-open > ul.children {
        display: block;
    }

    .header-menu .menu ul.children li a {
        padding-left: 40px;
    }

    /* Sub-menu Toggle Icon */
    .header-menu .menu li.page_item_has_children > a {
        position: relative;
        padding-right: 40px;
    }

    .header-menu .menu li.page_item_has_children > a::after {
        content: '+';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2em;
        line-height: 1;
        transition: transform 0.3s;
    }

    .header-menu .menu li.sub-menu-open > a::after {
        content: '-';
    }

    /* Header CTAs/Search */
    .header-cta,
    .header-search {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .post-area {
        display: block;
        flex-wrap: wrap;
        align-items: stretch;
        margin: 0;
        list-style: none;
    }

    .post-area li {
        width: 100%;
        padding: 0;
    }

    .post-area li > div {
        display: initial;
    }

    /* --- COMPONENTS --- */

    main {
        padding-top: 18%
    }

    /* Banner */
    .banner {
        padding: 40px 16px 20px 16px;
    }
    .banner-slogan {
        font-size: 1.5rem;
    }
    .banner-sub {
        font-size: 1rem;
    }
    .banner-image-wrapper {
        height: 200px;
    }

    /* Services */
    .services {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin: 30px 0;
        padding: 0 16px;
    }

    .service {
        width: 100%;
        max-width: 400px;
    }

    .g-5, .gx-5 {
        padding: 0;
        margin: 0;
    }

    .padding-bottom-5-per {
        padding-bottom: 10%;
    }

    .container .flip-container {
        position: absolute;
        bottom: 5%;
        z-index: 999;
    }

    .container div:has(.flip-container) {
        position: relative;
    }

    .container {
        margin-top: 5%;
    }

    /* CTA Callout */
    .anhquanpc-cta-callout {
        margin: 20px 5%;
    }

    /* Contact Form */
    .wpcf7-form {
        margin: 20px 10px;
        padding: 20px;
        max-width: none;
    }

    .copyright {
        transform: translate(-20px, 35%);
    }

    /* Footer */
    .footer-links a {
        display: inline-block;
        margin: 8px 0;
    }

    .footer {
        padding: 32px 16px 64px 16px;
    }

    .footer span {
        display:inline-block;
    }

}