/* Font Definitions */
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'SpaceGrotesk-Regular';
  src: url('fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'Noland';
  src: url('fonts/Noland-Bold.otf') format('opentype');
  font-weight: bold;
}

@font-face {
  font-family: 'Cloud24';
  src: url('fonts/Cloud24-Bold.otf') format('opentype');
  font-weight: bold;
}

/* Color Variables */
:root {
    --primary: #4ea674;
    --secondary: #023337;
    --accent: #c0e6b9;
    --light: #e9f8e7;
    --dark: #023337;
    --text-dark: #023337;
    --text-light: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: rgba(78, 166, 116, 0.15);
    --transition: all 0.3s ease;
    --footer-bg: #023337;
    --header-height: 140px; /* New variable for header height */
}

.dark-mode {
    --dark: #f8f9fa;
    --light: #023337;
    --text-dark: #f8f9fa;
    --text-light: #e9f8e7;
    --card-bg: #2b2d42;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --footer-bg: #011c1e;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light);
    transition: var(--transition);
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5 {
    font-family: 'SpaceGrotesk-Regular', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-family: 'Cloud24', sans-serif;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* ======================= */
/* UPDATED HEADER & NAVIGATION */
/* ======================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 51, 55, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

/* Header Top Section */
.header-top {
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo styling - UPDATED */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}

.logo-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(78, 166, 116, 0.4);
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

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

.logo-text {
    font-family: 'Noland', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-light);
}

.logo-highlight {
    color: var(--primary);
}

/* Navigation styling */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    max-width: 600px;
    width: 100%;
    justify-content: space-between;
    margin: 0 auto;
}

nav ul li {
    flex: 1;
    text-align: center;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 1.1rem;
    font-family: 'SpaceGrotesk-Regular', sans-serif;
    display: block;
    padding: 0 5px;
}

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

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

/* Theme toggle positioning */
.nav-btns {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
}

.sun-icon {
    opacity: 0;
}

.dark-mode .moon-icon {
    opacity: 0;
}

.dark-mode .sun-icon {
    opacity: 1;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    position: relative;
    width: 40px;
    height: 40px;
}

.menu-icon, .close-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
}

.close-icon {
    opacity: 0;
}

/* Contact info bar */
.header-contact {
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 0;
}

.contact-info-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: 'SpaceGrotesk-Regular', sans-serif;
}

.contact-item .contact-icon {
    width: 16px;
    height: 16px;
}

