/* Hexagon Constructions - Custom Styles */

/* Root Variables */
:root {
    --primary-color: #d97706;
    --primary-dark: #b45309;
    --secondary-color: #1f2937;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Navigation Styles */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Hero Section Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    animation: kenburns 25s ease-out infinite;
}

.carousel-slide.active {
    opacity: 1;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.2);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.5s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 1s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

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

/* Portfolio Items */
.portfolio-item {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    display: none;
}

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

/* Filter Buttons */
.filter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Timeline Process */
.timeline-step {
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInFromLeft 0.8s ease forwards;
}

.timeline-step:nth-child(even) {
    transform: translateX(50px);
    animation: slideInFromRight 0.8s ease forwards;
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contact Form */
#contact-form input,
#contact-form textarea,
#contact-form select {
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

/* Button Hover Effects */
button, .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before, .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Image Gallery Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    /* Mobile Typography */
    body {
        font-size: 14px;
    }
    
    /* Reduce padding on mobile */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Mobile navigation */
    #navbar {
        padding: 0.75rem 0;
    }
    
    /* Hero adjustments */
    #home {
        min-height: 100vh;
        padding: 1rem;
    }
    
    /* Card hover effects disabled on mobile */
    .service-card:hover,
    .portfolio-item:hover {
        transform: none;
    }
    
    /* Timeline optimization */
    .timeline-step {
        transform: translateX(0) !important;
    }
    
    /* Process section mobile */
    .process-step h3 {
        font-size: 0.875rem;
    }
    
    /* Ensure touch targets are large enough */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Optimize form inputs for mobile */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Disable animations on mobile for performance */
    .animate-fade-in,
    .animate-fade-in-delay,
    .animate-fade-in-delay-2 {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    nav, footer, #contact {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Text Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Overlay Effects */
.overlay {
    position: relative;
    overflow: hidden;
}

.overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay:hover::before {
    opacity: 1;
}

/* WhatsApp Button Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-pulse {
    animation: pulse 2s infinite;
}