/*
Theme Name: Modern Fields Theme
Theme URI: 
Author: Capitaine WP
Author URI: https://capitainewp.io
Description: Modern Fields Blue Theme
Requires at least: 6.5
Tested up to: 6.5
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: modern-fields-theme
*/

/* Pages transitions */
@view-transition {
  navigation: auto;
  types: slide;
}

/* prevent scroll overflow */
html,
body {
  overscroll-behavior: none;
}

/* main section spacing fixes */
footer.wp-block-template-part {
  margin-top: 0 !important;
}

main.wp-block-group {
  margin-top: 0 !important;
}

/* links */
a:not([class*="wp-element-button"]) {
  text-decoration: none;
}

/* SVG fixes */
.safe-svg-cover .safe-svg-inside {
  display: block;
}

/* Code */
code {
  background-color: var(--wp--preset--color--neutral-light);
  border-radius: var(--wp--preset--border-radius--xs);
  padding: 2px 4px;
  font-size: 0.85em;
  border-bottom: 1px solid var(--wp--preset--color--neutral);
}

/* Zoomable image */
@media (width>=1600px) {
  .is-zoomable {
    transition: transform 0.3s ease-in-out;
    transform: perspective(900px) scale(1.05) rotateY(-10deg) rotateX(2deg) translateY(-20px);
  }

  .is-zoomable:hover {
    transform: perspective(900px) scale(1.05) rotateY(-15deg) translateY(-15px);
  }
}

/* Sticky offsets */
.is-sticky-offset-40 {
  top: var(--wp--preset--spacing--40);
}

.is-sticky-offset-50 {
  top: var(--wp--preset--spacing--50);
}

.is-sticky-offset-60 {
  top: var(--wp--preset--spacing--60);
}

/* Content */
.documentation h2:not(:first-child),
.blog-content h2:not(:first-child) {
  margin-top: var(--wp--preset--spacing--50);
}

.documentation h3:not(:first-child),
.blog-content h3:not(:first-child) {
  margin-top: var(--wp--preset--spacing--40);
}

.documentation h4:not(:first-child),
.blog-content h4:not(:first-child) {
  margin-top: var(--wp--preset--spacing--30);
}

/* Responsive commons */
@media (width>=1024px) {
  .mobile-only {
    display: none !important;
  }
}

@media (width<1024px) {
  .desktop-only {
    display: none !important;
  }
}

/* Responsive specific styles */
@media (width<1024px) {

  /* Second video column in home */
  .mf-invert-columns>*:first-child {
    order: 2;
  }

  .mf-invert-columns>*:last-child {
    order: 1;
  }

  /* Features grid in home */
  .mf-features-grid>* {
    grid-column: span 6;
  }

  .mf-features-grid .wp-block-columns {
    flex-direction: column;
    gap: var(--wp--preset--spacing--40);
  }

  /* Features fields locations */
  .mf-standard-grid>* {
    grid-column: span 12;
  }

  /* Premium section */
  .mf-go-premium .wp-block-column {
    padding-top: 0 !important;
  }

  .mf-go-premium .wp-block-column:first-child {
    padding-bottom: var(--wp--preset--spacing--50);
  }

  /* Documentation blocks */
  .mf-doc-blocks {
    gap: var(--wp--preset--spacing--20) !important;
  }
}

@media (width<768px) {

  /* Grid with video + 1-2-3 steps in home */
  .mf-grid-new-way>* {
    grid-column: span 12;
  }

  .mf-grid-new-way .wp-block-group:nth-child(2) {
    border-radius: 0 !important;
  }

  .mf-grid-new-way .wp-block-group:nth-child(4) {
    border-bottom-right-radius: var(--wp--preset--border-radius--m) !important;
    border-bottom-left-radius: var(--wp--preset--border-radius--m) !important;
  }

  /* Features grid in home */
  .mf-features-grid>* {
    grid-column: span 12;
  }

  /* Focus grid in Features */
  .mf-focus-fields>* {
    grid-column: span 12;
  }

  .mf-focus-fields .wp-block-group:nth-child(2) {
    border-radius: 0 !important;
  }

  .mf-focus-fields .wp-block-group:nth-child(4) {
    border-bottom-right-radius: var(--wp--preset--border-radius--m) !important;
    border-bottom-left-radius: var(--wp--preset--border-radius--m) !important;
  }

  /* Responsive menu */
  .wp-block-navigation__responsive-container-content {
    padding: var(--wp--preset--spacing--40);
  }

}

@media (width<1160px) {

  /* Header download button */
  .mf-dl-button {
    display: none !important;
  }
}