/* Home page specific styles */

/* Loading Screen */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.2s ease-out;
    overflow: hidden;
}

.loader-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
}

.loader-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(255, 255, 255, 0.01) 100px,
            rgba(255, 255, 255, 0.01) 101px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 100px,
            rgba(255, 255, 255, 0.01) 100px,
            rgba(255, 255, 255, 0.01) 101px
        );
    opacity: 0.5;
    animation: gridShift 8s ease-in-out infinite;
}

.loader-container.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Catchphrase Animation */
.catchphrase-container {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    z-index: 2;
    padding: 40px 30px;
}

.catchphrase-line {
    position: relative;
    margin: 10px 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.catchphrase-text {
    display: inline-block;
    font-size: 3.5rem;
    font-weight: 300;
    color: #343a40;
    letter-spacing: 0.1em;
    position: relative;
}

.company-name .catchphrase-text {
    font-size: 4rem;
    font-weight: 600;
    background: linear-gradient(135deg, #495057 0%, #212529 50%, #495057 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub-message {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    z-index: 2;
    position: relative;
    padding: 25px;
}

.sub-text {
    display: inline-block;
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.6;
}

/* V-loader Animation */
.v-loader {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: scale(0.8);
    z-index: 2;
}

.v-shape {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.v-line {
    position: absolute;
    width: 4px;
    height: 80px;
    background: linear-gradient(180deg, #495057 0%, #212529 50%, #495057 100%);
    border-radius: 2px;
    transform-origin: bottom center;
    animation: vPulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(224, 224, 224, 0.5);
}

.v-left {
    transform: rotate(-25deg) translateX(-15px);
    animation-delay: 0s;
    animation-name: vPulse;
}

.v-right {
    transform: rotate(25deg) translateX(15px);
    animation-delay: 0.1s;
    animation-name: vPulseRight;
}

.v-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #495057 0%, transparent 70%);
    border-radius: 50%;
    animation: orbit 4s linear infinite;
}

.particle:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 3s;
}

.particle:nth-child(2) {
    animation-delay: 0.6s;
    animation-duration: 3.5s;
}

.particle:nth-child(3) {
    animation-delay: 1.2s;
    animation-duration: 4s;
}

.particle:nth-child(4) {
    animation-delay: 1.8s;
    animation-duration: 2.8s;
}

.particle:nth-child(5) {
    animation-delay: 2.4s;
    animation-duration: 3.2s;
}

.loading-progress {
    width: 200px;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(20px);
    z-index: 2;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #f8f8f8 50%, #ffffff 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressShine 1.5s ease-in-out infinite;
    width: 0%;
    box-shadow: 0 0 25px rgba(255, 255, 255, 1), inset 0 0 10px rgba(255, 255, 255, 0.5);
    transition: width 0.1s ease-out;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding-top: 80px;
    overflow: hidden;
    color: #ffffff;
}

#three-hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-animated-bg {
    display: none;
}

.hero-content {
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    width: 30%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 50%, #dee2e6 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

#three-stats-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

.stats .container {
    position: relative;
    z-index: 2;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: statsShimmer 8s ease-in-out infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-item {
    padding: 40px 30px;
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    transition: left 0.6s ease;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.stat-item:hover::before {
    left: 100%;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #00ffff;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 1), 0 4px 12px rgba(0, 0, 0, 1), 0 8px 25px rgba(0, 0, 0, 0.8);
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    border-radius: 2px;
    transition: width 0.8s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.stat-item.animate .stat-number::after {
    width: 80%;
}

.stat-number.counting {
    animation: countingPulse 0.1s ease-in-out;
}

.stat-label {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

.stat-item:hover .stat-label {
    opacity: 1;
}

/* Services Section */
.services {
    padding: 120px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    position: relative;
    overflow: hidden;
}

#three-services-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

.services .container {
    position: relative;
    z-index: 2;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e9ecef 50%, transparent 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 0;
    border-radius: 8px;
    text-align: left;
    position: relative;
    border: 1px solid #dee2e6;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.service-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.9) contrast(1.1);
}

.service-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0.7;
    transition: all 0.5s ease;
}

.service-content {
    padding: 35px 30px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid #212529;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #212529;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #212529;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

.service-card p {
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.service-card:hover h3 {
    color: #495057;
    font-weight: 700;
}

.service-card:hover p {
    color: #343a40;
    font-weight: 500;
}

.service-link {
    display: inline-flex;
    align-items: center;
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.service-card:hover .service-link {
    opacity: 1;
    transform: translateY(0);
    color: #495057;
    font-weight: 600;
}

.service-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.2s ease;
}

/* About Section */
.about {
    background-color: #f8f9fa;
    color: #212529;
    padding: 100px 0;
}

.about .section-title {
    color: #212529;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    opacity: 0.9;
}

.company-info {
    background-color: #e9ecef;
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
}

.company-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.company-info p {
    margin-bottom: 10px;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    padding: 100px 0;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #6c757d;
    line-height: 1.8;
}

/* Animations */
@keyframes gridShift {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    50% {
        transform: translate(20px, 20px);
        opacity: 0.1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes progressShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes vPulse {
    0%, 100% {
        transform: rotate(-25deg) translateX(-15px) scaleY(1);
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(224, 224, 224, 0.5);
    }
    50% {
        transform: rotate(-25deg) translateX(-15px) scaleY(1.3);
        opacity: 1;
        box-shadow: 0 0 40px rgba(224, 224, 224, 0.8);
    }
}

@keyframes vPulseRight {
    0%, 100% {
        transform: rotate(25deg) translateX(15px) scaleY(1);
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(224, 224, 224, 0.5);
    }
    50% {
        transform: rotate(25deg) translateX(15px) scaleY(1.3);
        opacity: 1;
        box-shadow: 0 0 40px rgba(224, 224, 224, 0.8);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(80px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(80px) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes statsShimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

@keyframes countingPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }
}

/* Animation classes */
.catchphrase-line.animate {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.sub-message.animate {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.v-loader.animate {
    opacity: 1;
    transform: scale(1);
    animation: scaleIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.loading-progress.animate {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .catchphrase-text {
        font-size: 2rem;
    }
    
    .company-name .catchphrase-text {
        font-size: 2.5rem;
    }
    
    .sub-text {
        font-size: 0.9rem;
    }
    
    .catchphrase-container {
        margin-bottom: 40px;
    }
    
    .sub-message {
        margin-bottom: 60px;
    }
    
    .hero {
        justify-content: center;
        text-align: center;
        padding: 40px 20px;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 20px;
        z-index: 3;
        position: relative;
        left: 0;
        top: auto;
        width: 100%;
        height: auto;
        backdrop-filter: blur(3px);
        background: rgba(0, 0, 0, 0.2);
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
        justify-content: initial;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
        white-space: normal;
        overflow: visible;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .service-card {
        padding: 0;
        margin-bottom: 30px;
    }
    
    .service-card:hover {
        transform: none;
        box-shadow: none;
        border-bottom-color: #000000;
    }
    
    .service-image-container {
        height: 200px;
    }
    
    .service-content {
        padding: 25px 20px 30px;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .catchphrase-text {
        font-size: 2rem;
    }
    
    .company-name .catchphrase-text {
        font-size: 2.5rem;
    }
    
    .sub-text {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .hero-title {
        font-size: 1.8rem;
        white-space: normal;
        overflow: visible;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
}