/* --- TITLE TEXT SHADOWS ------------------------------------------------
   Two strengths, defined once so every title across the site is consistent
   and tunable from one place:

   --image-title-shadow  text sitting directly ON a photo (carousel copy,
                         catalogue tile labels). Heavy, because the backdrop
                         underneath can be any brightness.
   --panel-title-shadow  headings on a glass panel (news, blog, product page,
                         section headings). Light — enough to lift the text
                         off the surface without smudging it.

   --tile-caption-shadow  the catalogue tile captions specifically. Same as
                          the image shadow while the text is white; inverted
                          to a white halo in the light theme, where those
                          captions turn dark and a dark shadow would read as
                          a smudge rather than depth.

   In the light theme the panel shadow also drops to a whisper. The carousel
   keeps the full image shadow in both themes — its copy stays white over a
   photograph, so the shadow there is legibility, not decoration.
   --------------------------------------------------------------------- */
:root {
    --image-title-shadow:   0 1px 4px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5);
    --tile-caption-shadow:  0 1px 4px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.5);
    --panel-title-shadow:   0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.28);
}
:root[data-theme="light"] {
    --tile-caption-shadow: 0 1px 3px rgba(255, 255, 255, 0.95), 0 2px 8px rgba(255, 255, 255, 0.7);
    --panel-title-shadow:  0 1px 2px rgba(0, 0, 0, 0.13);
}

/* --- TEXT FIELDS and BUTTON HOVER — see design-system.css.
   The green wash that used to live here on `button:hover` outranked
   the canonical pill hover (an extra pseudo-class beats the `html`
   prefix), which is why unclassed buttons hovered green while
   .submit-btn hovered white. --- */

/* --- GLOBAL RESET --- */
html {
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family, 'Avenir', 'Avenir Next', 'Inter', system-ui, sans-serif);
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; }

/* --- TAB CONTENT AREA (full-width centered container) --- */
.tab-content-area {
    width: calc(100% - 32px);
    max-width: 1600px;
    margin: 20px auto 48px; /* footer uses margin-top:auto, so the gap lives here */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}
.tab-panel.active { display: flex; }

/* --- SECTION VISIBILITY CONTROL --- */
.content-section {
    display: none; /* Hidden by default */
    width: 100%;
    margin: 0;
}

