/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e90ff;
    --secondary-color: #ff6b35;
    --accent-color: #32cd32;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --card-bg: rgba(30, 30, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --gradient-primary: linear-gradient(135deg, #1e90ff 0%, #4169e1 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #f39c12 100%);
    --gradient-accent: linear-gradient(135deg, #32cd32 0%, #228b22 100%);
    --shadow-glow: 0 0 20px rgba(30, 144, 255, 0.3);
    --shadow-orange: 0 0 20px rgba(255, 107, 53, 0.3);
    --shadow-green: 0 0 20px rgba(50, 205, 50, 0.3);
}

html {
    scroll-behavior: smooth;
    height: -webkit-fill-available; /* iOS fix */
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS fix */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.8) 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    opacity: 0;
    animation: slideInLeft 1s ease forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--dark-bg);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-main {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-image-main {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.profile-image-main:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.5);
}

.profile-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--gradient-primary);
    color: var(--dark-bg);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scroll-line {
    width: 2px;
    height: 30px;
    background: var(--gradient-primary);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--darker-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.profile-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary-color), transparent);
    animation: rotate 4s linear infinite;
    opacity: 0.1;
    will-change: transform;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-content {
    position: relative;
    z-index: 2;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.profile-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark-bg);
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--dark-bg);
    margin: 0 auto 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    text-align: left;
    flex-grow: 1;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.service-features li {
    padding: 1rem 0;
    padding-left: 2rem !important;
    color: var(--text-secondary);
    position: relative;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0.25rem !important;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--primary-color);
    top: 1.25rem;
    z-index: 1;
}

/* Clients Section */
.clients {
    background: var(--darker-bg);
}

.clients-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.client-category h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.client-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.event-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.event-card p {
    color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio {
    background: var(--darker-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 450px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.portfolio-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Testimonials Section */
.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    display: none;
    position: relative;
    overflow: hidden;
}

.testimonial-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quote-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.testimonial-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.testimonial-author span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.carousel-controls .carousel-btn,
.carousel-controls .carousel-indicators {
    flex-shrink: 0;
}

.carousel-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.indicator.active {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Contact Section */
.contact {
    background: var(--darker-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
}

.futuristic-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e90ff' 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 0.5rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-group select option {
    background: var(--dark-bg);
    color: var(--text-primary);
    padding: 0.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Special handling for select label */
.form-group.select-group label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group select:focus + label,
.form-group select:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label,
.form-group.has-value select + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .form-line,
.form-group select:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.submit-btn {
    width: 100%;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.5);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari */
    body {
        -webkit-overflow-scrolling: touch;
        min-height: -webkit-fill-available;
    }
    
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .hero-bg-img {
        transform: translate3d(0, 0, 0);
    }
    
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Fix for iOS Safari bottom bar */
    .hero-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Prevent bounce scroll */
    .navbar {
        position: -webkit-sticky;
        position: sticky;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 10, 10, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(20px);
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        margin: 0 auto;
        max-width: 100%;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .client-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .event-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        height: 400px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .footer-social {
        justify-content: center;
    }

    .carousel-controls {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    /* Better text alignment on mobile */
    .about-text h3,
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .about-text p,
    .contact-info p {
        font-size: 1rem;
        text-align: left;
    }
    
    /* Fix profile showcase on mobile */
    .hero-visual {
        margin-top: 2rem;
    }
    
    /* Better spacing for event cards */
    .event-card h4 {
        font-size: 1.2rem;
    }
    
    .event-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .title-line {
        display: block;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .service-card,
    .testimonial-card,
    .futuristic-form {
        padding: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
    }
    
    .service-features li {
        font-size: 0.9rem;
        padding: 1.2rem 0;
        padding-left: 2rem !important;
        margin-bottom: 1rem;
        line-height: 1.5;
        display: block;
        text-indent: 0 !important;
    }
    
    .service-features li::before {
        left: 0.25rem !important;
        top: 1.4rem;
        margin-right: 1rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .client-grid {
        grid-template-columns: 1fr;
    }
    
    .client-card {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .profile-main {
        width: 250px;
        height: 250px;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    .quote-icon {
        font-size: 2rem;
    }
    
    /* Ensure proper alignment on very small screens */
    .hero-buttons {
        align-items: center;
    }
    
    .contact-details {
        text-align: left;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    /* Better form spacing */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    /* Portfolio overlay text */
    .portfolio-overlay h4 {
        font-size: 1.1rem;
    }
    
    .portfolio-overlay p {
        font-size: 0.85rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 6rem 0 4rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .profile-main {
        width: 200px;
        height: 200px;
    }
    
    section {
        padding: 4rem 0;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth Transitions - Optimized */
a, button, .nav-link, .btn, .social-link {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Performance Optimizations */
.hero-bg-img {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-glow {
    will-change: auto;
}

/* Hardware acceleration for smooth animations */
.service-card,
.client-card,
.portfolio-item,
.testimonial-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce paint areas */
.hero-overlay,
.portfolio-overlay {
    will-change: opacity;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.nav-link:focus,
.btn:focus,
.social-link:focus,
.carousel-btn:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #ffffff;
        --accent-color: #ffffff;
        --text-secondary: #cccccc;
    }
}
