/* style.css */
:root {
  /* Fonts */
  --font-primary: 'Source Sans Pro', sans-serif;
  --font-secondary: 'Playfair Display', serif;

  /* Color Palette (Tetrad-inspired) */
  --color-primary: #1abc9c; /* Teal */
  --color-primary-dark: #16a085;
  --color-secondary: #f39c12; /* Orange */
  --color-secondary-dark: #e67e22;
  --color-accent1: #3498db; /* Blue */
  --color-accent1-dark: #2980b9;
  --color-accent2: #8e44ad; /* Purple */
  --color-accent2-dark: #732d91;

  /* Neutral Colors */
  --color-text-dark: #2c3e50; /* Dark Slate Blue - for headings */
  --color-text-body: #34495e; /* Slate Blue/Grey - for body text */
  --color-text-light: #7f8c8d; /* Lighter grey for subtitles or less important text */
  --color-background-light: #ecf0f1; /* Very Light Grey - "Clouds" */
  --color-background-body: #f4f7f6; /* Off-white for body background */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-border: #dcdde1; /* Light grey border */

  /* Footer Colors */
  --color-footer-bg: #2c3e50;
  --color-footer-text: var(--color-background-light);
  --color-footer-link: var(--color-primary);
  --color-footer-link-hover: var(--color-secondary);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

  /* Transitions & Animations */
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
  --transition-bouncy: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncy */

  /* Spacing */
  --spacing-xs: 0.5rem;  /* 8px */
  --spacing-sm: 1rem;    /* 16px */
  --spacing-md: 1.5rem;  /* 24px */
  --spacing-lg: 2.5rem;  /* 40px */
  --spacing-xl: 4rem;    /* 64px */

  /* Border Radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;

  /* Navbar height - adjust if Bulma's default changes or you customize it */
  --navbar-height: 52px; /* Bulma's default for .navbar.is-fixed-top */
}

/* Global Styles */
body {
  font-family: var(--font-primary);
  color: var(--color-text-body);
  background-color: var(--color-background-body);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden; /* For AOS animations */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.title,
.subtitle {
  font-family: var(--font-secondary);
  color: var(--color-text-dark);
  font-weight: 700;
}

.title {
  color: var(--color-text-dark); /* Ensure Bulma .title uses our variable */
}

.subtitle {
  color: var(--color-text-light); /* Ensure Bulma .subtitle uses our variable */
}

a {
  color: var(--color-primary);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Sections Styling */
.section {
  padding: var(--spacing-lg) var(--spacing-md); /* Natural height based on content */
}

.section.has-background-light {
  background-color: var(--color-background-light) !important; /* Override Bulma if needed */
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  font-size: 2.8rem;
  color: var(--color-text-dark);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background-color: var(--color-primary);
  margin: var(--spacing-sm) auto 0;
  border-radius: 2px;
}

/* Typography Enhancements */
p {
  margin-bottom: var(--spacing-sm);
  max-width: 70ch; /* Optimal reading line length */
}
.column > p, .content p { /* Ensure paragraphs in columns or .content also follow this */
    max-width: 70ch;
}
.columns.is-centered .column.is-two-thirds p,
.has-text-centered p {
    margin-left: auto;
    margin-right: auto;
}


/* Button Styles (Global) */
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  font-family: var(--font-primary);
  font-weight: 600;
  border-radius: var(--border-radius-md);
  padding: 0.75em 1.5em;
  transition: var(--transition-bouncy);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-md);
}

.button:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
  transform: translateY(0px) scale(1);
  box-shadow: var(--shadow-sm);
}

.button.is-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}
.button.is-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.button.is-secondary {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-white);
}
.button.is-secondary:hover {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  color: var(--color-white);
}

.button.is-accent1 {
  background-color: var(--color-accent1);
  border-color: var(--color-accent1);
  color: var(--color-white);
}
.button.is-accent1:hover {
  background-color: var(--color-accent1-dark);
  border-color: var(--color-accent1-dark);
  color: var(--color-white);
}

