/* RESET AND BASE STYLES */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: black;
    --accent-color: black;
    --text-color: white;
    --light-color: white;
    --medium-color: black;
    --dark-color: white;
    --transition-slow: 0.5s ease;
    --transition-fast: 0.3s ease;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

/* Critical CSS - Above the fold styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--ff-body);
    background-color: var(--primary-color);
    color: var(--prmimary-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 1;
}

/* Optimize animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Optimize transitions */
.transition {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

.site-header { 
    display: grid; 
    grid-template-columns: 1fr auto 1fr; 
    align-items: center; 
    padding: 15px 30px; 
    
    position: fixed; 
    width: 100%; 
    top: 0; 
    left: 0; 
    background-color: #000000; /* Changed from rgba(0, 0, 0, 0.8) to solid black */
    z-index: 1000; 
}
.main-nav ul { 
    display: flex; 
    align-items: center; 
}
.main-nav.left-nav ul { 
    justify-content: flex-start; 
}
.main-nav.right-nav ul { 
    justify-content: flex-end; 
}
.main-nav li { 
    margin: 0 10px; 
}
.main-nav a { 
    font-size: 0.9em; 
    letter-spacing: 1px; 
    transition: color 0.3s ease; 
    white-space: nowrap; /* Prevent text wrapping */
    font-family: sans-serif;
}
.main-nav a:hover { 
    color: #cccccc; 
}
.main-nav a.active { 
    font-weight: bold; 
    color: #dddddd; 
}
.site-logo { 
    grid-column: 2 / 3; 
    text-align: center; 
    font-weight: bold; 
    font-size: 1.5em; 
}
.site-logo img {
    max-width: 100%;
    height: auto;
}
.site-logo a { 
    color: #ffffff; 
}

/*body.loaded {
    opacity: 1;
}*/



.hero {
    height: 100vh;
    background-color: #000000; /* Changed overlay to white */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--primary-color);  /* This is already black */
    position: relative;

    
}

.hero-content {
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-content h1 {
    margin-bottom: var(--space-md);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);  /* Changed from --primary-color */
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);  /* Changed to white */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.4s;
    visibility: hidden;
    
}

/*.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}*/
/* Page Container */
.page-container {
    position: relative; /* Context for absolute positioning */
    height: 100vh;
    width: 100%;
}

/* Full Page Section Base Styling - Updated for Overlay */
.full-page-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Use viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 20px 20px; /* Restore padding for header */
    /* Default transition for sections that might move */
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

/* Lifestyle Section (Base Layer) */
#lifestyle {
    background-color: #000; /* Ensure it has a background */
    z-index: 1; /* Lower layer */
    /* It stays visible, no transform needed initially */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-in-out;
    font-family: 'Montserrat';
}

/* Design Section (Overlay Layer) */
#design {
    background-color: #000; /* Ensure it has a background */
    z-index: 2; /* Higher layer */
    transform: translateY(100%); /* Start below viewport */
    opacity: 0; /* Start hidden */
    visibility: hidden; /* Start hidden */
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

/* Class to make the Design section visible */
#design.is-visible {
    transform: translateY(0); /* Slide into view */
    opacity: 1;
    visibility: visible;
}
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader span {
    color: var(--primary-color);  /* Changed to black */
    font-family: var(--ff-heading);
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin: 0.25rem 0;
    position: relative;
    overflow: hidden;
}

.loader span:nth-child(2) {
    color: var(--primary-color);  /* This is already black */
}


/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-heading);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
}

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

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);  /* Changed to white */
    z-index: 1000;
    
    box-shadow: 0 5px 30px rgb(0, 0, 0);
    transition: padding var(--transition-slow);
}

header.scrolled {
    padding: 1rem var(--space-md);
}

.logo{
    align-items: center;
}
.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-color);  /* This is already black */
}

nav ul {
    display: flex;
    list-style: none;
    color: var(--light-color);
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-size: 0.9em;
    letter-spacing: 1px;
    font-weight: normal;
    position: relative;
    white-space: nowrap; /* Prevent text wrapping */
    font-family: sans-serif;
    text-transform: none;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--light-color);
    transition: width var(--transition-fast);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}
.active{
    background-color: black;
}