/* ======================= */
/* UPDATED HERO SECTION */
/* ======================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, rgba(78, 166, 116, 0.1) 0%, rgba(2, 51, 55, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 20px;
    font-family: 'Cloud24', sans-serif;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 30px;
    color: var(--text-dark);
    opacity: 0.9;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-img {
    width: 85%;
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    aspect-ratio: 3/4;
    object-fit: cover;
}

.shape {
    position: absolute;
    z-index: -1;
}

.shape-1 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.1;
    top: -30px;
    left: -30px;
}

.shape-2 {
    width: 150px;
    height: 150px;
    border: 5px solid var(--accent);
    border-radius: 20px;
    bottom: -30px;
    right: -30px;
    transform: rotate(45deg);
}

/* Social Vertical Icons */
.social-vertical {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.social-vertical a {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.social-vertical a:hover {
    transform: translateY(-5px);
}

.social-vertical img {
    width: 25px;
    height: 25px;
    fill: var(--primary); /* exact #4ea674 from your CSS variable */
}

.dark-mode .social-vertical img {
    fill: #ffffff; /* pure white in dark mode */
}

/* Text Animation Styles */
.text-animation {
    overflow: hidden;
    position: relative;
}

.text-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: textAppear 0.8s forwards;
}

.text-line:nth-child(1) {
    animation-delay: 0.2s;
}

.name-animate {
    display: inline-block;
    position: relative;
    font-size: 1.1em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

.name-animate::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    height: 100%;
    width: 4px;
    background: var(--primary);
    animation: blink 0.8s infinite;
}

.role-container {
    position: relative;
    height: 1.5em;
    overflow: hidden;
    margin-top: 15px;
}

.role {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(100%);
    animation: roleSlide 12s infinite;
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    background: linear-gradient(90deg, #4ea674, #c0e6b9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Cloud24', sans-serif;
}

.role-1 {
    animation-delay: 0s;
}

.role-2 {
    animation-delay: 4s;
}

.role-3 {
    animation-delay: 8s;
}

@keyframes textAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes roleSlide {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    5% {
        opacity: 1;
        transform: translateY(0);
    }
    25% {
        opacity: 1;
        transform: translateY(0);
    }
    30% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-text h2 {
    margin-bottom: 20px;
    font-family: 'Cloud24', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-dark);
    opacity: 0.9;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: var(--accent);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    font-family: 'Noland', sans-serif;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--card-shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'SpaceGrotesk-Regular', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.skill-icon {
    width: 24px;
    height: 24px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.skill-item {
    background: rgba(78, 166, 116, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.skill-item:hover {
    background: var(--primary);
    color: white;
}

/* Our Latest Works Section */
.latest-works {
    background: linear-gradient(135deg, rgba(78, 166, 116, 0.05) 0%, rgba(2, 51, 55, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.works-carousel {
    position: relative;
    overflow: hidden;
    height: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.carousel-inner {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 51, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px;
}

.slide-content {
    max-width: 800px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-category {
    display: block;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-family: 'Noland', sans-serif;
}

.project-title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.2;
    font-family: 'Cloud24', sans-serif;
}

.project-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 30px;
    line-height: 1.8;
    opacity: 0.9;
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.carousel-btn {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-btn img {
    width: 24px;
    height: 24px;
}

.carousel-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}
/* Contact Section */
.contact {
    background: linear-gradient(135deg, rgba(78, 166, 116, 0.1) 0%, rgba(2, 51, 55, 0.05) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--card-shadow);
}

.contact-info h2 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: 15px;
    color: var(--text-dark);
    font-family: 'Cloud24', sans-serif;
}

.contact-info h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    color: var(--primary);
    margin-bottom: 25px;
    font-family: 'SpaceGrotesk-Regular', sans-serif;
}

.contact-info p {
    margin-bottom: 30px;
    color: var(--text-dark);
    opacity: 0.9;
    line-height: 1.8;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(78, 166, 116, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.contact-method:hover .contact-icon {
    background: var(--primary);
}

.contact-icon img {
    width: 24px;
    height: 24px;
}

.contact-details h4 {
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin-bottom: 5px;
    color: var(--text-dark);
    font-family: 'SpaceGrotesk-Regular', sans-serif;
}

.contact-details p {
    margin: 0;
    color: var(--text-dark);
    opacity: 0.8;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.contact-form {
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--card-shadow);
}

.contact-form h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 25px;
    color: var(--text-dark);
    font-family: 'Cloud24', sans-serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: clamp(0.9rem, 2vw, 1rem);
}
/* Phone input group styling */
.phone-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.phone-input select {
    padding: 0.5rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 5px;
    background: var(--bg-color, #fff);
    font-size: 1rem;
    color: var(--text-color, #333);
}

.phone-input input[type="tel"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: var(--transition);
    background: rgba(78, 166, 116, 0.03);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 166, 116, 0.2);
}

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

/* Modern Subject Field Styling */
.select-wrapper {
    position: relative;
}

.full-width-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    background: rgba(78, 166, 116, 0.03);
    color: var(--text-dark);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234ea674' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.full-width-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 166, 116, 0.2);
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--text-light);
    padding: 15px 0 20px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    font-family: 'Noland', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    text-decoration: underline;
    color: var(--text-light);
    margin-bottom: 10px;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(35px, 6vw, 45px);
    height: clamp(35px, 6vw, 45px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.social-links img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.social-links a:hover img {
    transform: scale(1.2);
}

/* Floating Telegram Widget */
.telegram-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
}

.telegram-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.telegram-icon:hover {
    transform: scale(1.1);
    background: #2aabee;
}

.telegram-icon img {
    width: 28px;
    height: 28px;
}

.telegram-form {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 10001;
}

.telegram-form.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary);
    color: white;
}

.form-header h3 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-family: 'SpaceGrotesk-Regular', sans-serif;
}

.close-form {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
}

.close-form:hover {
    transform: rotate(90deg);
}

#widgetContactForm {
    padding: 20px;
}

#widgetContactForm .form-group {
    margin-bottom: 15px;
}

#widgetContactForm .form-group label {
    color: var(--text-dark);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

#widgetContactForm .form-group input,
#widgetContactForm .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    transition: var(--transition);
}

#widgetContactForm .form-group input:focus,
#widgetContactForm .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 166, 116, 0.1);
}

#widgetContactForm .btn {
    width: 100%;
    padding: 12px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-top: 10px;
}

/* ======================= */
/* 404 PAGE STYLES */
/* ======================= */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(78, 166, 116, 0.1) 0%, rgba(2, 51, 55, 0.05) 100%);
    padding-top: 140px;
    padding-bottom: 60px;
}

.error-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