.button.is-outlined.is-white {
    color: var(--color-white);
    border-color: var(--color-white);
    background-color: transparent;
}
.button.is-outlined.is-white:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}


/* Header & Navbar */
.navbar.is-fixed-top {
  box-shadow: var(--shadow-md);
  background-color: var(--color-white);
  height: var(--navbar-height);
}
.navbar-item img {
  max-height: calc(var(--navbar-height) - 1.5rem); /* Adjust based on navbar padding */
}
.navbar-burger {
  color: var(--color-text-dark);
  height: var(--navbar-height); /* Ensure burger aligns with navbar height */
  width: var(--navbar-height);
}
.navbar-menu {
  background-color: var(--color-white); /* For desktop */
}
.navbar-item {
  font-weight: 600;
  color: var(--color-text-body);
}
.navbar-item:hover, .navbar-item.is-active {
  background-color: var(--color-background-light);
  color: var(--color-primary);
}
@media screen and (max-width: 1023px) {
  .navbar-menu {
    box-shadow: var(--shadow-sm);
    border-top: 1px solid var(--color-border);
  }
}

/* Hero Section */
.hero.is-primary {
  background-color: var(--color-primary) !important; /* fallback */
  position: relative; /* For overlay */
}
.hero.is-primary .title,
.hero.is-primary .subtitle,
.hero.is-primary p {
  color: var(--color-white);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Enhanced readability */
}
.hero-body {
  position: relative;
  z-index: 1; /* Above overlay */
  padding-top: calc(var(--navbar-height) + var(--spacing-lg)); /* Space for fixed navbar */
  padding-bottom: var(--spacing-lg);
}
.hero.is-primary::before { /* Overlay for background image */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
  z-index: 0;
}
.hero [data-aos] { /* Ensure AOS elements are above overlay if needed */
    position: relative;
    z-index: 1;
}

/* Parallax Sections */
.parallax-background {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  color: var(--color-white);
  padding: var(--spacing-xl) var(--spacing-md);
}
.parallax-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Darkening overlay */
  z-index: 0;
}
.parallax-content {
  position: relative;
  z-index: 1;
}
.parallax-content .title,
.parallax-content .subtitle,
.parallax-content p {
  color: var(--color-white);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}
.parallax-content .section-title::after {
    background-color: var(--color-white); /* Make title separator visible */
}


/* Card Styles */
.card {
  background-color: var(--color-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius-md);
  transition: var(--transition-normal);
  overflow: hidden; /* Important for child elements like images */
  display: flex; /* STROGO */
  flex-direction: column; /* STROGO */
  /* align-items: center;  STROGO - This will center card-image and card-content blocks. If they are 100% width, it has no effect on their position. */
  height: 100%; /* For consistent height in columns */
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card .card-image { /* Bulma's .card-image */
  overflow: hidden; /* Ensures image respects border-radius of card if at top */
  width: 100%; /* To span the card if card is align-items:center */
}
.card .card-image figure { /* Bulma's figure, e.g., .image.is-4by3 */
  margin: 0; /* Remove any default figure margins */
}
/* Fixed height for image containers in cards as per prompt */
/* For pricing cards in HTML structure */
.section#pricing .card .card-image figure.is-4by3,
.section#portfolio .card .card-image figure.is-1by1 { /* Example, can be more generic */
  position: relative; /* Needed for absolute positioned img or aspect ratio padding trick */
}

/* Default height for card images if not specified by aspect ratio classes like is-4by3 */
.card .card-image:not(:has(figure.is-1by1)):not(:has(figure.is-4by3)) img, /* if no aspect ratio figure */
.card .card-image figure img { /* If figure is used */
  width: 100%;
  height: 200px; /* Default fixed height, can be overridden */
  object-fit: cover; /* STROGO */
  display: block;
}

.card .card-image figure.is-1by1 img,
.card .card-image figure.is-4by3 img {
    height: 100%; /* Fill the figure maintaining aspect ratio */
    position: absolute; /* If figure uses padding-bottom trick for aspect ratio */
    top: 0;
    left: 0;
}