/* HERO SECTION */
.hero {
    height: 100vh;
   
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-color);  /* This is already black */
    position: relative;
    
}
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}
/*pagination*/
.pagination-btn {
    width: 40px;
    height: 40px;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #ccc;
    font-size: 16px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.pagination-btn:hover {
    background-color: #f0f0f0;
}

.pagination-btn.active {
    background-color: #333333;
    color: #FFFFFF;
    border-color: #333333;
}

.pagination-btn:focus {
    outline: 2px solid #0077ff;
    outline-offset: 2px;
}

.hero-content {
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-content h1 {
    margin-bottom: var(--space-md);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--space-md);  /* Changed from --primary-color */
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: rgba(0, 0, 0, 0.815);
    color: var(--dark-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 3px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(211, 206, 206, 0.2);
    background-color: #888;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    width: 70px;  /* Increased from smaller size */
    height: 70px; /* Increased from smaller size */
}

.scroll-indicator span {
    color: white;
    font-size: 36px; /* Increased from smaller size */
   
    display: block;
    line-height: 1;
}

.scroll-indicator i {
    font-size: 36px; /* Increased from smaller size */
    color: white;
    
}

/* SECTION STYLES */
section {
    padding: var(--space-lg) var(--space-md);
    background-color: var(--primary-color);  /* Added white background */
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-lg) auto;
    color: var(--light-color);  /* Changed to black */
}
.section-header-1 {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-lg) auto;
    color: var(--light-color);  /* Changed to black */
}
.section-header-2 {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-lg) auto;
    color: var(--light-color);  /* Changed to black */
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--light-color);  /* This is already black */
}

/* PORTFOLIO SECTION */
.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem 0.5rem 0.5rem;
    font-family: var(--ff-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color var(--transition-fast);
    position: relative;
    color: var(--light-color);  /* Added black text */
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-fast);
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 80%;
}

.filter-btn.active {
    color: var(--accent-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: var(--space-md);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 300px;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(253, 253, 253, 0.7);  /* Changed to white */
    color: var(--light-color);  /* Changed to black */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.portfolio-title {
    position: absolute;
    top: 50%; /* Changed for perfect vertical centering */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Precise centering */
    color: var(--primary-color);
    font-family: var(--ff-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center; /* Ensure text centers if it wraps */
    width: 90%; /* Prevent text overflow */
    opacity: 0; /* Hide by default */
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    z-index: 2; /* Ensure text is above overlay */
    pointer-events: none; /* Prevent text from blocking clicks */
}

.portfolio-category {
    position: absolute;
    top: calc(50% + 30px); /* Position below title */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-align: center;
    width: 90%;
    opacity: 0; /* Hide by default */
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    z-index: 2; /* Same as title */
    pointer-events: none; /* Same as title */
}

.portfolio-item:hover .portfolio-title,
.portfolio-item:hover .portfolio-category {
    opacity: 1; /* Show on hover */
    transform: translate(-50%, -50%); /* For title */
}

.portfolio-item:hover .portfolio-category {
    transform: translate(-50%, 0); /* Different transform for category */
}


/* CONTACT SECTION */
.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
  
    max-width: 210px;
    margin: 0 auto;
}

.contact-info {
    align-items: center;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--light-color);  /* Changed to black */
}

.info-item i {
    font-size: 2.0rem;
    color: var(--light-color);  /* Changed to black */
    margin-right: 1rem;
}

.social-links {
    display: flex;
    margin-top: var(--space-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #000000;
    margin-right: 1rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
    background-color: rgb(245, 240, 240);  /* Changed to black */
    transform: translateY(-5px);
}

.social-link i {
    font-size: 1.2rem;
    color: var(--text-color);
}


.contact-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background-color: transparent;
    outline: none;
    font-family: var(--ff-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    color: var(--light-color);  /* Changed to black */
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    font-size: 1rem;
    color: var(--light-color);  /* Changed to black */
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: var(--light-color);  /* Changed to black */
}

.submit-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);  /* Changed to black */
    color: var(--light-color);
    border: none;
    border-radius: 3px;
    font-family: var(--ff-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* FOOTER */
footer {
    background-color: var(--primary-color);  /* Changed to black */
    color: var(--light-color);
    padding-top: var(--space-lg);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--light-color);
}

.footer-links h3,
.footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--light-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    transition: color var(--transition-fast);
}

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

.footer-newsletter p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 3px 0 0 3px;
    font-family: var(--ff-body);
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 0 1rem;
    background-color: var(--accent-color);
    border: none;
    border-radius: 0 3px 3px 0;
    color: rgba(244, 244, 244, 0.666);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: rgba(244, 242, 242, 0.877);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    margin-top: var(--space-md);
    border-top: 1px solid rgb(4, 4, 4);
}

