/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #29b6ff;
    --text-dark: #1a1a1a;
    --text-gray: #555;
    --bg-light: #ffffff;
    --bg-section-gray: #EDEDED;
    --card-glass: rgba(255, 255, 255, 0.75);
    --surface: #ffffff;
    --surface-border: #ffffff;
    --nav-bg: #ffffff;
    --footer-bg: #003550;
    --footer-bottom-bg: #00243b;
    --mobile-panel-bg: rgba(255, 255, 255, 0.98);
    --mobile-panel-border: #eee;
    --burger-bg: #ffffff;
    --burger-bar: #111;
    --dropdown-bg: #ffffff;
    --cta-link-color: #003550;
    --subtitle-color: #2f2f2f;
    --hero-card-p: #444;
    --radial-color: #fff;
}

/* --- Dark Mode --- */
body.dark-mode {
    --primary-blue: #3dc2ff;
    --text-dark: #e8eaed;
    --text-gray: #a0a8b4;
    --bg-light: #121518; 
    --bg-section-gray: #1a1e24;
    --card-glass: rgba(26, 30, 36, 0.82);
    --surface: #1a1e24;
    --surface-border: #1a1e24;
    --nav-bg: #121518;
    --footer-bg: #0a1620;
    --footer-bottom-bg: #060e16;
    --mobile-panel-bg: rgba(22, 25, 29, 0.98);
    --mobile-panel-border: #2a2e34;
    --burger-bg: #16191d;
    --burger-bar: #e8eaed;
    --dropdown-bg: #121518;
    --cta-link-color: #3dc2ff;
    --subtitle-color: #a0a8b4;
    --hero-card-p: #bfc5cc;
    --radial-color: #121518;
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--text-gray);
    background: var(--surface);
    color: var(--text-dark);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* --- Notch Navigation --- */
header {
    position: fixed; /* Keep it locked at the top */
    top: 0;
    left: 0;
    right: 0;
    height: 20px;    /* This is the thickness of your top white border */
    background: var(--bg-light);    transition: background 0.3s;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

header::before, header::after {
    content: '';
    position: absolute;
    top: 20px; /* Sits exactly below the white top bar */
    width: 30px; /* Match the border-radius of your hero/sections */
    height: 30px;
}

header::before {
    left: 20px;
    background: radial-gradient(circle at 100% 100%, transparent 29px, var(--radial-color) 30px);
}

header::after {
    right: 20px;
    background: radial-gradient(circle at 0% 100%, transparent 29px, var(--radial-color) 30px);
}

nav {
    position: relative;
    background: var(--nav-bg);
    padding: 25px 60px 40px 60px;    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 50px;
    border-radius: 0 0 20px 20px; /* Bottom rounding of the notch */
    margin-top: 20px; /* Hangs down from the 20px header bar */
}

/* These create the INNER rounded corners (the fusion) */
nav::before, nav::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15px;        
    height: 15px;
}

nav::before {
    left: -15px;
    background: radial-gradient(circle at 0% 100%, transparent 14.5px, var(--radial-color) 15px);
}

nav::after {
    right: -15px;
    background: radial-gradient(circle at 100% 100%, transparent 14.5px, var(--radial-color) 15px);
}
.mobile-menu-button {
    display: none;
}

.mobile-menu-panel {
    display: none;
}

.mobile-menu-backdrop {
    display: none;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 25px 10px;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-image {
    display: block;
    width: 74px;
    max-width: 100%;
    padding: 10px;
}

.more-dropdown {
    position: relative;
    list-style: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 25px 10px;
}

.more-dropdown .dropdown_menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%); /* Centers the menu under the link */
    width: 170px;
    background: var(--dropdown-bg);
    border-radius: 12px 12px 20px 20px;
    padding: 10px 0;
    display: none; /* Hidden by default */
    perspective: 1000px;
    z-index: 1000;
}

/* 2. Show on Hover */
.more-dropdown:hover .dropdown_menu {
    display: block;
}

.more-dropdown:hover .dropdown_menu li {
    animation: scaleZ 300ms forwards;
}

/* 3. Individual Item Styling */
.more-dropdown .dropdown_menu li {
    list-style: none;
    opacity: 0;
    transform-origin: top center;
}

.more-dropdown .dropdown_menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 1.2rem;
    font-weight: 500;
}

.more-dropdown .dropdown_menu li a:hover {
    color: var(--primary-blue);
}

/* 4. The Staggered Delays (The "Each Item" part) */
.more-dropdown .dropdown_menu li:nth-child(1) { animation-delay: 60ms; }
.more-dropdown .dropdown_menu li:nth-child(2) { animation-delay: 120ms; }
.more-dropdown .dropdown_menu li:nth-child(3) { animation-delay: 180ms; }
.more-dropdown .dropdown_menu li:nth-child(4) { animation-delay: 240ms; }

