/* 
   STYB Projekt OÜ - Premium CSS Design System
   Modern Architecture & Construction Bureau Style
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1A1D20;        /* Deep Carbon/Graphite */
    --primary-light: #2D3136;  /* Slate graphite */
    --accent: #2E5B70;         /* Architect Steel Blue */
    --accent-hover: #1E3F50;   /* Richer dark steel blue for hover */
    --text-main: #334155;      /* Slate 700 */
    --text-muted: #64748B;     /* Slate 500 */
    --text-light: #F8FAFC;     /* Slate 50 */
    --bg-light: #F8FAFC;       /* Off-white */
    --bg-card: #FFFFFF;
    --border: #E2E8F0;         /* Slate 200 */
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* Global Resets & Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: #FFFFFF;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Modern Double Header Navigation */

/* Header 1 (Upper Premium Bar) */
.header-1 {
    background-color: var(--primary-light);
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-1-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    height: 52px;
}

.header-1-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.92em;
    font-weight: 500;
}

.header-1-contacts a {
    color: rgba(248, 250, 252, 0.95);
    transition: var(--transition);
}

.header-1-contacts a:hover {
    color: #FFFFFF;
}

.header-1-contacts .social-icon {
    display: inline-flex;
    align-items: center;
    color: rgba(248, 250, 252, 0.95);
}

.header-1-contacts .social-icon svg {
    width: 24px !important;
    height: 24px !important;
    transition: var(--transition);
}

.header-1-contacts .social-icon:hover {
    color: var(--accent) !important;
    transform: translateY(-2px) scale(1.05);
}

.header-1-contacts .separator {
    color: rgba(255, 255, 255, 0.2);
}

.header-1-nav {
    display: flex;
    gap: 20px;
}

.header-1-nav a {
    font-size: 0.92em;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.88);
    transition: var(--transition);
}

.header-1-nav a:hover,
.header-1-nav a.active {
    color: #FFFFFF;
}

/* Header 2 (Lower Brand Bar) */
.header-2 {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-2-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    height: 75px;
}

.logo-link {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-light);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.65em;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
}

.header-2-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-2-nav a {
    font-size: 0.95em;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.8);
    position: relative;
    padding: 8px 4px;
}

.header-2-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-light);
    transition: var(--transition);
}

.header-2-nav a:hover,
.header-2-nav a.active {
    color: var(--text-light);
}

.header-2-nav a:hover::after,
.header-2-nav a.active::after {
    width: 100%;
}

.btn-contact {
    background-color: var(--accent);
    color: var(--text-light) !important;
    padding: 8px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid transparent;
}

.btn-contact:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Mobile Header Bar */
.mobile-header-bar {
    display: none;
    background-color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.mobile-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 70px;
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 110;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: var(--transition);
}

/* Mobile Menu Panel Drawer */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 380px;
    height: 100vh;
    background-color: var(--primary);
    z-index: 105;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    padding: 100px 40px 40px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-panel.open {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.mobile-nav-links a {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-light);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-links a.active {
    color: var(--text-muted);
}

.mobile-contact-info {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.mobile-contact-info a {
    font-size: 0.95em;
    color: var(--text-muted);
}

.mobile-contact-info a:hover {
    color: var(--text-light);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 102;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Animate Hamburger to X */
.mobile-menu-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Service Accordion Block (.image-blocks) */
.image-blocks {
    display: flex;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background-color: var(--primary);
}

.image-blocks .block {
    flex: 1;
    position: relative;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.image-blocks .block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26,29,32,0.1) 0%, rgba(26,29,32,0.85) 100%);
    z-index: 2;
    transition: var(--transition);
}

.image-blocks .block:hover {
    flex: 1.8;
}

.image-blocks .block:hover::before {
    background: linear-gradient(180deg, rgba(26,29,32,0) 0%, rgba(26,29,32,0.95) 100%);
}

.image-blocks .block:not(:hover) {
    flex: 0.6;
}

.image-blocks .block a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-blocks .block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.image-blocks .block:hover img {
    transform: scale(1.08);
}

.image-blocks .block .text {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    color: var(--text-light);
    font-size: 1.5em;
    font-weight: 700;
    z-index: 3;
    letter-spacing: 0.05em;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), font-size 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    text-transform: uppercase;
}