.card .card-content {
  padding: var(--spacing-md);
  width: 100%; /* To span the card if card is align-items:center */
  flex-grow: 1; /* Allows content to fill space if card has fixed height or in flex row */
  display: flex;
  flex-direction: column;
}
.card .card-content .title,
.card .card-content .subtitle {
  color: var(--color-text-dark); /* Ensure text in cards is dark */
}
.card .card-content .title {
  margin-bottom: var(--spacing-xs);
}
.card .card-content .subtitle {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}
.card .card-content .content {
  font-size: 0.95rem;
  color: var(--color-text-body);
  flex-grow: 1; /* Push button to bottom if card content is flex column */
}
.card .card-content .content p:last-child {
  margin-bottom: 0;
}
.card .card-content .button {
    margin-top: auto; /* Pushes button to the bottom of card-content */
}

/* Centering content within cards (specific elements) */
.card .card-content .title,
.card .card-content .subtitle.is-6 { /* Price subtitle */
    text-align: left; /* Default unless specified */
}
/* If global centering of card content is needed:
.card, .item, .testimonial, .team-member, .product-card {
    text-align: center;
}
.card .card-content, .item .content, .testimonial .content {
    text-align: center;
}
.card .card-content p, .item p, .testimonial p {
    text-align: left; /* Or center if truly needed for paragraphs
}
*/

/* Specific for Success Stories avatars */
#success-stories .media-left img.is-rounded {
  border-radius: 50%;
  border: 3px solid var(--color-primary);
}

/* Form Styles */
.input, .textarea, .select select {
  border-radius: var(--border-radius-sm);
  border-color: var(--color-border);
  box-shadow: none; /* Remove Bulma's default to make it flatter */
  transition: var(--transition-fast);
  font-size: 1rem;
}
.input:focus, .textarea:focus, .select select:focus,
.input.is-focused, .textarea.is-focused, .select select.is-focused,
.input:active, .textarea:active, .select select:active,
.input.is-active, .textarea.is-active, .select select.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.125em rgba(var(--color-primaryRGB, 26, 188, 156), 0.25); /* Bulma-like focus */
}
.label {
  color: var(--color-text-dark);
  font-weight: 600;
}
.checkbox label {
    color: var(--color-text-body);
}
.checkbox input[type="checkbox"] {
    margin-right: var(--spacing-xs);
}
.checkbox a {
    text-decoration: underline;
}

/* Contact form specific padding */
#contact form {
    padding: var(--spacing-md);
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}


/* Footer */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
}
.footer .title {
  color: var(--color-white) !important; /* Override if Bulma makes it dark */
}
.footer a {
  color: var(--color-footer-link);
}
.footer a:hover {
  color: var(--color-footer-link-hover);
  text-decoration: underline;
}
.footer .content p {
  color: var(--color-footer-text); /* Ensure paragraph text is light */
}
.footer hr {
  background-color: rgba(255, 255, 255, 0.1);
}
.footer .column ul {
    list-style: none;
    margin-left: 0;
}
.footer .column ul li {
    padding: var(--spacing-xs) 0;
}
/* Footer social links (text-based) */
.footer .column p.title.is-5 + ul li a { /* Targeting social links more specifically if needed */
  font-weight: 600;
}

/* Modal Styles (Basic Bulma customization) */
.modal-card-head, .modal-card-foot {
  background-color: var(--color-background-light);
  border-color: var(--color-border);
}
.modal-card-title {
  color: var(--color-text-dark);
}
.modal-card-body {
    background-color: var(--color-white);
}

/* Glassmorphism example (apply .glassmorphism class to an element) */
.glassmorphism {
  background: rgba(255, 255, 255, 0.15); /* Semi-transparent background */
  backdrop-filter: blur(10px); /* Blur effect */
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.25); /* Subtle border */
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); /* Soft shadow */
  padding: var(--spacing-md);
}


/* Special Page Styles */
/* success.html */
body.page-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--color-primary); /* Or a calming background */
  color: var(--color-white);
  padding: var(--spacing-md);
}
body.page-success .success-container {
    background-color: var(--color-white);
    color: var(--color-text-dark);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
}
body.page-success .title {
    color: var(--color-primary);
}
body.page-success .button {
    margin-top: var(--spacing-md);
}


