/*
Theme Name: Ami Beauty
Theme URI: https://amibeauty.ee
Description: Custom child theme for Ami Beauty salon, built on GeneratePress with native Gutenberg blocks.
Author: Veebify
Author URI: https://veebify.com
Template: generatepress
Version: 1.0.0
Text Domain: ami-beauty
*/

html {
    scroll-behavior: smooth;
}

/* Sub-pages: push content below the fixed 80px header. The homepage's hero
   block sits behind the transparent header by design and must NOT be padded. */
body:not(.home):not(.ami-homepage) .site-content {
    padding-top: 80px;
}

/* ---------------------------------------------------------------------------
   Full-bleed alignment for non-homepage pages.
   GeneratePress wraps content in .container (max ~1200px). On non-homepage
   pages keep the container, but let blocks declaring align="full" break out
   of it via the standard 100vw trick.
--------------------------------------------------------------------------- */

.entry-content > .alignfull,
.site-content .alignfull,
.entry-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.entry-content > .alignwide,
.site-content .alignwide,
.entry-content .alignwide {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Stop the horizontal scrollbar that 100vw can introduce when a vertical
   scrollbar is present (common on Windows). */
html,
body {
    overflow-x: hidden;
}

/* ---------------------------------------------------------------------------
   Homepage: aggressive container reset.

   The PHP filters in functions.php already strip .grid-container,
   .container, .separate-containers, .right-sidebar etc. on the homepage,
   but a Customizer reset or plugin can re-add them. These rules make sure
   nothing in the GP shell can constrain content on the front page.
--------------------------------------------------------------------------- */

body.home #page,
body.ami-homepage #page,
body.home #page.grid-container,
body.ami-homepage #page.grid-container,
body.home #page.container,
body.ami-homepage #page.container,
body.home .grid-container,
body.ami-homepage .grid-container,
body.home .container,
body.ami-homepage .container,
body.home .ami-page-fullbleed,
body.ami-homepage .ami-page-fullbleed,
body.home #content,
body.ami-homepage #content,
body.home .site-content,
body.ami-homepage .site-content,
body.home .content-area,
body.ami-homepage .content-area,
body.home #primary,
body.ami-homepage #primary,
body.home .site-main,
body.ami-homepage .site-main,
body.home article,
body.ami-homepage article,
body.home .inside-article,
body.ami-homepage .inside-article,
body.home .entry-content,
body.ami-homepage .entry-content,
body.home .ami-no-container,
body.ami-homepage .ami-no-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

/* Belt-and-suspenders: an alignfull child on the homepage doesn't need the
   100vw breakout because the parent is already 100% wide — keep it simple
   so it doesn't accidentally introduce horizontal scroll. */
body.home .alignfull,
body.ami-homepage .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.home .alignwide,
body.ami-homepage .alignwide {
    width: 100% !important;
    max-width: 1400px !important;
}

/* GP's site-footer is removed on the homepage via remove_action() in
   functions.php. If a different footer plugin hooks in, hide it visually
   as a safety net. */
body.home .site-footer,
body.ami-homepage .site-footer,
body.home .footer-widgets,
body.ami-homepage .footer-widgets {
    display: none !important;
}

/* ---------------------------------------------------------------------------
   Block spacing utility.
   Applied via data-spacing-top / data-spacing-bottom attributes on the
   wrapper of any Ami block. Values: none / sm / md / lg.
   Block-specific stylesheets MUST NOT declare padding-top/padding-bottom
   on their section wrapper — those are owned here.
--------------------------------------------------------------------------- */

[data-spacing-top="none"] { padding-top: 0; }
[data-spacing-top="sm"]   { padding-top: 40px; }
[data-spacing-top="md"]   { padding-top: 80px; }
[data-spacing-top="lg"]   { padding-top: 112px; }

[data-spacing-bottom="none"] { padding-bottom: 0; }
[data-spacing-bottom="sm"]   { padding-bottom: 40px; }
[data-spacing-bottom="md"]   { padding-bottom: 80px; }
[data-spacing-bottom="lg"]   { padding-bottom: 112px; }

@media (max-width: 640px) {
    [data-spacing-top="sm"] { padding-top: 28px; }
    [data-spacing-top="md"] { padding-top: 48px; }
    [data-spacing-top="lg"] { padding-top: 80px; }

    [data-spacing-bottom="sm"] { padding-bottom: 28px; }
    [data-spacing-bottom="md"] { padding-bottom: 48px; }
    [data-spacing-bottom="lg"] { padding-bottom: 80px; }
}

/* ---------------------------------------------------------------------------
   Brand colour safety net.
   Any block where an editor explicitly picked the "Black" palette swatch for
   TEXT renders with .has-black-color. Force it to the brand green so per-block
   colour overrides match the rest of the site. (White-on-dark text uses
   .has-white-color and is unaffected; black *backgrounds* use
   .has-black-background-color and are intentionally left alone.)
--------------------------------------------------------------------------- */
.has-black-color { color: #445543 !important; }

/* ---------------------------------------------------------------------------
   Body line spacing — a touch more breathing room for readability across both
   languages, without altering the tight display line-heights on headings.
--------------------------------------------------------------------------- */
body,
.entry-content p,
.entry-content li {
    line-height: 1.7;
}