.image-blocks .block:hover .text {
    font-size: 2.2em;
    transform: translateY(-10px);
}

/* Center Intro Text Quote */
.text-center-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 60px 30px;
    margin: 0;
}

.text-center-section p {
    max-width: 900px;
    font-size: 1.35em;
    font-weight: 400;
    line-height: 1.8;
    color: var(--primary);
    font-style: italic;
    position: relative;
}

.text-center-section p::before,
.text-center-section p::after {
    content: '"';
    font-size: 2em;
    color: var(--border);
    position: absolute;
    line-height: 1;
    font-weight: bold;
}

.text-center-section p::before {
    left: -30px;
    top: -10px;
}

.text-center-section p::after {
    right: -30px;
    bottom: -35px;
}

/* Full Width Structural Sections */
.full-width-block {
    display: flex;
    width: 100%;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border);
}

/* Alternate light background for grid sections */
.full-width-block:nth-of-type(even) {
    background-color: var(--bg-light);
}

.half-content {
    flex: 1;
    width: 50%;
    overflow: hidden;
}

.text-content {
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.text-content h2 {
    font-size: 2.2em;
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 12px;
}

.text-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

.text-content p {
    color: var(--text-main);
    font-size: 1.05em;
    line-height: 1.75;
    margin-bottom: 20px;
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* Custom list layout in service columns */
.text-content ul {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.text-content ul li {
    font-size: 1.05em;
    font-weight: 500;
    position: relative;
    padding-left: 28px;
    color: var(--primary);
}

.text-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.image-content {
    position: relative;
    min-height: 450px;
}

.image-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Map specific override */
.image-content iframe {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border: none;
    display: block;
}

/* Video Section Page Header */
.video-block {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: var(--primary);
}

.background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    position: relative;
    z-index: 1;
}

.video-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26, 29, 32, 0.3) 0%, rgba(26, 29, 32, 0.75) 100%);
    z-index: 2;
}

.video-block .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.2em;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
    text-align: center;
    width: 90%;
    z-index: 5;
}

/* Premium Unified Footer Section */
.site-footer {
    background-color: var(--primary);
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-upper {
    padding: 50px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-upper .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    font-size: 0.95em;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--text-light);
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.social-link {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-light);
    background-color: var(--primary-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 18px;
    border-radius: 4px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent);
    color: var(--text-light);
    border-color: transparent;
    transform: translateY(-2px);
}

.footer-lower {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 20px 0;
}

.footer-lower .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.88em;
}

.footer-contacts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
}

.footer-contacts strong {
    color: rgba(248, 250, 252, 0.85);
    font-weight: 600;
}

.footer-contacts a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-contacts a:hover {
    color: var(--text-light);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.08);
}

.footer-copy {
    color: var(--text-muted);
}

/* Modern Contact Form Layout */
.custom-form-wrapper {
    width: 100%;
    max-width: 550px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.styb-contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.styb-contact-form .form-row {
    display: flex;
    gap: 20px;
}

.styb-contact-form input,
.styb-contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 0.95em;
    background-color: #FFFFFF;
    color: var(--primary);
    transition: var(--transition);
    box-sizing: border-box;
}

.styb-contact-form input:focus,
.styb-contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 91, 112, 0.15);
}

.styb-contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.styb-contact-form button {
    padding: 16px 24px;
    background-color: var(--accent);
    color: var(--text-light);
    border: none;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.styb-contact-form button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Contact Details Info Card List */
.contact-details-section {
    background-color: #FFFFFF;
}

.contact-details-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
}

.contact-details-content h2 {
    font-size: 2em;
    margin-bottom: 35px;
    text-transform: uppercase;
}