@keyframes scaleZ {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    transform: scale(1.07);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Hero Section --- */
.hero {
    /* Change 30px (15+15) to 50px (25+25) */
    height: calc(100vh - 40px); 
    min-height: 600px;
    background: url('resources/img1.png') no-repeat center center/cover;
    /* Change from 15px to 25px */
    margin: 20px; 
    border-radius: 30px;    
    border-left-width: 2px;
    border-right-width: 2px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-left: 8%;
    position: relative;
    overflow: hidden;
}

/* The Frosted Glass Card */
.hero-card {
    background: var(--card-glass);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    width: 100%;
    max-width: 480px;
    padding: 40px 30px;
    border-radius: 35px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.hero-card .logo-container img{
    width: 90%;
}


.hero-card p {
    font-size: 1.6rem;
    color: var(--hero-card-p);
    margin: 50px 0;
    padding: 0 10px;
    font-weight: 500;
}

.hero-card p strong{
    font-weight: 700;
}

.cta-button {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    padding: 20px 45px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.6rem;
    transition: transform 0.2s, background 0.2s;
}

.cta-button:hover {
    background: #1fa3e6;
    transform: translateY(-2px);
}

/* --- About Us Section --- */
.about-us {
    min-height: max(600px, calc(100vh - 40px));
    margin: 20px;   
    border-radius: 30px;
    border-left-width: 2px;
    border-right-width: 2px;
    padding: clamp(56px, 6vw, 96px) clamp(40px, 10vw, 180px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(44px, 6vw, 150px);
    position: relative;
    overflow: hidden;
    background-color: var(--bg-light);
    transition: background-color 0.3s;
}

.about-us h2 {
    text-align: center;
    font-size: clamp(2.6rem, 4.2vw, 4rem);
    font-weight: 800;
    margin-bottom: clamp(24px, 3.5vw, 60px);
}

.about-container {
    display: flex;
    gap: clamp(48px, 9vw, 200px);
    justify-content: center;
    align-items: center;
    max-width: 2000px;
    width: 100%;
    margin: 0 auto;
}

.about-text {
    flex: 0 1 56%;
    min-width: 0;
}

.info-row {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
}

.info-row p {
    font-size: clamp(1rem, 1.35vw, 1.4rem);
    font-weight: 500;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Gear Icon CSS */
.icon-gear {
    width: 24px;
    height: 24px;
    background: var(--primary-blue);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5A3.5 3.5 0 0 1 15.5 12A3.5 3.5 0 0 1 12 15.5M19.4 13c0-.3 0-.6-.1-.9l2.1-1.6c.2-.2.2-.4.1-.6l-2-3.5c-.1-.2-.4-.2-.6-.2l-2.5 1c-.5-.4-1.1-.7-1.7-1l-.4-2.6c0-.2-.2-.4-.5-.4h-4c-.3 0-.5.2-.5.4l-.4 2.6c-.6.3-1.2.6-1.7 1l-2.5-1c-.2-.1-.5 0-.6.2l-2 3.5c-.1.2-.1.4.1.6l2.1 1.6c0 .3-.1.6-.1.9s0 .6.1.9l-2.1 1.6c-.2.2-.2.4-.1.6l2 3.5c.1.2.4.2.6.2l2.5-1c.5.4 1.1.7 1.7 1l.4 2.6c0 .2.2.4.5.4h4c.3 0 .5-.2.5-.4l.4-2.6c.6-.3 1.2-.6 1.7-1l2.5 1c.2.1.5 0 .6-.2l2-3.5c.1-.2.1-.4-.1-.6l-2.1-1.6c0-.3.1-.6.1-.9Z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5A3.5 3.5 0 0 1 15.5 12A3.5 3.5 0 0 1 12 15.5M19.4 13c0-.3 0-.6-.1-.9l2.1-1.6c.2-.2.2-.4.1-.6l-2-3.5c-.1-.2-.4-.2-.6-.2l-2.5 1c-.5-.4-1.1-.7-1.7-1l-.4-2.6c0-.2-.2-.4-.5-.4h-4c-.3 0-.5.2-.5.4l-.4 2.6c-.6.3-1.2.6-1.7 1l-2.5-1c-.2-.1-.5 0-.6.2l-2 3.5c-.1.2-.1.4.1.6l2.1 1.6c0 .3-.1.6-.1.9s0 .6.1.9l-2.1 1.6c-.2.2-.2.4-.1.6l2 3.5c.1.2.4.2.6.2l2.5-1c.5.4 1.1.7 1.7 1l.4 2.6c0 .2.2.4.5.4h4c.3 0 .5-.2.5-.4l-.4-2.6c.6-.3 1.2-.6 1.7-1l2.5 1c.2.1.5 0 .6-.2l2-3.5c.1-.2.1-.4-.1-.6l-2.1-1.6c0-.3.1-.6.1-.9Z'/%3E%3C/svg%3E") no-repeat center;
    flex-shrink: 0;
}

.about-image{
    flex: 0 1 44%;
    max-width: 620px;
}

.about-image img {  
    width: 100%;
    height: auto;
    display: block;
}

/* --- Services Section --- */
.services {
    margin: 20px;
    border-radius: 30px;
    background: var(--bg-section-gray);
    padding: clamp(56px, 6vw, 96px) clamp(34px, 7vw, 92px);
    overflow: hidden;
}

.services h2 {
    text-align: center;
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 800;
    margin-bottom: clamp(42px, 5.5vw, 90px);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: clamp(42px, 6vw, 88px);
}

.service-item {
    display: flex;
    align-items: center;
    justify-content:    center;
    gap: clamp(30px, 4.8vw, 74px);
}

.service-text {
    flex: 0 1 56%;
    min-width: 0;
}

.service-item.is-reverse {
    flex-direction: row-reverse;
}

.service-item.is-reverse .service-text {
    text-align: right;
}

.service-item.is-reverse .service-text p {
    margin-left: auto;
}

.service-text h3 {
    font-size: clamp(1.6rem, 2.3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.service-text p {
    font-size: clamp(1rem, 1.16vw, 1.28rem);
    line-height: 1.65;
    color: var(--text-gray);
    max-width: 62ch;
}

.service-image {
    flex: 0 1 44%;
    min-width: 280px;
    width: 100%;
    max-width: 560px;
}

.service-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Recent Projects Section --- */
.recent-projects {
    margin: 20px;
    border-radius: 30px;
    padding: clamp(56px, 6vw, 96px) clamp(24px, 3vw, 36px);
    overflow: hidden;
}

.recent-projects h2 {
    text-align: center;
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.recent-projects-subtitle {
    text-align: center;
    color: var(--subtitle-color);
    font-size: clamp(1.05rem, 1.35vw, 1.6rem);
    margin-bottom: clamp(26px, 3.2vw, 42px);
}

.recent-projects-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: -8px 0 clamp(24px, 3vw, 34px);
    flex-wrap: wrap;
}

.recent-projects-cta-link {
    color: var(--cta-link-color);
    text-decoration: none;
    font-size: clamp(1rem, 1.15vw, 1.28rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.recent-projects-cta-link:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.recent-projects-cta-separator {
    color: #78838c;
    font-size: 1rem;
    font-weight: 700;
}

.recent-carousel-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-carousel-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.recent-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.recent-carousel-track {
    --cards-per-view: 4;
    --carousel-gap: 4px;
    display: grid;
    grid-auto-flow: column;
    gap: var(--carousel-gap);
    grid-auto-columns: calc((100% - (var(--cards-per-view) - 1) * var(--carousel-gap)) / var(--cards-per-view));
}

.recent-project-card {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #cfd6dc;
    overflow: hidden;
    text-decoration: none;
}

.recent-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.28s ease;
}

.recent-project-card:hover img {
    transform: scale(1.04);
}

.recent-project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(9, 13, 18, 0.78) 0%,
        rgba(9, 13, 18, 0.68) 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 1.8vw, 22px);
    pointer-events: none;
    backdrop-filter: blur(1px);
}

.recent-project-overlay-text {
    margin: 0;
    color: #fff;
    font-size: clamp(0.92rem, 0.95vw, 1.35rem);
    font-weight: 500;
    line-height: 1.28;
    letter-spacing: 0.01em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
    max-width: 92%;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-project-card:hover .recent-project-overlay,
.recent-project-card:focus-visible .recent-project-overlay {
    opacity: 1;
}

.recent-carousel-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(18, 22, 28, 0.92);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.recent-carousel-button:hover {
    background: rgba(8, 10, 14, 0.96);
    transform: translateY(-1px);
}

.recent-carousel-button:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.recent-carousel-status {
    text-align: center;
    color: var(--text-gray);
    margin-top: 16px;
    font-size: 0.95rem;
}

/* --- For Sale Page --- */
.forsale-hero {
    position: relative;
    margin: 20px;
    border-radius: 30px;
    overflow: hidden;
    background: url('resources/img1.png') no-repeat center center/cover;
    padding: clamp(100px, 12vw, 160px) clamp(40px, 6vw, 100px) clamp(60px, 8vw, 100px);
    display: flex;
    align-items: center;
    min-height: 380px;
}

.forsale-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 30, 0.72);
    z-index: 1;
}

.forsale-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: clamp(40px, 6vw, 100px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    color: #fff;
}

.forsale-hero-left {
    flex: 0 1 50%;
}

.forsale-hero-left h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 800;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.1;
}

.forsale-hero-left p {
    font-size: clamp(1rem, 1.3vw, 1.35rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.forsale-hero-right {
    flex: 0 1 50%;
}

.forsale-hero-divider {
    width: 2px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.forsale-hero-right ul {
    list-style: disc;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;   
}

.forsale-hero-right ul li {
    font-size: clamp(1rem, 1.25vw, 1.3rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* For Sale Items */
.forsale-items {
    margin: 20px;
    padding: clamp(40px, 5vw, 80px) clamp(30px, 5vw, 80px);
    display: flex;
    flex-direction: column;
    gap: clamp(50px, 6vw, 100px);
}

.forsale-card {
    display: flex;
    align-items: center;
    gap: clamp(30px, 5vw, 80px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.forsale-card.is-reverse {
    flex-direction: row-reverse;
}

.forsale-card-image {
    flex: 0 1 45%;
    max-width: 550px;
    border-radius: 20px;
    overflow: hidden;
}

.forsale-card-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.forsale-card-text {
    flex: 0 1 55%;
    text-align: center;
}

.forsale-card.is-reverse .forsale-card-text {
    text-align: center;
}

.forsale-card-text h2 {
    font-size: clamp(1.6rem, 2.3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.forsale-card-text .forsale-price {
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.forsale-card-text p {
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    color: var(--text-gray);
    line-height: 1.65;
    margin-bottom: 14px;
    max-width: 52ch;
    margin-left: auto;
    margin-right: auto;
}

.forsale-loading {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    padding: 40px 0;
}

/* --- Contact Page --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-page-main {
    position: relative;
    margin: 20px;
    border-radius: 30px;
    border-left-width: 2px;
    border-right-width: 2px;
    overflow: hidden;
    min-height: calc(100vh - 40px);
    padding: clamp(90px, 7vw, 120px) clamp(20px, 3vw, 34px) clamp(24px, 3vw, 40px);
    background: url('resources/desktop_contact_collage.png') no-repeat center center / cover;
    display: flex;
}

.contact-page-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 15, 0.3);
    pointer-events: none;
}

.contact-page-layout {
    position: relative;
    z-index: 1;
    width: min(1400px, 100%);
    margin: 0 auto;
    display: flex;
    gap: clamp(112px, 15.2vw, 224px);
    align-items: center;
    justify-content: space-around;
}

.contact-page-card {
    background: rgba(237, 237, 237, 0.78);
    border-radius: clamp(22px, 2.2vw, 30px);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.17);
}

.contact-page-info {
    flex: 0 1 390px;
    min-width: 280px;
    padding: clamp(26px, 3.8vw, 44px) clamp(22px, 3.5vw, 38px);
}

.contact-page-info h1 {
    margin: 0 0 clamp(18px, 2.5vw, 34px);
    text-align: center;
    color: #0f1114;
    font-size: clamp(1.8rem, 1.9vw, 2.5rem);
    font-weight: 800;
    white-space: nowrap;
}

.contact-page-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.3vw, 14px);
}

.contact-page-row {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.3vw, 18px);
    color: #1b1e21;
    text-decoration: none;
    font-size: clamp(1rem, 1.3vw, 1.4rem);
    font-weight: 500;
    line-height: 1.2;
}

.contact-page-row:hover span:last-child {
    text-decoration: underline;
}

.contact-page-icon {
    width: clamp(26px, 1.9vw, 34px);
    height: clamp(26px, 1.9vw, 34px);
    flex-shrink: 0;
    filter: brightness(0);
}

.contact-page-instagram-icon {
    width: clamp(24px, 1.9vw, 32px);
    height: clamp(24px, 1.9vw, 32px);
    border-radius: 9px;
    border: 2.5px solid #111;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.contact-page-instagram-icon::before {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2.5px solid #111;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contact-page-instagram-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #111;
    top: 5px;
    right: 5px;
}

.contact-page-form-wrap {
    flex: 1 1 0;
    min-width: 0;
    padding: clamp(18px, 2.4vw, 30px) clamp(16px, 2.8vw, 34px) clamp(18px, 2.8vw, 32px);
}

.contact-page-form-wrap h2 {
    margin: 0 0 clamp(12px, 1.4vw, 20px);
    text-align: center;
    color: #0f1114;
    font-size: clamp(1.8rem, 2.1vw, 3rem);
    font-weight: 800;
}

.contact-page-form {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
}

.contact-page-form input,
.contact-page-form textarea {
    width: 100%;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #202327;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.95rem, 1.3vw, 1.6rem);
    font-weight: 500;
    line-height: 1.2;
    padding: clamp(10px, 1vw, 14px) clamp(12px, 1.4vw, 20px);
    outline: none;
}

.contact-page-form input::placeholder,
.contact-page-form textarea::placeholder {
    color: rgba(33, 37, 41, 0.6);
}

.contact-page-form input:focus,
.contact-page-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(41, 182, 255, 0.35);
}

.contact-page-form textarea {
    resize: vertical;
    min-height: clamp(100px, 12vw, 160px);
}

.contact-page-send {
    align-self: center;
    margin-top: clamp(6px, 1vw, 14px);
    border: none;
    border-radius: 14px;
    min-width: clamp(140px, 20%, 200px);
    padding: clamp(8px, 1vw, 14px) clamp(22px, 2.8vw, 40px);
    background: rgba(255, 255, 255, 0.95);
    color: #15191d;
    font-size: clamp(1.4rem, 2vw, 2.4rem);
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-page-send:hover {
    transform: translateY(-1px);
    background: #ffffff;
}

body.dark-mode .contact-page-overlay {
    background: rgba(0, 0, 0, 0.52);
}

body.dark-mode .contact-page-card {
    background: rgba(24, 28, 33, 0.78);
}

body.dark-mode .contact-page-info h1,
body.dark-mode .contact-page-form-wrap h2,
body.dark-mode .contact-page-row {
    color: var(--text-dark);
}

body.dark-mode .contact-page-icon {
    filter: none;
}

body.dark-mode .contact-page-instagram-icon {
    border-color: var(--text-dark);
}

body.dark-mode .contact-page-instagram-icon::before {
    border-color: var(--text-dark);
}

body.dark-mode .contact-page-instagram-icon::after {
    background: var(--text-dark);
}

body.dark-mode .contact-page-form input,
body.dark-mode .contact-page-form textarea {
    background: rgba(232, 234, 237, 0.16);
    color: var(--text-dark);
}

body.dark-mode .contact-page-form input::placeholder,
body.dark-mode .contact-page-form textarea::placeholder {
    color: rgba(232, 234, 237, 0.72);
}

body.dark-mode .contact-page-send {
    background: rgba(232, 234, 237, 0.22);
    color: var(--text-dark);
}

body.dark-mode .contact-page-send:hover {
    background: rgba(232, 234, 237, 0.32);
}

body.dark-mode .smoothing {
    background: radial-gradient(circle at 100% 100%, transparent 29px, var(--bg-light) 30px);
}

/* --- Rates / Terms Section --- */
.rates-terms {
    margin: 20px;
    border-radius: 30px;
    background: var(--bg-section-gray);
    transition: background-color 0.3s;
    padding: clamp(56px, 6vw, 96px) clamp(40px, 10vw, 180px);
    overflow: hidden;
}

.rates-terms h2 {
    text-align: center;
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 800;
    margin-bottom: clamp(40px, 5vw, 70px);
}

.rates-block {
    max-width: 900px;
    margin: 0 auto clamp(40px, 5vw, 60px);
    text-align: center;
}

.rates-block:last-child {
    margin-bottom: 0;
}

.rates-block h3 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.rates-block p {
    font-size: clamp(0.95rem, 1.15vw, 1.15rem);
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 16px;
}

.rates-block p:last-child {
    margin-bottom: 0;
}

/* --- Footer --- */
.site-footer {
    margin-top: 20px;
}

.footer-main {
    background: var(--footer-bg);
    transition: background 0.3s;
    color: #f3f8fd;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1.2fr;
    align-items: center;
    gap: clamp(30px, 4vw, 64px);
    padding: clamp(50px, 6vw, 74px) clamp(24px, 5.2vw, 84px);
}

.footer-main .footer-col + .footer-col {
    border-left: 2px solid rgba(255, 255, 255, 0.88);
    padding-left: clamp(28px, 4vw, 64px);
}

.footer-main > .footer-col.footer-contact {
    padding-left: 0;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    width: clamp(210px, 23vw, 360px);
    max-width: 100%;
    display: block;
    margin: 0 auto 18px;
}

.footer-brand p {
    margin: 0 auto;
    max-width: 430px;
    font-size: clamp(1rem, 1.35vw, 1.65rem);
    line-height: 1.32;
}

.footer-links {
    text-align: center;
}

.footer-links h3 {
    margin: 0 0 14px;
    font-size: clamp(1.45rem, 2vw, 2.4rem);
    font-weight: 700;
}

.footer-links a {
    display: block;
    color: #f3f8fd;
    text-decoration: none;
    font-size: clamp(1rem, 1.3vw, 1.4rem);
    line-height: 1.3;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-left: 0;
}

.footer-contact-row {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #f3f8fd;
    text-decoration: none;
    font-size: clamp(1rem, 1.25vw, 1.4rem);
    line-height: 1.2;
}

.footer-contact-row:hover span {
    text-decoration: underline;
}

.footer-contact-row img {
    width: clamp(30px, 2.1vw, 42px);
    height: clamp(30px, 2.1vw, 42px);
    flex-shrink: 0;
}

.contact-items-wrapper{
    width: fit-content;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-bottom {
    background: var(--footer-bottom-bg);
    transition: background 0.3s;
    color: #a5b5c1;
    display: flex;
    justify-content: center;
    gap: clamp(28px, 7vw, 110px);
    padding: 14px 14px;
    font-size: clamp(1.4rem, 2.2vw, 1.4rem);
    font-weight: 700;
}

.footer-bottom p {
    margin: 0;
}

/* --- Responsiveness --- */
@media (max-width: 1200px) {
    .about-us {
        min-height: 0;
        padding: 64px 7%;
    }

    .about-container {
        gap: clamp(36px, 5vw, 72px);
    }

    .about-image {
        flex-basis: 43%;
        max-width: 500px;
    }

    .services {
        padding: 64px 7%;
    }

    .service-item {
        gap: clamp(24px, 3.8vw, 52px);
    }

    .service-image {
        flex-basis: 42%;
        min-width: 260px;
    }

    .recent-carousel-track {
        --cards-per-view: 3;
    }

    .contact-page-info {
        flex-basis: 350px;
        min-width: 260px;
    }

    .contact-page-main {
        padding-top: clamp(126px, 11vw, 154px);
    }

    .footer-main {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .footer-main .footer-col + .footer-col {
        padding-left: 30px;
    }

    .footer-main > .footer-col.footer-contact {
        padding-left: 0;
    }

}

@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
        gap: 44px;
        align-items: stretch;
    }

    .about-text,
    .about-image {
        width: 100%;
    }

    .about-image {
        max-width: 420px;
        margin: 0 auto;
    }

    .about-us {
        height: auto;
        min-height: 0;
        padding: 72px 8%;
        gap: 56px;
    }

    .about-us h2 {
        margin-bottom: 0;
        font-size: clamp(2.4rem, 6.5vw, 3.4rem);
    }

    .services {
        padding: 64px 8%;
    }

    .service-item,
    .service-item.is-reverse {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .service-item .service-text,
    .service-item.is-reverse .service-text {
        order: 1;
        text-align: left;
    }

    .service-item .service-text p,
    .service-item.is-reverse .service-text p {
        margin-left: 0;
    }

    .service-item .service-image,
    .service-item.is-reverse .service-image {
        order: 2;
        align-self: center;
    }

    .service-image {
        min-width: 0;
        max-width: 520px;
    }

    .recent-projects {
        padding: 64px 20px;
    }

    .recent-carousel-track {
        --cards-per-view: 2;
    }

    .contact-page-main {
        padding: 128px 5% 56px;
    }

    .contact-page-layout {
        flex-direction: column;
        align-items: stretch;
        max-width: 760px;
        gap: 24px;
    }

    .contact-page-info,
    .contact-page-form-wrap {
        width: 100%;
    }

    /* For Sale - 900px */
    .forsale-hero-content {
        flex-direction: column;
        gap: 24px;
    }

    .forsale-hero-divider {
        width: 100%;
        height: 2px;
        align-self: auto;
    }

    .forsale-hero-left,
    .forsale-hero-right {
        flex-basis: 100%;
    }

    .forsale-card,
    .forsale-card.is-reverse {
        flex-direction: column;
        text-align: center;
    }

    .forsale-card-image {
        max-width: 480px;
        align-self: center;
    }

    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-links {
        display: none;
    }

    .footer-main .footer-col + .footer-col {
        border-left: 0;
        border-top: 2px solid rgba(255, 255, 255, 0.72);
        padding-left: 0;
        padding-top: 24px;
    }

    .footer-contact {
        align-items: flex-start;
        width: max-content;
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-contact-row {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .footer-bottom {
        font-size: clamp(1.1rem, 4.4vw, 1.7rem);
        gap: 26px;
    }
    
    .hero {
        padding-left: 0;
        justify-content: center;
    }

    .hero-card {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    /* --- 1. Global & Body Setup --- */
    body {
        background: var(--bg-light);
        overflow-x: hidden;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: calc(12px + env(safe-area-inset-top, 0px));
        background: var(--bg-light);
        z-index: 100;
        pointer-events: none;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }
    
    /* --- 2. The Fixed Top Frame --- */
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 0; /* Keep it at 0 so it doesn't block clicks */
        z-index: 220; /* Ensure this is HIGHER than .mobile-menu-backdrop (200) */
        background: none;
        display: block;
    }
    header::before{
        content: ''; /* Ensure content is set */
        position: fixed;
        top: calc(12px + env(safe-area-inset-top, 0px)); 
        width: 30px; 
        height: 30px;
        left: 12px;
        background: radial-gradient(circle at 100% 100%, transparent 29px, var(--radial-color) 30px);
        /* Match or exceed the header's z-index to stay above backdrop */
        z-index: 0;
        display: block;
    }

    header::after{
        display: none;
    }

    nav {
        width: 100%;
        background: transparent;
        padding: 0;
        display: flex;
        justify-content: center;
        position: relative;
        margin-top:12px;
    }

    .nav-links {
        display: none;
    }

    /* --- 3. The Fused Center Logo --- */
    .header-logo {
        display: none;
    }

    .nav-logo-image {
        width: 110px;
    }

    /* Fusion curves for Logo: Creates the inverted rounding where it meets the bar */
    .header-logo::before, 
    .header-logo::after {
        content: '';
        position: absolute;
        top: 0;
        width: 20px;
        height: 20px;
        pointer-events: none;
        z-index: 220; /* MATCH the logo z-index exactly */
    }

    .header-logo::before {
        left: -20px;
        /* Use var to match the logo and the top bar */
        background: radial-gradient(circle at 0% 100%, transparent 19px, var(--radial-color) 20px);
    }

    .header-logo::after {
        right: -20px;
        background: radial-gradient(circle at 100% 100%, transparent 19px, var(--radial-color) 20px);
    }

    .smiley-logo.small {
        width: 52px;
        height: 24px;
        border-bottom-width: 4px;
    }

    .smiley-logo.small::before, .smiley-logo.small::after {
        width: 13px;
        height: 13px;
        top: -8px;
        border-width: 3px;
    }

    /* --- 4. The Fused Burger Menu --- */
    .mobile-menu-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 9px;
        position: fixed;
        right: 12px; 
        top: 0;
        width: 104px;
        height: calc(92px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        background: var(--bg-light);
        border: none;
        border-radius: 0 0 0px 24px;
        /*box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);*/
        cursor: pointer;
        z-index: 220;
    }

    /* Fusion curve for Burger: Only left side needed */
    .mobile-menu-button::before {
        content: '';
        position: absolute;
        top: calc(12px + env(safe-area-inset-top, 0px));
        left: -20px;
        width: 20px;
        height: 20px;
        background: radial-gradient(circle at 0% 100%, transparent 19px, var(--bg-light) 20px);
    }

    .mobile-menu-button::after {
        content: '';
        position: absolute;
        bottom: -20px;
        right: 0px;
        width: 20px;
        height: 20px;
        background: radial-gradient(circle at 0% 100%, transparent 19px, var(--bg-light) 20px);
    }


    .mobile-menu-button span {
        width: 44px;
        height: 6px;
        border-radius: 3px;
        background: var(--burger-bar);
        transition: transform 0.2s ease, opacity 0.2s ease;
        z-index: 221;
    }

    /* --- 5. Hero Section (Unified Frame Fix) --- */
    .hero {
        /* Remove top margin/rounding to let it sit flush against the fixed header */
        margin: 0 12px 12px 12px; 
        border-radius: 0 0 30px 30px; 
        height: calc(100vh - 12px);
        min-height: 700px;
        padding: 0 10px 42px;
        display: flex;
        justify-content: center;
        align-items: center ;
        position: relative;
    }

    .hero-card {
        max-width: 440px;
        width: calc(100% - 24px);
        margin: 0 12px;
        margin-top: 20%;   
        padding: 38px 22px 34px;
        border-radius: 30px;
        background: var(--card-glass);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .mobile-menu-panel.is-open {
        transform: translateX(0);
    }

    .smoothing{
        content: ''; /* Ensure content is set */
        position: fixed;
        top: 12px; 
        width: 30px; 
        height: 30px;
        left: 12px;
        background: radial-gradient(circle at 100% 100%, transparent 29px,#95989b 30px);
        /* Match or exceed the header's z-index to stay above backdrop */
        z-index: 0;
        z-index: 200;
    }

    header.menu-active::before {
        opacity: 0;     
        transition: opacity 0.25s ease;
    }

    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 26, 33, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 200;
    }

    .mobile-menu-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }


    .mobile-menu-button[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(15px) rotate(45deg);
    }
    .mobile-menu-button[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-button[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-15px) rotate(-45deg);
    }

    /* UI Font Sizes */
    .logo-container h1 { font-size: clamp(2rem, 9.5vw, 3rem); }
    .blue-text { font-size: clamp(2rem, 8.5vw, 2.6rem); }
    .hero-card p {         font-size: clamp(1rem, 5vw, 1.5rem); }
    .cta-button { font-size: clamp(1.15rem, 4.8vw, 1.8rem); border-radius: 20px; }

    /* About Section */
    .about-us {
        height: auto;
        min-height: 0;
        padding: 80px 30px;
        margin: 12px;
        border: 3px solid var(--surface-border);
        border-radius: 30px;
        gap: 34px;
    }

    .about-us h2 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .about-container {
        gap: 30px;
    }

    .about-image {
        max-width: 300px;
    }

    .services {
        margin: 12px;
        border-radius: 30px;
        padding: 56px 22px;
    }

    .services h2 {
        font-size: clamp(2rem, 9vw, 2.8rem);
        margin-bottom: 34px;
    }

    .services-list {
        gap: 42px;
    }

    .service-item {
        gap: 16px;
    }

    .service-text h3 {
        font-size: clamp(1.35rem, 6.3vw, 1.75rem);
        margin-bottom: 10px;
    }

    .service-text p {
        font-size: 1.02rem;
        line-height: 1.6;
    }

    .recent-projects {
        margin: 12px;
        border-radius: 30px;
        padding: 56px 14px;
    }

    .recent-projects h2 {
        font-size: clamp(2rem, 9vw, 2.8rem);
        margin-bottom: 12px;
    }

    .recent-projects-subtitle {
        font-size: 1rem;
        margin-bottom: 22px;
    }

    .recent-projects-cta {
        margin: -2px 0 18px;
        gap: 8px;
        flex-direction: column;
    }

    .recent-projects-cta-link {
        font-size: 1rem;
    }

    .recent-projects-cta-separator {
        display: none;
    }

    .recent-carousel-shell {
        gap: 6px;
    }

    .recent-carousel-track {
        --cards-per-view: 1;
        --carousel-gap: 6px;
    }

    .recent-carousel-button {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .recent-project-overlay-text {
        font-size: clamp(1rem, 3.8vw, 1.45rem);
        -webkit-line-clamp: 9;
        max-width: 88%;
    }

    .contact-page-main {
        margin: 0 12px 12px 12px;
        border-radius: 0 0 30px 30px;
        border-width: 3px;
        min-height: 0;
        padding: 118px 14px 38px;
        background-image: url('resources/phone_contact_collage.png');
        background-position: center top;
    }

    .contact-page-layout {
        gap: 18px;
    }

    .contact-page-card {
        border-radius: 24px;
    }

    .contact-page-info {
        padding: 28px 18px;
    }

    .contact-page-form-wrap {
        padding: 24px 16px 30px;
    }

    .contact-page-row {
        font-size: 1.06rem;
    }

    .contact-page-form input,
    .contact-page-form textarea {
        font-size: 1.02rem;
        padding: 12px 12px;
    }

    .contact-page-form textarea {
        min-height: 180px;
    }

    .contact-page-send {
        min-width: 160px;
        border-radius: 14px;
        font-size: 2rem;
    }

    .site-footer {
        margin-top: 12px;
    }

    /* Rates / Terms - 768px */
    .rates-terms {
        margin: 12px;
        padding: 56px 20px;
    }

    .rates-terms h2 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    /* For Sale - 768px */
    .forsale-hero {
        margin: 0 12px 12px 12px;
        border-radius: 0 0 30px 30px;
        padding: 120px 20px 40px;
        min-height: 0;
    }

    .forsale-hero-content {
        flex-direction: column;
        gap: 20px;
    }

    .forsale-hero-left h1 {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    .forsale-items {
        margin: 12px;
        padding: 40px 16px;
        gap: 50px;
    }

    .forsale-card,
    .forsale-card.is-reverse {
        flex-direction: column;
    }

    .forsale-card-image {
        max-width: 400px;
        align-self: center;
    }

    .footer-links {
        display: none;
    }

    .footer-main {
        padding: 42px 16px;
    }

    .footer-contact {
        align-items: flex-start;
        width: max-content;
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-contact-row {
        font-size: 1.02rem;
        gap: 12px;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .footer-contact-row img {
        width: 26px;
        height: 26px;
    }

    .footer-bottom {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 14px;
        font-size: clamp(0.95rem, 3.8vw, 1.18rem);
        text-align: center;
    }

    .footer-bottom p {
        white-space: nowrap;
    }

    .info-row {
        gap: 14px;
        margin-bottom: 24px;
        align-items: flex-start;
    }

    .info-row p {
        font-size: 1.05rem;
        line-height: 1.65;
    }

    .icon-gear {
        width: 20px;
        height: 20px;
    }

    .mobile-menu-panel {
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers everything horizontally */
    gap: 10px;
    position: fixed;
    top: 0;
    right: 0;
    width: min(76vw, 390px);
    height: 100vh;
    padding: 124px 16px 40px; /* Added some bottom padding */
    border-radius: 26px 0 0 26px;
    background: var(--bg-light);
    transform: translateX(103%);
    transition: transform 0.28s ease;
    z-index: 205;
}

/* Ensure the links span the width or stay centered */
.mobile-menu-panel a {
    width: 100%;
    text-align: center; /* Centers the link text */
    display: block;
    padding: 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--mobile-panel-border);
}

.mobile-menu-logo {
    /* Remove absolute positioning */
    position: relative; 
    bottom: auto;
    left: auto;
    
    /* Pushes the logo to the bottom of the flex container */
    margin-top: auto; 
    
    /* Centers the image inside this div */
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
}

.mobile-menu-logo img {
    width: 120px; /* Adjusted slightly for mobile aesthetics */
    height: auto;
    display: block;
}

}