.footer-bottom p {
    color: white;  /* Keeping this white for contrast on black footer */
    font-size: 0.9rem;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 15, 0.763);  /* Changed to white */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    padding: 2rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: rgb(0, 0, 0);
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-wrap: wrap;
    border-radius: 5px;
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-image {
    flex: 3;
    min-width: 300px;
    height: 500px;
}

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

.modal-info {
    flex: 2;
    min-width: 300px;
    padding: var(--space-md);
    color: #ffffff;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-details {
    margin-top: var(--space-md);
}

.detail {
    display: flex;
    margin-bottom: 0.8rem;
}

.detail span:first-child {
    font-weight: 600;
    width: 100px;
}

/* Close Modal Button Base Styles */
.close-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 9999; /* Ensure it's always on top */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    touch-action: manipulation; /* Optimize for touch */
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.95);
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Large Mobile Devices (landscape phones, tablets less than 768px) */
@media (max-width: 767px) {
    .close-modal {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 22px;
        background-color: rgba(0, 0, 0, 0.9);
    }
}

/* Medium Mobile Devices (less than 576px) */
@media (max-width: 575px) {
    .close-modal {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 20px;
        background-color: rgba(0, 0, 0, 0.95);
    }
}

/* Small Mobile Devices (less than 400px) */
@media (max-width: 400px) {
    .close-modal {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 18px;
        border-width: 1.5px;
    }
}

/* Extra Small Mobile Devices (less than 350px) */
@media (max-width: 350px) {
    .close-modal {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Very Small Mobile Devices (less than or equal to 300px) */
@media (max-width: 300px) {
    .close-modal {
        top: 5px;
        right: 5px;
        width: 28px;
        height: 28px;
        font-size: 14px;
        border-width: 1px;
    }
}

/* Landscape Mode Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .close-modal {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* High Pixel Density Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .close-modal {
        border-width: 1px; /* Thinner border for retina displays */
    }
}

/* Active/Focus States for Better Touch Feedback */
.close-modal:active,
.close-modal:focus {
    background-color: rgba(0, 0, 0, 1);
    outline: none;
    transform: scale(0.95);
}

/* Carousel arrows styles */
 /* Lightbox */
 .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Navigation arrows */
.arrow-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1010;
}

.arrow-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.arrow-button.prev {
    left: 20px;
}

.arrow-button.next {
    right: 20px;
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Improved responsive breakpoints for better device coverage */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        max-width: 90%;
    }
}

@media (max-width: 992px) {
    .site-header {
        padding: 12px 20px;
    }
    
    .main-nav a {
        font-size: 0.8em;
    }
    
    .portfolio-item {
        height: 280px;
    }
    
    .modal-image {
        height: 450px;
    }
}