.contact-details-list {
    font-size: 1.05em;
    line-height: 1.8;
    text-align: left;
    max-width: 550px;
    width: 100%;
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.contact-details-list p {
    margin: 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-details-list p:last-child,
.contact-details-list p.no-border {
    border-bottom: none;
}

.contact-details-list strong {
    color: var(--primary);
    font-weight: 600;
}

.contact-details-list span,
.contact-details-list a {
    color: var(--text-main);
    font-weight: 500;
}

.contact-details-list a:hover {
    color: var(--accent);
}

/* Gallery styling - Tehtud tood.html */
.gallery-section {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-section h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;
}

.gallery-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 3px;
    background-color: var(--accent);
}

/* Modern CSS Grid Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: var(--primary);
    aspect-ratio: 3/2;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Gallery Item Hover Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 29, 32, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.gallery-overlay span {
    color: var(--text-light);
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid var(--text-light);
    padding: 8px 20px;
    border-radius: 4px;
    margin-top: 10px;
    transform: translateY(15px);
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Premium JS Lightbox Modal (<dialog>) */
.lightbox-dialog {
    border: none;
    background: transparent;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    outline: none;
    overflow: visible;
}

.lightbox-dialog::backdrop {
    background-color: rgba(17, 19, 23, 0.85);
    backdrop-filter: blur(8px);
}

.lightbox-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    border-radius: 8px;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    background-color: var(--primary);
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

/* Lightbox Captions */
.lightbox-caption {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 15px 25px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Lightbox Buttons */
.lightbox-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2.5em;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    z-index: 1010;
    transition: var(--transition);
}

.lightbox-close-btn:hover {
    color: var(--text-muted);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(26, 29, 32, 0.6);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-family: inherit;
    z-index: 1009;
    transition: var(--transition);
    user-select: none;
}

.lightbox-arrow:hover {
    background-color: var(--accent);
    color: var(--text-light);
}

.lightbox-arrow-left {
    left: -80px;
}

.lightbox-arrow-right {
    right: -80px;
}

/* Responsive Styles & Media Queries */

/* Tablet Screens (max-width: 992px) */
@media (max-width: 992px) {
    .header-1, .header-2 {
        display: none; /* Hide desktop double header */
    }
    
    .mobile-header-bar {
        display: block; /* Show mobile bar */
    }
    
    .mobile-menu-btn {
        display: block; /* Show hamburger button */
    }
    
    .full-width-block {
        display: flex;
        flex-direction: column;
    }
    
    .full-width-block .text-content {
        order: 1; /* Always display text first on mobile */
    }
    
    .full-width-block .half-content:not(.text-content) {
        order: 2; /* Always display image/form/map second on mobile */
    }
    
    .half-content {
        width: 100%;
    }
    
    .text-content {
        padding: 50px 30px;
    }
    
    .image-content {
        min-height: 350px;
    }
    
    .image-blocks {
        height: auto;
        flex-direction: column;
    }
    
    .image-blocks .block {
        flex: none;
        width: 100%;
        height: 250px;
    }
    
    .image-blocks .block:hover,
    .image-blocks .block:not(:hover) {
        flex: none;
    }
    
    .image-blocks .block .text {
        font-size: 1.35em;
        bottom: 25px;
        left: 25px;
    }
    
    .image-blocks .block:hover .text {
        font-size: 1.6em;
        transform: none;
    }
    
    .links-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.4em;
    }
    
    .lightbox-arrow-left {
        left: 10px;
        background-color: rgba(26, 29, 32, 0.85);
    }
    
    .lightbox-arrow-right {
        right: 10px;
        background-color: rgba(26, 29, 32, 0.85);
    }
    
    .lightbox-close-btn {
        top: 10px;
        right: 10px;
        background-color: rgba(26, 29, 32, 0.85);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8em;
    }
}

/* Smartphone Screens (max-width: 768px) */
@media (max-width: 768px) {
    .text-center-section p {
        font-size: 1.1em;
        line-height: 1.65;
    }
    
    .text-center-section p::before,
    .text-center-section p::after {
        display: none; /* Hide quotes to save space */
    }
    
    .styb-contact-form .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }
    
    .video-block .text {
        font-size: 2.2em;
    }
}

/* Extra Small Screens (max-width: 480px) */
@media (max-width: 480px) {
    .mobile-header-container {
        padding: 10px 20px;
    }
    
    .logo-title {
        font-size: 1.25em;
    }
    
    .logo-subtitle {
        font-size: 0.6em;
        letter-spacing: 0.15em;
    }
    
    .text-content h2 {
        font-size: 1.75em;
    }
}

/* ==========================================================================
   Premium Photo Hover Animations (Smooth Lift-Up + Thin Copper Frame Reveal)
   ========================================================================== */