/* privacy.html & terms.html - padding for fixed navbar */
body.page-privacy main,
body.page-terms main {
  padding-top: calc(var(--navbar-height) + var(--spacing-sm)); /* Adjust as needed */
}
body.page-privacy .section:first-child,
body.page-terms .section:first-child,
body.page-privacy .container:first-child, /* if first element is container */
body.page-terms .container:first-child {
  padding-top: var(--spacing-md); /* Add some more space within the first section/container */
}
/* Ensure content in these pages is styled for readability */
.legal-content-page .content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}
.legal-content-page .content h1,
.legal-content-page .content h2,
.legal-content-page .content h3 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-dark);
}
.legal-content-page .content p {
    color: var(--color-text-body);
    line-height: 1.8;
}


/* Read More Link Style */
.read-more-link {
  display: inline-block;
  color: var(--color-accent1);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  padding-right: 1.5em; /* Space for arrow */
  transition: var(--transition-fast);
}
.read-more-link::after {
  content: '→'; /* Simple arrow */
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition-fast);
}
.read-more-link:hover {
  color: var(--color-accent1-dark);
  text-decoration: underline;
}
.read-more-link:hover::after {
  right: -0.3em; /* Arrow moves slightly on hover */
}


/* Utility Classes */
.has-text-shadow {
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.mb-0 { margin-bottom: 0 !important; }
.mt-auto { margin-top: auto !important; }

/* Hyperrealistic Texture Placeholders (visual cue, actual textures via images) */
[data-texture="metal-brushed"] {
  /* Example: border: 1px solid #aaa; background: linear-gradient(to bottom, #eee, #ccc); */
}
[data-texture="acoustic-foam"] {
  /* Example: border: 1px solid #555; background-color: #777; */
}

/* Cookie Consent (styles are inline in HTML, this is for completeness if moved) */
#cookie-consent-popup {
    /* Styles are defined inline in HTML as requested */
}

/* Ensure high contrast for text on various backgrounds - mostly handled by color choices and overlays. */

/* Final check on card images and content centering based on strict rules */
/*
The following rules interpret "центрирование изображений" and "центрирование содержимого"
as per the strict requirements.
*/
.card { /* Already display: flex; flex-direction: column; */
  align-items: center; /* STROGO: This centers .card-image and .card-content if they are not width:100% */
}

/* If .card-image and .card-content are meant to be visually centered blocks
   within the card's padding, they should NOT be width:100%.
   However, typical card design has them span full width.
   The current CSS makes them width: 100%, so align-items: center on .card has no visual effect on their position.
   If specific centering of content *within* .card-content is desired: */
.card-content.has-text-centered,
.card-content .has-text-centered {
    text-align: center !important;
}
.card-content.has-text-centered p {
    margin-left: auto;
    margin-right: auto;
}

/* Ensure Bulma's .image container in cards doesn't get messed up */
.card .image { /* Bulma's .image class used as figure */
    margin-left: auto;
    margin-right: auto; /* This helps if the image itself is narrower than its container */
    display: block; /* Ensure it behaves as a block for margin auto to work */
}

/* If the card is in a column, it takes column width.
   If .card has align-items:center, then .card-image must have a defined width or max-width to be centered.
   With width:100% on .card-image, it already fills.
   The request is likely for internal content of .card-content to be centerable, or images properly fitted.
   The object-fit: cover and height definitions handle image fitting.
*/

/* Overrides for Bulma if necessary, e.g., to ensure our variables take precedence */
.hero.is-primary {
  background-color: var(--color-primary) !important;
}
.hero.is-primary .title, .hero.is-primary .subtitle {
  color: var(--color-white) !important;
}

/* Additional styling for the external resources section cards */
#external-resources .card .card-content .title a {
    color: var(--color-primary); /* Make link titles use primary color */
}
#external-resources .card .card-content .title a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
#external-resources .card {
    box-shadow: var(--shadow-sm); /* Lighter shadow for these info cards */
}
#external-resources .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}