/* 
 Theme Name:   ColorMag Child
 Theme URI:    http://localhost/newscard/
 Description:  ColorMag Child Theme with custom newscard functionality
 Author:       Your Name
 Author URI:   http://localhost/
 Template:     colormag
 Version:      1.0.0
 License:      GPL v2 or later
 Text Domain:  colormag-child
*/

/* Custom styles for child theme can be added below */
body {background-color: #F5F5F5;}
/* header#masthead .e-con>.e-con-inner { gap: 0px;}  */
.elementor-widget-navigation-menu .menu-item a.hfe-menu-item{color:#FFFFFF!important;}
/* header#masthead{ width: 15%;position: fixed!important;top: 0;left: 0;height: 100vh;background: #B71818;padding: 0px;overflow-y: auto;} */
/* [data-elementor-type="wp-page"] {margin-left: 14%;width: 80%; padding: 20px;height: 100vh;} */
.post-thumbnail-wrapper {aspect-ratio: 20 / 0;}
.colormag-posts-col-3 .colormag-posts-grid {grid-template-columns: repeat(4, 1fr) !important;align-items: flex-start !important;}
.colormag-posts-grid {gap: 20px;}
.global-search-container{margin-left: 14%;width: 79%;padding: 20px;}
.elementor-2675 .elementor-element.elementor-element-ed17299 .menu-item a.hfe-menu-item:hover, .elementor-2675 .elementor-element.elementor-element-ed17299 .sub-menu a.hfe-sub-menu-item:hover, .elementor-2675 .elementor-element.elementor-element-ed17299 .menu-item.current-menu-item a.hfe-menu-item, .elementor-2675 .elementor-element.elementor-element-ed17299 .menu-item a.hfe-menu-item.highlighted, .elementor-2675 .elementor-element.elementor-element-ed17299 .menu-item a.hfe-menu-item:focus {color:#282828!important;background-color: #fff!important;}
/*  Newscard click event styles start*/
.post-hiden-description {display: none;visibility: hidden;}
.post-hiden-description.active {display: block;visibility: visible;}
/*  Newscard click event styles start*/

body,
p,
a,
span,
li,
h1, h2, h3, h4, h5, h6,
button,
input,
textarea,
select {
  font-family: "Outfit", sans-serif !important;
}

/* //09-09 */
/* Global Category Menu - Red Tabs */
.global-category-menu {
    background: transparent; /* no background bar */
    padding: 10px 0;
}

.global-category-menu .hfe-nav-menu {
    list-style: none;
    margin: 0 auto;   /* center within parent */
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center the tabs */
    gap: 10px;
}

.global-category-menu .hfe-nav-menu li {
    margin: 0;
}

.global-category-menu .hfe-nav-menu a {
    display: inline-block;
    padding: 15px 16px !important;
    background: #B71818 !important;   /* red tab */
    border: 1px solid #B71818;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;           /* white text */
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Outfit", Sans-serif !important;
}

/* Hover + Active */
.global-category-menu .hfe-nav-menu a:hover,
.global-category-menu .hfe-nav-menu .current-menu-item a {
    background: #fff;       /* white background */
    color: #000 !important;         /* red text */
    border-color: #B71818;  /* keep red border */
}


.contact-form-wrapper {
  max-width: 600px;      /* keeps it neat */
  margin: 0 auto;        /* centers horizontally */
  text-align: left;      /* keeps labels aligned left */
  padding: 20px;
}

/* .contact-form-wrapper h3 {
  text-align: center;    
  margin-bottom: 20px;
} */

.contact-form-title {
  background-color: #B71818;
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 40px;
}

.form-row.two-cols {
  display: flex;
  gap: 20px;
}

.form-row.two-cols label {
  flex: 1;
}

/* input[type="submit"]{
	color: #B71818;
	
} */


input.wpcf7-form-control.wpcf7-submit.has-spinner {
    background-color: #B71818;
    margin: 0px auto;
    display: block;
}

input.wpcf7-form-control.wpcf7-submit.has-spinner:hover {
    background-color: #fff;
    color: #B71818;
}



/* Dark background */
.darkmode-layer {
  background-color: #000 !important; /* Black */
}

/* General text */
.darkmode-layer,
.darkmode-layer * {
  color: #fff !important;
}

/* Links */
.darkmode-layer a {
  color: #B71818 !important; /* Red links */
}

/* Buttons inside dark mode */
.darkmode-layer button,
.darkmode-layer .button,
.darkmode-layer input[type="submit"] {
  background-color: #B71818 !important; /* Red background */
  color: #fff !important;
  border: none !important;
}

.darkmode-layer button:hover,
.darkmode-layer .button:hover,
.darkmode-layer input[type="submit"]:hover {
  background-color: #fff !important;
  color: #B71818 !important;
  border: 1px solid #B71818 !important;
}

/* Header / navigation bar */
.darkmode-layer header,
.darkmode-layer nav,
.darkmode-layer .site-header {
  background-color: #B71818 !important;
}

/* Ensure no plugin blue (#6EC1E4) sneaks in */
.darkmode-layer,
.darkmode-toggle {
  --darkmode-accent: #B71818 !important;
}


body.darkmode--activated {
  background-color: #000 !important; /* Black background */
  color: #fff !important;           /* White text */
}

/* body.darkmode--activated a {
  color: #B71818 !important;
/} */

body.darkmode--activated header,
body.darkmode--activated .site-header {
  background-color: #B71818 !important; /* Red header/nav */
}


.global-category-menu .hfe-nav-menu a {
    display: inline-block;
    padding: 15px 16px !important;
    background: #B71818 !important;   /* red tab */
    border: 1px solid #B71818;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;           /* white text */
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Outfit", Sans-serif !important;
}

/* Light mode */
body:not(.darkmode--activated) .global-category-menu .hfe-nav-menu a {
  background: #B71818 !important;  /* red */
  color: #fff !important;          /* white */
}

body:not(.darkmode--activated) .global-category-menu .hfe-nav-menu a:hover {
  color: #0e0e0e !important;  /* red */
  background-color: #fff !important;          /* white */
}


body:not(.darkmode--activated) .global-category-menu .hfe-nav-menu .current-menu-item a {
    color: #0e0e0e !important;
    background-color: #fff !important;
}

/* Dark mode */
/* body.darkmode--activated .global-category-menu .hfe-nav-menu a {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #B71818 !important;
} */

/* Hover + active (both modes) */
.global-category-menu .hfe-nav-menu a:hover,
.global-category-menu .hfe-nav-menu .current-menu-item a {
  background: #fff !important;
  color: #B71818 !important;
  border: 1px solid #B71818 !important;
}



/* Dark mode */
body.darkmode--activated.page-id-2989 .terms_condition_sec{background-color: #000 !important;} 
body.darkmode--activated.page-id-2989 .terms_condition_sec p,body.darkmode--activated.page-id-2989 .terms_condition_sec li .elementor-icon-list-text{color: #fff !important;} 
body.page-id-2989 [data-elementor-type="wp-page"] {width: 100%;height: auto;}

body.darkmode--activated.page-id-3038 .privacy_policy_sec{background-color: #000 !important;} 
body.darkmode--activated.page-id-3038 .privacy_policy_sec p,body.darkmode--activated.page-id-3038 .privacy_policy_sec li .elementor-icon-list-text{color: #fff !important;} 
body.page-id-3038 [data-elementor-type="wp-page"] {width: 100%;height: auto;}

body.darkmode--activated .elementor-2846 .elementor-element.elementor-element-e05bf07 .hfe-search-submit {
  background-color: #B71818 !important; /* red button in dark mode */
  color: #fff !important; /* white text */
}

body.darkmode--activated .elementor-2846 .elementor-element.elementor-element-e05bf07 
.hfe-search-form__input {
  background-color: #fff !important; /* black input */
  color: #0e0e0e !important;
  border: 4px solid #B71818 !important; /* red border for clarity */
}


.darkmode--activated embed,
.darkmode--activated iframe,
.darkmode--activated img,
.darkmode--activated video {
    filter: none !important;
}

 button.darkmode-toggle {
    margin-top: 20px;
}

body.darkmode--activated .colormag-post-card {
  border: 2px solid #B71818 !important;
}




.hfe-nav-menu li a:hover {
  background: white;
  color: black;
}

.hfe-site-logo {
    /* margin-top: 38px; */
}

    .cm-secondary {
        width: 30%;
        margin: 0 auto;
    }

nav.hfe-nav-menu__layout-vertical.hfe-nav-menu__submenu-arrow {
  display: none;
}

.hfe-nav-menu__toggle[aria-expanded="true"] + nav.hfe-nav-menu__layout-vertical.hfe-nav-menu__submenu-arrow {
  display: block !important;
}  


/* Hide sidebar only on search pages */
body.search #cm-secondary {
    display: none;
}

/* Make main content full width on search pages */
body.search #primary {
    width: 100%;
    float: none;
    margin: 0 auto;
    max-width: 1200px; /* optional, to keep content centered */
}

/* Optional: adjust post cards for full width layout */
body.search .mzb-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

body.search .mzb-post {
    width: 300px; /* adjust card width */
}


/* Restrict dropdown width and center under icon */


/* Style dropdown ul */
.hfe-nav-menu__layout-vertical ul.hfe-nav-menu {
  
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      width: 500px;
    margin-top: 12px;
    margin: 33px auto;
    position: absolute;
    left: 38%;
}



.hfe-nav-menu__layout-vertical ul.hfe-nav-menu li a {
    display: block;
    padding: 12px 16px;
    color: #fff; /* keep white if red background, or change to #333 if white background */
    text-decoration: none;
    font-weight: 500;
    text-align: center;   /* centers the text */
}

.toggle-inner:before {
  opacity: 1 !important;
}

.toggle-inner:after{
  opacity: 1 !important;
}

.toggle-checkbox:checked + .toggle-label{
  background: #0e0e0e !important;
}

.toggle-label {
  background: antiquewhite !important;
}


body.dark-mode .wpcf7 form label {
    color: #ffffff !important;
}

body.dark-mode .elementor-3038 .elementor-element.elementor-element-ca0ff98 {
    background-color: #121212 !important;
}

/* If Elementor adds the background on the motion effects container */
body.dark-mode .elementor-3038 .elementor-element.elementor-element-ca0ff98 > 
.elementor-motion-effects-container > .elementor-motion-effects-layer {
    background-color: #121212 !important;
}

body.dark-mode .elementor-icon-list-text {
    color: #ffffff !important;
    transition: color 0.3s;
}



/* Dark mode override */
body.dark-mode .elementor-2989 .elementor-element.elementor-element-e1b3565:not(.elementor-motion-effects-element-type-background),
body.dark-mode .elementor-2989 .elementor-element.elementor-element-e1b3565 > .elementor-motion-effects-container > .elementor-motion-effects-layer {
    background-color: #000000 !important;
}

#menu-1-55e7e72 li a.hfe-menu-item:hover {
    color: #000000 !important;
}

.colormag-post-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    box-sizing: border-box;
}

.post-thumbnail-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1;
    border-radius: 10px;
}

.post-thumbnail-img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.post-overlay,
.post-banner {
    position: absolute;
}

.post-hiden-description {
    padding: 15px;
    margin-top: auto;
}
/* Ensure grid container allows equal heights */
.colormag-posts-grid,.posts-grid,.post-grid {display: grid !important;grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));gap: 20px;align-items: stretch;}
.hfe-nav-menu li.current-menu-item a.hfe-menu-item,.hfe-nav-menu li.current_page_item a.hfe-menu-item {color: #000000 !important;}
.gtranslate_wrapper{border: 2px solid #B71818 !important;}
/* Force hamburger to appear up to very large screens (desktop too) */
@media only screen and (max-width: 2000px) {
  .hfe-nav-menu__breakpoint-mobile .hfe-layout-horizontal .hfe-nav-menu__toggle,
  .hfe-nav-menu__breakpoint-mobile .hfe-layout-vertical .hfe-nav-menu__toggle {visibility: visible !important;opacity: 1 !important;display: block !important;}
  /* .hfe-nav-menu__layout-horizontal {display: none !important;} */
}
@media (max-width: 991px) {
.news_card_grid .elementor-shortcode .colormag-posts-grid{grid-template-columns: repeat(3, 1fr) !important}
}
@media (max-width: 790px) {
  button.darkmode-toggle {margin: -10px 10px 0px 0px;}
  /* Hide hamburger */
  .uael-nav-menu .uael-nav-menu-toggle {display: none !important;}
  /* Force horizontal scroll */
  .uael-nav-menu .uael-nav-menu-layout-horizontal {display: flex !important;flex-wrap: nowrap !important;overflow-x: auto !important;-webkit-overflow-scrolling: touch;scrollbar-width: none;justify-content: flex-start !important;}
  .uael-nav-menu .uael-nav-menu-layout-horizontal::-webkit-scrollbar {display: none;}
  /* Style menu items same as desktop */
  .uael-nav-menu .uael-nav-menu-layout-horizontal li a {background: #c8102e;   color: #fff !important; border-radius: 10px;padding: 8px 14px;margin-right: 8px;white-space: nowrap;  font-weight: bold;}
  /* Hover / Active state */
  .uael-nav-menu .uael-nav-menu-layout-horizontal li a:hover,
  .uael-nav-menu .uael-nav-menu-layout-horizontal li.current-menu-item > a {background: #fff !important;color: #c8102e !important;border: 1px solid #c8102e;}
  [data-elementor-type="wp-page"] {margin: 0px;width: 100%; padding: 0px;height: auto;}
  /* header#masthead {width: auto !important;z-index: inherit;position: inherit !important;height: inherit;padding: 0px;overflow: inherit;} */
  /* .elementor-widget-navigation-menu .menu-item a.hfe-menu-item{color:#282828!important;} */
  .hfe-nav-menu-icon svg:focus{outline: none;}
  body.page-id-3038 [data-elementor-type="wp-page"] {margin: 0px;width: 100%; padding: 0px;height: auto;}
  body.page-id-2989 [data-elementor-type="wp-page"] {margin: 0px;width: 100%; padding: 0px;height: auto;}
  /* Force horizontal scroll container */
  .uael-nav-menu .uael-nav-menu-layout-horizontal {display: flex !important;flex-wrap: nowrap !important;overflow-x: auto !important;overflow-y: hidden;-webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 10px;}
  /* Hide scrollbar Chrome/Safari */
  .uael-nav-menu .uael-nav-menu-layout-horizontal::-webkit-scrollbar {display: none;}
  /* Prevent items from shrinking so they overflow */
  .uael-nav-menu .uael-nav-menu-layout-horizontal li {flex: 0 0 auto !important;}
  /* Menu item styling */
  .uael-nav-menu .uael-nav-menu-layout-horizontal li a {background: #c8102e;color: #fff !important;border-radius: 10px;padding: 10px 16px;margin-right: 8px;font-weight: bold;white-space: nowrap; /* prevents wrapping */display: inline-block;}
  /* Hover / Active */
  .uael-nav-menu .uael-nav-menu-layout-horizontal li a:hover,
  .uael-nav-menu .uael-nav-menu-layout-horizontal li.current-menu-item > a {background: #fff !important;color: #c8102e !important;border: 1px solid #c8102e;}
}

@media (max-width: 767px) {
  .hfe-nav-menu__layout-vertical ul.hfe-nav-menu {width: 300px;margin-top: 12px;margin: 30px auto;position: absolute;left: 8%;} 
  .news_card_grid .elementor-shortcode .colormag-posts-grid{grid-template-columns: repeat(2, 1fr) !important}
}
@media (max-width: 576px) {
  .news_card_grid .elementor-shortcode .colormag-posts-grid{grid-template-columns: repeat(1, 1fr) !important}
}
@media (max-width: 576px) {
  .colormag-posts-col-3 .colormag-posts-grid{grid-template-columns: 1fr !important;}
}