.page-projekteerimine .image-content,
.page-projektijuhtimine .image-content,
.page-ekspertiis .image-content {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    z-index: 1;
}

.page-projekteerimine .image-content img,
.page-projektijuhtimine .image-content img,
.page-ekspertiis .image-content img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
    width: 100%;
}

.page-projekteerimine .image-content:hover,
.page-projektijuhtimine .image-content:hover,
.page-ekspertiis .image-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.page-projekteerimine .image-content:hover img,
.page-projektijuhtimine .image-content:hover img,
.page-ekspertiis .image-content:hover img {
    transform: scale(1.03);
}

/* Thin, delicate inner border/frame that reveals on hover (adopted from Ekspertiis layout) */
.page-projekteerimine .image-content::after,
.page-projektijuhtimine .image-content::after,
.page-ekspertiis .image-content::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 3;
}

.page-projekteerimine .image-content:hover::after,
.page-projektijuhtimine .image-content:hover::after,
.page-ekspertiis .image-content:hover::after {
    opacity: 0.75;
}

/* ==========================================================================
   Language & AI Mode Switcher in Header 2
   ========================================================================== */
.lang-divider {
    color: rgba(0, 0, 0, 0.15);
    font-size: 0.95em;
    user-select: none;
    margin: 0 4px;
}

.lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 5px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-item {
    font-size: 0.78em;
    font-weight: 700;
    color: var(--text-muted) !important;
    padding: 3px 9px;
    border-radius: 15px;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.lang-item:hover {
    color: var(--primary) !important;
}

.lang-item.active {
    background: var(--primary);
    color: #FFFFFF !important;
}

/* AI Mode Specific Badge and Glowing Dot */
.lang-item.lang-ai {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.lang-item.lang-ai .ai-dot {
    width: 6px;
    height: 6px;
    background-color: #10B981; /* Green glowing RAG/AI active indicator */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10B981;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Add support for AI switcher in mobile navigation drawer */
.mobile-nav-links .lang-selector-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-links .lang-selector-mobile span {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

/* ==========================================================================
   AI-Optimized Console Mode (ai.html)
   ========================================================================== */
.page-ai {
    background-color: #0A0C0E;
    color: #B1BCC9;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.page-ai .header-2-nav {
    display: flex;
    align-items: center;
}

.page-ai .lang-divider {
    color: rgba(255, 255, 255, 0.15);
}

.page-ai .lang-selector {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-ai .lang-item.active {
    background: #FFFFFF;
    color: #0A0C0E !important;
}

.ai-console-container {
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

/* Glowing Cyber Header */
.ai-console-header {
    background: #111419;
    border: 1px solid #1E232B;
    border-radius: 8px 8px 0 0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
}

.console-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.console-status-dot {
    width: 10px;
    height: 10px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
}

.console-title {
    font-weight: 700;
    color: #FFFFFF;
    font-size: 1.05em;
    letter-spacing: 0.05em;
}

/* Console Window Body */
.ai-console-body {
    background: #15181E;
    border: 1px solid #1E232B;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 35px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.ai-section {
    margin-bottom: 45px;
}

.ai-section:last-child {
    margin-bottom: 0;
}

.ai-section h3 {
    color: #FFFFFF;
    font-size: 1.15em;
    border-bottom: 1px solid #242B36;
    padding-bottom: 12px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-section h3::before {
    content: '>';
    color: var(--accent);
    font-weight: bold;
}

/* Data Tables */
.ai-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.ai-data-table th, .ai-data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #1E232B;
    font-size: 0.9em;
}

.ai-data-table th {
    color: #728090;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-data-table td strong {
    color: #FFFFFF;
}

/* Code Container for Schema and Markdown */
.code-container {
    position: relative;
    background: #0A0C0E;
    border: 1px solid #202732;
    border-radius: 6px;
    padding: 22px;
    margin-bottom: 25px;
    overflow-x: auto;
}

.code-container pre {
    margin: 0;
    color: #34D399; /* Cyber green */
    font-size: 0.88em;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1C212A;
    color: #B1BCC9;
    border: 1px solid #28303D;
    padding: 5px 12px;
    font-size: 0.78em;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

.copy-success {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border-color: #10B981 !important;
}

.ai-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-left: 8px;
}