@media (max-width: 900px) {
    /* Mobile menu overlay - dark backdrop with improved positioning */
    .menu-toggle.active::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 9998; /* Just below the menu, but above everything else */
    }
    
    nav:not(.navigation) {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: #000000; /* Pure black background */
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        transition: right var(--transition-slow);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10001; /* Higher than everything, including the nav-container */
        opacity: 1; /* Fully opaque for maximum contrast */
        border-left: 2px solid #333; /* Visual separation */
    }
    
    nav:not(.navigation).active {
        right: 0;
    }
    
    /* Ensure the site header stays visible */
    .site-header {
        z-index: 10002; /* Higher than mobile menu */
    }
    
    /* Position mobile menu below header */
    nav:not(.navigation) ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 70px 0 0 0; /* Add padding to push below header */
    }
    
    nav:not(.navigation) ul li {
        margin: 1.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    nav:not(.navigation) ul li a {
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 600;
        letter-spacing: 1px;
        display: block;
        padding: 10px 0;
        width: 100%;
        transition: background-color 0.3s ease;
    }
    
    nav:not(.navigation) ul li a:hover {
        background-color: #333333;
    }
    
    .menu-toggle {
        display: block;
        z-index: 10003; /* Higher than everything */
        position: fixed; /* Keep toggle button visible */
        top: 30px;
        right: 20px;
    }
    
    .menu-toggle.active i:before {
        content: "\f00d";
    }
    
    .modal-content {
        margin: 0 1.5rem;
    }
    
    /* Ensure nav-container doesn't interfere with mobile menu */
    .nav-container {
        position: relative;
        z-index: 999; /* Below mobile menu when it's open */
    }
    
    /* Portfolio grid adjustments */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Tablets / iPad */
@media (max-width: 768px) {
    .site-header {
        padding: 10px 15px;
    }
    
    .navigation {
        gap: 10px;
        padding: 10px;
    }
    
    .navigation a {
        font-size: 16px;
        padding: 6px 15px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .portfolio-item {
        height: 220px;
    }
    
    .modal-image {
        height: 350px;
    }
    
    .modal-info {
        padding: var(--space-sm);
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .arrow-up-button {
        bottom: 120px; /* Position even higher on mobile */
        right: 20px; /* Align with right edge on mobile */
        width: 45px; /* Slightly smaller */
        height: 45px;
        z-index: 1002; /* Ensure it's above other mobile elements */
        background-color: rgba(0, 0, 0, 0.85); /* Higher opacity for better visibility */
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
    }
    
    .arrow-up-button.visible {
        opacity: 0.95; /* More visible */
    }
    
    .arrow-up-button:hover {
        transform: translateY(-7px); /* Move further upward on hover */
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    .navigation {
        gap: 5px;
    }
    
    .navigation a {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    /* Portfolio grid adjustments for mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-item {
        height: 220px;
    }
    
    .modal-image {
        height: 250px;
    }
    
    :root {
        --space-lg: 2.5rem;
        --space-md: 1.5rem;
        --space-sm: 0.8rem;
    }
    
    .whatsapp-chat {
        width: 300px;
        right: 10px;
        bottom: 80px;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .site-header {
        padding: 8px 10px;
    }
    
    .main-nav li {
        margin: 0 5px;
    }
    
    .navigation {
        gap: 3px;
    }
    
    .navigation a {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .portfolio-item {
        height: 200px;
    }
    
    .modal-image {
        height: 220px;
    }
    
    .modal-content {
        margin: 0 1rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .whatsapp-button {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
    
    .arrow-up-button {
        bottom: 140px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 350px) {
    .navigation {
        gap: 2px;
    }
    
    .navigation a {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .portfolio-item {
        height: 180px;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .whatsapp-chat {
        width: 280px;
    }
}

/* Special handling for landscape mode on small devices */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        padding: 5px 15px;
    }
    
    .portfolio-item {
        height: 160px;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-image {
        height: 180px;
    }
    
    .arrow-up-button {
        bottom: 70px;
        right: 15px;
    }
    
    .whatsapp-button {
        bottom: 10px;
        right: 10px;
    }
}

/* Force navigation visibility at all screen sizes */
.nav-container {
    display: flex !important;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    color: white;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
}

.navigation {
    display: flex !important;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    flex-wrap: wrap;
    position: static !important; /* Override any absolute/fixed positioning */
    right: auto !important; /* Override any right positioning */
    width: auto !important; /* Override any fixed width */
    height: auto !important; /* Override any fixed height */
    background-color: transparent !important; /* Override any background */
    box-shadow: none !important; /* Override any shadow */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1000 !important;
}

.navigation a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.697);
    font-size: 18px;
    padding: 8px 20px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.navigation a:hover {
    color: rgba(255, 255, 255, 0.726);
}

.navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: rgba(255, 255, 255, 0.766);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navigation a:hover::after {
    width: 60%;
}

.navigation a.active {
    color: white;
}

.navigation a.active:hover::after {
    width: 0;
}

/* Adjust the navigation for smaller screens */
@media (max-width: 600px) {
    .navigation {
        gap: 10px;
    }
    
    .navigation a {
        font-size: 14px;
        padding: 6px 15px;
    }
    
    /* Portfolio grid adjustments for mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .modal-image {
        height: 300px;
    }
    
    :root {
        --space-lg: 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Further adjust for very small screens */
@media (max-width: 350px) {
    .navigation {
        gap: 5px;
    }
    
    .navigation a {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* @media (max-width: 600px) {
    .navigation {
        gap: 5px;
    }
    
    .navigation a {
        font-size: 6px;
        padding: 2px 5px;
    }
} */

/* ARROW UP BUTTON STYLES */
.arrow-up-button {
    position: fixed;
    bottom: 80px; /* Increased from 20px to position it higher */
    right: 90px; /* Positioned to the left of WhatsApp button */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.arrow-up-button.visible {
    opacity: 1;
    visibility: visible;
}

.arrow-up-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-5px);
}

.arrow-up-button i {
    font-size: 20px;
}

/* Make arrow up button more visible on mobile */
@media (max-width: 767px) {
    .arrow-up-button {
        bottom: 120px; /* Position even higher on mobile */
        right: 20px; /* Align with right edge on mobile */
        width: 45px; /* Slightly smaller */
        height: 45px;
        z-index: 1002; /* Ensure it's above other mobile elements */
        background-color: rgba(0, 0, 0, 0.85); /* Higher opacity for better visibility */
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
    }
    
    .arrow-up-button.visible {
        opacity: 0.95; /* More visible */
    }
    
    .arrow-up-button:hover {
        transform: translateY(-7px); /* Move further upward on hover */
    }
}

/* WhatsApp Integration */
        .whatsapp-button {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 1000;
    }
    
    .whatsapp-btn {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background-color: #25D366;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      cursor: pointer;
      transition: all 0.3s;
    }
    
    .whatsapp-btn:hover {
      transform: scale(1.3);
      background-color: #22c15e;
    }
    
    .whatsapp-icon {
      width: 35px;
      height: 35px;
      fill: white;
    }
    
    /* WhatsApp Chat Window */
    .whatsapp-chat {
      position: fixed;
      bottom: 90px;
      right: 20px;
      width: 320px;
      background-color: #F0F2F5;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
      z-index: 999;
      display: none;
      transition: all 0.3s;
    }
    
    .chat-header {
      background-color: #128C7E;
      color: white;
      padding: 15px;
      display: flex;
      align-items: center;
    }
  
    .close-chat {
      margin-left: auto;
      cursor: pointer;
      font-size: 20px;
    }
    
    .chat-body {
      padding: 15px;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M25 2a23 23 0 1 0 0 46 23 23 0 0 0 0-46zm0 41a18 18 0 1 1 0-36 18 18 0 0 1 0 36z' fill='%23e5e5e5' fill-opacity='0.2'/%3E%3C/svg%3E");
    }
    
    .chat-message {
      background-color: white;
      border-radius: 10px;
      padding: 10px 15px;
      margin-bottom: 10px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .chat-input {
      background-color: white;
      padding: 10px;
      display: flex;
      align-items: center;
      border-top: 1px solid #e0e0e0;
    }
    
    .chat-input input {
      flex: 1;
      border: none;
      padding: 8px 12px;
      border-radius: 20px;
      background-color: #f0f0f0;
    }
    
    .chat-input input:focus {
      outline: none;
    }
    
    .send-btn {
      background-color: transparent;
      border: none;
      color: #128C7E;
      margin-left: 10px;
      cursor: pointer;
    }

    .chat-footer {
      padding: 10px 15px;
      text-align: center;
      font-size: 12px;
      color: #666;
      background-color: white;
      border-top: 1px solid #e0e0e0;
    }

/* Modal size adjustments for screens below 729px */
@media (max-width: 729px) {
    .modal-content {
        width: 90%;
        max-width: 500px;
        margin: 10px auto;
        transform: scale(0.95);
    }

    .modal-image {
        height: auto;
        max-height: 60vh;
    }

    .modal-image img {
        max-height: 50vh;
        object-fit: contain;
    }

    .modal-info {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .modal-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .modal-details {
        margin-top: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .modal-gallery {
        max-height: 250px;
        padding: 15px;
    }
}

/* Further adjustments for even smaller screens */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 5px auto;
        transform: scale(0.9);
    }

    .modal-image {
        max-height: 45vh;
    }

    .modal-image img {
        max-height: 40vh;
    }

    .modal-info {
        padding: 12px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-description {
        font-size: 0.85rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .modal-gallery {
        max-height: 200px;
        padding: 12px;
    }
}

/* Additional adjustments for very small screens */
@media (max-width: 350px) {
    .modal-content {
        width: 98%;
        margin: 3px auto;
        transform: scale(0.85);
    }

    .modal-image {
        max-height: 40vh;
    }

    .modal-image img {
        max-height: 35vh;
    }

    .modal-info {
        padding: 10px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-description {
        font-size: 0.8rem;
    }

    .gallery-grid {
        gap: 4px;
    }

    .modal-gallery {
        max-height: 180px;
        padding: 10px;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        max-height: 50vh;
    }

    .modal-image img {
        max-height: 45vh;
    }

    .modal-gallery {
        max-height: 150px;
    }
}