.content-section.active {
    display: block; /* Only show the selected tab's content */
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- GLOBAL VARIABLES (can be overridden by theme.js) --- */
:root {
    /* Spacing & Radii */
    --radius-item: 8px;
    --radius-card: 16px;
    --pad-nav-y: 4px;
    --pad-nav-x: 6px;
    --indent-step: 12px;

    /* Carousel */
    --block-height: 600px;
    --max-width: 1200px;
    --vertical-padding: 20px;
    --cycle-time: 10s;
    --transition-speed: 0.6s;
    --font-family: 'Avenir', 'Avenir Next', 'Inter', system-ui, sans-serif;
}

/* Brand typeface. Geologica replaces Avenir page by page: a page opts in
   with <html data-font="geologica">, and every rule below that reads
   --font-family follows. The webfont itself comes from the Google Fonts
   <link> in each page's <head>. */
:root[data-font="geologica"] {
    --font-family: 'Geologica', 'Avenir', 'Avenir Next', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* --- GLASS CONTAINERS (Shared styles for main blocks — matches .glass-nav) --- */
.glass-container {
    font-family: var(--font-family, 'Avenir', 'Avenir Next', 'Inter', system-ui, sans-serif);
    background: var(--glass-bg-spacer-top, rgba(255, 255, 255, 0.08));
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-top: 0.5px solid var(--glass-border-top, rgba(255, 255, 255, 0.5));
    border-bottom: 2px solid var(--glass-border-bottom, rgba(255, 255, 255, 0.2));
    border-left: 1px solid var(--glass-border-side, rgba(255, 255, 255, 0.1));
    border-right: 1px solid var(--glass-border-side, rgba(255, 255, 255, 0.1));
    border-radius: 15px;
    box-shadow: 0 15px 45px var(--glass-shadow-hover, rgba(0, 0, 0, 0.4));
    width: calc(100% - 32px);
    max-width: var(--max-width, 1200px);
    margin: 20px auto 0;
    box-sizing: border-box;
    color: var(--text-color, #E0E0E0);
}

/* --- CAROUSEL --- */
.carousel-container {
    width: calc(100% - 32px);
    max-width: var(--max-width, 1200px);
    margin: 20px auto 0;
    box-sizing: border-box;
    height: var(--block-height, 600px) !important;
    min-height: var(--block-height, 600px) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.carousel-control:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--primary-color, #20d21a);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.18);
}
.carousel-control.prev { left: 16px; }
.carousel-control.next { right: 16px; }
.carousel-container:hover .carousel-control { opacity: 1; }
.carousel-control svg { width: 18px; height: 18px; stroke: #FFFFFF; }

/* Card & 3D Flip Styles */
.card-wrapper {
    position: absolute;
    inset: 0;
    max-width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.65s ease, visibility 0.65s;
    border-radius: var(--border-radius, 25px);
    overflow: hidden;
    background: transparent;
    z-index: 1;
}
.card-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}
.card-wrapper.slide-left {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}
.card-wrapper.slide-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    cursor: pointer;
}
.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
    border-radius: var(--border-radius, 25px);
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}
.card-front { transform: rotateY(0deg); -webkit-transform: rotateY(0deg); }
.card-back { transform: rotateY(180deg); -webkit-transform: rotateY(180deg); }
.card-wrapper.flipped .card-inner { transform: rotateY(180deg); -webkit-transform: rotateY(180deg); }
.card-wrapper.no-flip .card-inner { cursor: default; }

/* Layers */
.layer-img, .layer-tint, .layer-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.layer-img {
    z-index: 1;
    background-size: cover;
    background-position: center;
    opacity: 0.95;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 600ms ease;
    will-change: transform;
}
/* Ken Burns slow zoom-in on the active slide for the duration of its display */
.card-wrapper.active .layer-img {
    animation: kenBurnsZoom 11s ease-out forwards;
}
@keyframes kenBurnsZoom {
    0%   { transform: scale(1); }
    100% { transform: scale(1.12); }
}
.layer-tint { z-index: 2; backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgba(0, 0, 0, 0.15) !important; }
.layer-overlay { z-index: 3; }
.card-back .layer-overlay { display: none; }

/* Content */
.card-content { position: relative; z-index: 4; max-width: 100%; width: 100%; box-sizing: border-box; padding: 0 48px; color: var(--carousel-text-color, #ffffff); display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Slide copy sits straight on the photo, so it carries its own shadow: a
   tight one for edge definition plus a wide soft one that darkens the image
   immediately behind the glyphs. Without it the text loses legibility over
   light areas of a slide. */
.card-title {
    font-size: 48px; font-weight: 700; line-height: 1.1;
    color: var(--carousel-title-color, #ffffff);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55), 0 6px 24px rgba(0, 0, 0, 0.45);
}
.card-text {
    font-size: 20px; opacity: 0.9;
    color: var(--carousel-text-color, #ffffff);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.40);
}
.flip-hint { font-size: 14px; opacity: 0.6; margin-top: 8px; }
/* Pill material from design-system.css; the carousel card only needs
   the gap above it. */
.card-button { margin-top: 16px; }

@keyframes tilePop {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- BLOG BLOCK --- */
.custom-blog-block {
    width: calc(100% - 32px);
    max-width: var(--max-width, 1600px);
    margin: 20px auto 0;
    box-sizing: border-box;
    --block-padding: 16px;
    --article-gap: 24px;
    --title-text-gap: 8px;
    --header-size: 24px;
    --title-size: 18px;
    --text-size: 14px;
    --header-color: var(--news-header-color, #E0E0E0);
    --title-color: var(--news-title-color, #E0E0E0);
    padding: var(--block-padding, 16px) 20px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.blog-block-title { margin: 0 0 var(--article-gap) 0; font-size: var(--header-size); color: var(--news-header-color, #E0E0E0); font-weight: bold; line-height: 1.2; letter-spacing: -0.5px; text-align: left; }
.blog-list-container { display: flex; flex-direction: column; gap: var(--article-gap); }
.blog-article { display: flex; flex-direction: column; }
.blog-article:not(:last-child)::after { content: ""; display: block; width: 60px; height: 2px; background: rgba(224, 224, 224, 0.2); margin-top: var(--article-gap); border-radius: 2px; }
.blog-article-actions { margin-top: 16px; display: flex; gap: 12px; }
.blog-article-date { font-size: 12px; color: rgba(255, 255, 255, 0.85); margin-bottom: 4px; font-weight: 400; }
.blog-article-title { margin: 0 0 var(--title-text-gap) 0; font-size: var(--title-size); font-weight: bold; line-height: 1.3; text-align: left; max-width: 1200px; }
.blog-article-title a { text-decoration: none; color: var(--news-title-color, #E0E0E0); transition: color 0.2s ease; display: block; }
.blog-article-title a:hover { color: var(--primary-color, #20d21a); }
.blog-article-text { margin: 0; font-size: var(--text-size); color: var(--news-text-color, rgba(224, 224, 224, 0.85)); line-height: 1.5; font-weight: normal; max-width: 1200px; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Action buttons */
.action-btn:hover, .action-btn.liked, .action-btn.active-action { color: var(--primary-color, #20d21a); border-color: var(--primary-color, #20d21a); }
.action-btn:active { transform: scale(0.95); }
.action-btn.liked { background: rgba(32, 210, 26, 0.1); }
@keyframes iconBounce { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.action-btn.liked svg { fill: var(--primary-color, #20d21a); animation: iconBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* --- TOAST NOTIFICATION --- */
#toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 9999; pointer-events: none; }
.toast-message { background: rgba(15, 15, 15, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 0px solid transparent; color: #FFFFFF; padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.45); transform: translateY(100px); opacity: 0; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; }
.toast-message.show { transform: translateY(0); opacity: 1; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .card-title { font-size: 32px; }
    .card-text { font-size: 16px; }
    .carousel-container { height: 500px !important; min-height: 500px !important; }
}

/* --- ABOUT BLOCK --- */
.about-block {
    width: calc(100% - 32px);
    max-width: 1600px;
    min-height: 600px;
    margin: 20px auto 0;
    box-sizing: border-box;
    padding: 48px 56px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.about-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.about-rows {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.about-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-row-title {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    color: var(--body-text-color, #E0E0E0);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.about-row-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--body-text-color, #E0E0E0);
    opacity: 0.85;
    max-width: 860px;
}

/* =============================================
   GLOBAL GLASS BUTTON SYSTEM — moved to design-system.css.
   The pill, its light-theme flip, hover and press all live there
   now, driven by the --btn-* tokens. What stays here is the group
   wrapper below, which is layout rather than material.
   ============================================= */

/* --- Button group wrapper – unifies adjacent buttons into one block --- */
.btn-group {
    display: inline-flex;
    gap: 1px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 45px;
    padding: 5px;
    box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
}

.btn-group .btn-glass,
.btn-group > button {
    border-radius: 0;
    box-shadow: none;
}

.btn-group > :first-child {
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
}

.btn-group > :last-child {
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
}

/* --- Auto-merge: adjacent .btn-glass siblings without .btn-group --- */
.btn-glass + .btn-glass {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 1px;
}

.btn-glass:has(+ .btn-glass) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}