.error-content h1 {
    font-size: 10rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #4ea674, #023337);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Cloud24', sans-serif;
}

.error-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.error-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-dark);
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* ======================= */
/* ACCESSIBILITY IMPROVEMENTS */
/* ======================= */
/* Focus styles */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Color contrast improvements */
.btn, .btn-secondary {
    color: white !important;
}

.dark-mode .btn, .dark-mode .btn-secondary {
    color: var(--text-light) !important;
}

/* Form field contrast */
.form-group input, 
.form-group textarea,
.full-width-select {
    background: rgba(78, 166, 116, 0.08);
    border-color: #ddd;
}

.dark-mode .form-group input, 
.dark-mode .form-group textarea,
.dark-mode .full-width-select {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444;
}

/* ======================= */
/* RESPONSIVE DESIGN */
/* ======================= */
@media (max-width: 1199px) {
    /* Adjust header height for large tablets */
    :root {
        --header-height: 130px;
    }
}

@media (max-width: 991px) {
    /* Tablet adjustments */
    :root {
        --header-height: 120px;
    }
    
    .hero {
        min-height: auto;
        padding-bottom: 40px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Reorder elements for proper stacking */
    .hero-image {
        order: -1; /* Move image above text */
    }
    
    .hero-img {
        max-height: 70vh;
        aspect-ratio: auto;
        width: auto;
        max-width: 100%;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    /* Social vertical alignment for mobile */
    .social-vertical {
        top: 0;
        transform: none;
        display: flex;
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .works-carousel {
        height: 500px;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
    
    /* Telegram widget mobile fix */
    .telegram-form {
        position: fixed !important;
        bottom: 80px !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: calc(100% - 32px) !important;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 10001;
    }
    
    .telegram-widget {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    /* Tablet/small screen adjustments */
    :root {
        --header-height: 110px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--card-bg);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
        z-index: 999;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
        flex: none;
    }
    
    .contact-info-bar {
        gap: 20px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .works-carousel {
        height: 450px;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-description {
        font-size: 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .footer-left, .footer-right {
        align-items: center;
        text-align: center;
    }
    
    /* Mobile menu icon toggle */
    .mobile-menu-btn.active .menu-icon {
        opacity: 0;
    }
    
    .mobile-menu-btn.active .close-icon {
        opacity: 1;
    }
    
    /* Phone input stack on mobile */
    .phone-input {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    /* Mobile adjustments */
    :root {
        --header-height: 90px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-img {
        max-height: 60vh;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .works-carousel {
        height: 400px;
    }
    
    .project-title {
        font-size: 1.8rem;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn img {
        width: 18px;
        height: 18px;
    }
    
    .text-line {
        font-size: 0.9rem;
    }
    
    .role {
        font-size: 1.2rem;
    }
    
    .name-animate::after {
        width: 3px;
        right: -7px;
    }
    
    /* Adjust carousel dots for small screens */
    .carousel-controls {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Updated header adjustments */
    .header-contact {
        display: none;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-img {
        height: 40px;
        width: 40px;
    }
}

/* Responsive adjustments for 404 page */
@media (max-width: 768px) {
    .error-content h1 {
        font-size: 8rem;
    }
    
    .error-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .error-content h1 {
        font-size: 6rem;
    }
    
    .error-content h2 {
        font-size: 1.5rem;
    }
    
    .error-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Small mobile adjustments */
    :root {
        --header-height: 80px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-img {
        max-height: 55vh;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    
    .carousel-controls {
        bottom: 15px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Aspect ratio adjustments */
@media (max-aspect-ratio: 1/1) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 30px;
    }
}
/* Success Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 51, 55, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

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

.success-modal {
  background: var(--light);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  transform: translateY(30px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 40px;
  position: relative;
}

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

.modal-content {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  color: var(--primary);
  margin-bottom: 20px;
}

.success-modal h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin-bottom: 20px;
  color: var(--text-dark);
}

.success-modal p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: 30px;
  color: var(--text-dark);
  opacity: 0.9;
  line-height: 1.6;
}

.modal-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .success-modal {
    padding: 30px 20px;
  }
  
  .modal-btns {
    flex-direction: column;
    gap: 10px;
  }
  
  .modal-btns .btn {
    width: 100%;
  }
}

/* ======================= */
/* NEW HERO FIGURE STYLES FOR MOBILE */
/* ======================= */
@media (max-width: 768px) {
  .hero-figure {
    position: relative;
    display: inline-block;
    width: 100%;
  }
  
  .hero-figure .social-vertical {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
  }
  
  .hero-figure .social-vertical img {
    width: 25px;
    height: 25px;
  }
}