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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Keep logo animations for visual appeal */
    .floating-project-logo {
        animation: circularFloat 8s linear infinite !important;
    }
}

/* Ensure view mode switcher is visible on page load */
.view-mode-switcher {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Simple Video Modal Styles */
#videoModal {
    display: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    will-change: background, box-shadow;
    transform: translateZ(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo h2 {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    font-family: 'Inter', sans-serif;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.logo-image:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

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

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-mode-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.view-mode-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.view-mode-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    transform: scale(1.1);
}

.view-mode-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: #6b7280;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    background-color: #6b7280;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: #2563eb;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    animation: float 4s ease-in-out infinite !important;
    -webkit-animation: float 4s ease-in-out infinite !important;
    -moz-animation: float 4s ease-in-out infinite !important;
    will-change: transform;
    transform: translateZ(0);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.floating-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.floating-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    animation-play-state: paused;
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 15%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

.hero-graphic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.hero-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

.hero-icon i {
    font-size: 3rem;
    color: white;
}

.hero-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.hero-text p {
    font-size: 1rem;
    opacity: 0.9;
    color: white;
}

@keyframes float {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg); 
    }
    25% { 
        transform: translate3d(0, -15px, 0) rotate(1deg); 
    }
    50% { 
        transform: translate3d(0, -25px, 0) rotate(0deg); 
    }
    75% { 
        transform: translate3d(0, -15px, 0) rotate(-1deg); 
    }
}

@-webkit-keyframes float {
    0%, 100% { 
        -webkit-transform: translate3d(0, 0, 0) rotate(0deg); 
    }
    25% { 
        -webkit-transform: translate3d(0, -15px, 0) rotate(1deg); 
    }
    50% { 
        -webkit-transform: translate3d(0, -25px, 0) rotate(0deg); 
    }
    75% { 
        -webkit-transform: translate3d(0, -15px, 0) rotate(-1deg); 
    }
}

@-moz-keyframes float {
    0%, 100% { 
        -moz-transform: translate3d(0, 0, 0) rotate(0deg); 
    }
    25% { 
        -moz-transform: translate3d(0, -15px, 0) rotate(1deg); 
    }
    50% { 
        -moz-transform: translate3d(0, -25px, 0) rotate(0deg); 
    }
    75% { 
        -moz-transform: translate3d(0, -15px, 0) rotate(-1deg); 
    }
}


/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-header p {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: #f9fafb;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 20px 20px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.service-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    color: #4b5563;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Projects Section */
.projects {
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 2rem;
    text-align: center;
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background: white;
    padding: 10px;
}

.app-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.app-icon {
    font-size: 2.5rem;
    color: #2563eb;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.project-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-note {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.project-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-top: 1rem;
}

.project-links > * + * {
    margin-top: 1rem;
}

/* Fallback for browsers that don't support gap */
.project-links .project-link:not(:first-child) {
    margin-top: 1rem;
}

.project-link {
    text-align: center;
}

.project-link .btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
}

.project-link .btn i {
    margin-right: 0.5rem;
}

.video-btn {
    background: #10b981;
    background: -webkit-linear-gradient(135deg, #10b981, #059669);
    background: -o-linear-gradient(135deg, #10b981, #059669);
    background: -moz-linear-gradient(135deg, #10b981, #059669);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.video-btn:hover {
    background: #059669;
    background: -webkit-linear-gradient(135deg, #059669, #047857);
    background: -o-linear-gradient(135deg, #059669, #047857);
    background: -moz-linear-gradient(135deg, #059669, #047857);
    background: linear-gradient(135deg, #059669, #047857);
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    -moz-box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.video-btn:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.video-btn:active {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    -moz-transform: translateY(0);
    transform: translateY(0);
}

/* Ensure video buttons are always visible */
.video-btn {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
    min-height: 44px;
    min-width: 150px;
}

/* Fallback for older browsers */
.project-links {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.project-link {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Basic fallback button style for maximum compatibility */
.video-btn {
    background-color: #10b981 !important;
    color: white !important;
    border: 2px solid #059669 !important;
    padding: 10px 20px !important;
    margin: 5px 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    border-radius: 5px !important;
    text-decoration: none !important;
}

.video-btn:hover {
    background-color: #059669 !important;
    border-color: #047857 !important;
}

/* Ensure buttons work in all browsers */
button.video-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #10b981;
    border: 2px solid #059669;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: #f9fafb;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.about-text p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #6b7280;
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-visual {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-visualization {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.stat-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    animation: pulse 2s infinite;
}

.stat-circle:nth-child(2) {
    animation-delay: 0.5s;
}

.stat-circle:nth-child(3) {
    animation-delay: 1s;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2563eb;
    animation: float 3s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    bottom: 15%;
    left: 20%;
    animation-delay: 2s;
}

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

/* Floating Project Logos in About Section */
.floating-project-logo {
    position: absolute;
    width: 75px !important;
    height: 75px !important;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: circularFloat 6s linear infinite !important;
    -webkit-animation: circularFloat 6s linear infinite !important;
    -moz-animation: circularFloat 6s linear infinite !important;
    -o-animation: circularFloat 6s linear infinite !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 10;
    will-change: transform;
    transform: translateZ(0);
}

.floating-project-logo:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    animation-play-state: paused;
}

.floating-project-logo:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.floating-project-logo:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 2.5s;
}

.floating-project-logo:nth-child(3) {
    bottom: 15%;
    left: 20%;
    animation-delay: 5s;
}

.floating-logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.floating-logo-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

/* Simplified circular rotation animation */
@keyframes circularFloat {
    0% {
        transform: translateZ(0) rotate(0deg) translateX(20px) rotate(0deg);
    }
    25% {
        transform: translateZ(0) rotate(90deg) translateX(20px) rotate(-90deg);
    }
    50% {
        transform: translateZ(0) rotate(180deg) translateX(20px) rotate(-180deg);
    }
    75% {
        transform: translateZ(0) rotate(270deg) translateX(20px) rotate(-270deg);
    }
    100% {
        transform: translateZ(0) rotate(360deg) translateX(20px) rotate(-360deg);
    }
}

@-webkit-keyframes circularFloat {
    0% {
        -webkit-transform: translateZ(0) rotate(0deg) translateX(20px) rotate(0deg);
    }
    25% {
        -webkit-transform: translateZ(0) rotate(90deg) translateX(20px) rotate(-90deg);
    }
    50% {
        -webkit-transform: translateZ(0) rotate(180deg) translateX(20px) rotate(-180deg);
    }
    75% {
        -webkit-transform: translateZ(0) rotate(270deg) translateX(20px) rotate(-270deg);
    }
    100% {
        -webkit-transform: translateZ(0) rotate(360deg) translateX(20px) rotate(-360deg);
    }
}

@-moz-keyframes circularFloat {
    0% {
        -moz-transform: translateZ(0) rotate(0deg) translateX(20px) rotate(0deg);
    }
    25% {
        -moz-transform: translateZ(0) rotate(90deg) translateX(20px) rotate(-90deg);
    }
    50% {
        -moz-transform: translateZ(0) rotate(180deg) translateX(20px) rotate(-180deg);
    }
    75% {
        -moz-transform: translateZ(0) rotate(270deg) translateX(20px) rotate(-270deg);
    }
    100% {
        -moz-transform: translateZ(0) rotate(360deg) translateX(20px) rotate(-360deg);
    }
}

/* Fallback simple rotation animation */
@keyframes simpleRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Alternative floating animation for better browser support */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(90deg);
    }
    50% {
        transform: translateY(0px) rotate(180deg);
    }
    75% {
        transform: translateY(10px) rotate(270deg);
    }
}

/* Responsive adjustments for floating project logos */
@media (max-width: 768px) {
    .floating-project-logo {
        width: 60px;
        height: 60px;
        /* Reduce animation complexity on mobile for better performance */
        animation-duration: 8s;
    }
    
    .floating-logo-img,
    .floating-logo-fallback {
        width: 48px;
        height: 48px;
    }
    
    .floating-logo-fallback {
        font-size: 1.3rem;
    }
    
    .floating-project-logo:nth-child(1) {
        top: 8%;
        left: 12%;
    }
    
    .floating-project-logo:nth-child(2) {
        top: 18%;
        right: 8%;
    }
    
    .floating-project-logo:nth-child(3) {
        bottom: 12%;
        left: 18%;
    }
    
    /* Optimized smaller circular motion on mobile */
    @keyframes circularFloat {
        0% {
            transform: translateZ(0) rotate(0deg) translateX(15px) rotate(0deg);
        }
        25% {
            transform: translateZ(0) rotate(90deg) translateX(15px) rotate(-90deg);
        }
        50% {
            transform: translateZ(0) rotate(180deg) translateX(15px) rotate(-180deg);
        }
        75% {
            transform: translateZ(0) rotate(270deg) translateX(15px) rotate(-270deg);
        }
        100% {
            transform: translateZ(0) rotate(360deg) translateX(15px) rotate(-360deg);
        }
    }
}

/* Performance optimization for low-end devices */
@media (max-width: 480px) {
    .floating-project-logo {
        animation: circularFloat 8s linear infinite !important;
        /* Keep floating animation but make it slower */
        position: absolute;
        width: 55px;
        height: 55px;
    }
    
    .floating-logo-img,
    .floating-logo-fallback {
        width: 40px;
        height: 40px;
    }
    
    .floating-logo-fallback {
        font-size: 1.1rem;
    }
    
    .floating-elements {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 5;
    }
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.contact-item p {
    color: #6b7280;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

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

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-logo {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-image {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px;
}

.footer-logo-image:hover {
    transform: scale(1.05);
    opacity: 1;
}

.footer-logo h3 {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(96, 165, 250, 0.4);
    font-family: 'Inter', sans-serif;
}

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

.footer-logo-placeholder {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .view-mode-switcher {
        display: flex !important;
    }
    
    .nav-toggle {
        display: none !important;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .view-mode-switcher {
        display: flex !important;
    }
}

/* Mobile Navigation */
@media (max-width: 1023px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.project-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* View Mode Classes */
body.mobile-mode {
    max-width: 375px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

body.tablet-mode {
    max-width: 768px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

body.desktop-mode {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
}

/* Mobile Mode Specific Styles */
body.mobile-mode .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
}

body.mobile-mode .hero-title {
    font-size: 2rem;
}

body.mobile-mode .services-grid {
    grid-template-columns: 1fr;
}

body.mobile-mode .projects-grid {
    grid-template-columns: 1fr;
}

body.mobile-mode .about-content {
    grid-template-columns: 1fr;
}

body.mobile-mode .contact-content {
    grid-template-columns: 1fr;
}

body.mobile-mode .footer-content {
    grid-template-columns: 1fr;
}


body.mobile-mode .stats-visualization {
    flex-direction: column;
    gap: 1rem;
}

body.mobile-mode .floating-card {
    position: relative;
    margin: 1rem 0;
    animation: none;
    will-change: auto;
    transform: none;
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
    .floating-card {
        animation: none;
        will-change: auto;
        transform: none;
    }
    
    .hero-icon {
        animation: none;
    }
    
    .stat-circle {
        animation: none;
    }
    
    .floating-icon {
        animation: none;
    }
}

body.mobile-mode .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
}

body.mobile-mode .nav-toggle {
    display: flex;
}

body.mobile-mode .view-mode-switcher {
    display: flex !important;
}

/* Tablet Mode Specific Styles */
body.tablet-mode .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

body.tablet-mode .hero-title {
    font-size: 2.5rem;
}

body.tablet-mode .services-grid {
    grid-template-columns: repeat(2, 1fr);
}

body.tablet-mode .projects-grid {
    grid-template-columns: repeat(2, 1fr);
}

body.tablet-mode .about-content {
    grid-template-columns: 1fr 1fr;
}

body.tablet-mode .contact-content {
    grid-template-columns: 1fr 1fr;
}

body.tablet-mode .footer-content {
    grid-template-columns: repeat(2, 1fr);
}

body.tablet-mode .nav-toggle {
    display: none;
}

body.tablet-mode .view-mode-switcher {
    display: flex !important;
}

/* Desktop Mode Specific Styles */
body.desktop-mode .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

body.desktop-mode .hero-title {
    font-size: 3.5rem;
}

body.desktop-mode .services-grid {
    grid-template-columns: repeat(3, 1fr);
}

body.desktop-mode .projects-grid {
    grid-template-columns: repeat(3, 1fr);
}

body.desktop-mode .about-content {
    grid-template-columns: 1fr 1fr;
}

body.desktop-mode .contact-content {
    grid-template-columns: 1fr 1fr;
}

body.desktop-mode .footer-content {
    grid-template-columns: repeat(4, 1fr);
}

body.desktop-mode .nav-toggle {
    display: none;
}

body.desktop-mode .view-mode-switcher {
    display: flex !important;
}

/* Ensure view mode switcher is ALWAYS visible in ALL modes */
.view-mode-switcher {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Force visibility on page load */
body .view-mode-switcher {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any potential hiding rules */
body.mobile-mode .view-mode-switcher,
body.tablet-mode .view-mode-switcher,
body.desktop-mode .view-mode-switcher {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure view mode switcher is always visible in tablet and desktop */
@media (min-width: 768px) {
    .view-mode-switcher {
        display: flex !important;
    }
}

/* Ensure view mode switcher is always visible in mobile too */
@media (max-width: 767px) {
    .view-mode-switcher {
        display: flex !important;
    }
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    -webkit-animation: fadeIn 0.3s ease;
    -moz-animation: fadeIn 0.3s ease;
    -o-animation: fadeIn 0.3s ease;
    animation: fadeIn 0.3s ease;
    overflow: visible;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.show {
    display: block !important;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    visibility: visible !important;
    opacity: 1 !important;
}

.video-modal.show .video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.video-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    -webkit-box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    -webkit-animation: slideIn 0.3s ease;
    -moz-animation: slideIn 0.3s ease;
    -o-animation: slideIn 0.3s ease;
    animation: slideIn 0.3s ease;
    overflow: visible;
    position: relative;
    margin: 0 auto;
}

.video-modal-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #2563eb;
    background: -webkit-linear-gradient(135deg, #2563eb, #1d4ed8);
    background: -o-linear-gradient(135deg, #2563eb, #1d4ed8);
    background: -moz-linear-gradient(135deg, #2563eb, #1d4ed8);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.video-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.video-close:hover {
    color: #fbbf24;
}

.video-modal-body {
    padding: 0;
    background: #000;
    overflow: visible;
    position: relative;
}

.video-modal-body video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block !important;
    background: #000;
    outline: none;
    border: none;
    min-height: 300px;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: relative;
}

.video-modal-body video:focus {
    outline: none;
}

/* Force video controls to be visible */
.video-modal-body video::-webkit-media-controls {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.video-modal-body video::-webkit-media-controls-panel {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.video-modal-body video::-webkit-media-controls-play-button {
    display: block !important;
    opacity: 1 !important;
}

.video-modal-body video::-webkit-media-controls-timeline {
    display: block !important;
    opacity: 1 !important;
}

.video-modal-body video::-webkit-media-controls-volume-slider {
    display: block !important;
    opacity: 1 !important;
}

.video-modal-body video::-webkit-media-controls-fullscreen-button {
    display: block !important;
    opacity: 1 !important;
}

/* Additional fallback for video controls */
.video-modal-body video[controls] {
    pointer-events: auto !important;
}

.video-modal-body video[controls]::-webkit-media-controls {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Ensure video is clickable */
.video-modal-body video {
    cursor: pointer;
    pointer-events: auto !important;
}

/* Additional video control fixes */
.video-modal-body video[controls] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Force video controls visibility for all browsers */
.video-modal-body video::-webkit-media-controls-enclosure {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure video poster/thumbnail shows if available */
.video-modal-body video[poster] {
    background-image: attr(poster);
    background-size: cover;
    background-position: center;
}

/* Fallback for non-webkit browsers */
.video-modal-body video::-moz-media-controls {
    display: block !important;
}

.video-modal-body video::-ms-media-controls {
    display: block !important;
}

/* Modal Animations */
@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@-webkit-keyframes slideIn {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8) translateY(-50px);
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1) translateY(0);
        transform: scale(1) translateY(0);
    }
}

@-moz-keyframes slideIn {
    from {
        opacity: 0;
        -moz-transform: scale(0.8) translateY(-50px);
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        -moz-transform: scale(1) translateY(0);
        transform: scale(1) translateY(0);
    }
}

@-o-keyframes slideIn {
    from {
        opacity: 0;
        -o-transform: scale(0.8) translateY(-50px);
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        -o-transform: scale(1) translateY(0);
        transform: scale(1) translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8) translateY(-50px);
        -moz-transform: scale(0.8) translateY(-50px);
        -o-transform: scale(0.8) translateY(-50px);
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1) translateY(0);
        -moz-transform: scale(1) translateY(0);
        -o-transform: scale(1) translateY(0);
        transform: scale(1) translateY(0);
    }
}

/* Responsive Video Modal */
@media (max-width: 768px) {
    .video-modal-content {
        max-width: 95%;
        width: 95%;
        margin: 1rem;
    }
    
    .video-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .video-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .video-close {
        font-size: 1.5rem;
    }
    
    .video-modal-body video {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        max-width: 98%;
        width: 98%;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .video-modal-header {
        padding: 0.8rem 1rem;
    }
    
    .video-modal-header h3 {
        font-size: 1rem;
    }
    
    .video-modal-body video {
        max-height: 50vh;
    }
}


