/* CSS Variables for consistent theming */
:root {
    --primary-color: #d76b3a;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*font-family: 'Hauora Sans', sans-serif;*/
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

html {
    scroll-behavior: smooth;
}

/* Background logos styling */
.background-logo {
    position: fixed;
    background-image: url('../images/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation: fadeInFadeOut 8s infinite;
    mix-blend-mode: multiply; /* So logos blend with background colors */
}

/* Background code image styling */
.background-code-image {
    position: fixed;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation: fadeInFadeOut 8s infinite;
    mix-blend-mode: multiply; /* So images blend with background colors */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes fadeInFadeOut {
    /* Sadece opacity değişsin, transform değişmesin */
    0% { opacity: 0; }
    15% { opacity: 0.025; }
    30% { opacity: 0.1; }
    45% { opacity: 0.05; }
    60% { opacity: 0.075; }
    80% { opacity: 0.025; }
    100% { opacity: 0; }
}

/* Header styling */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap between logo image and text */
}

.logo img {
    height: 60px;
    width: auto;
    max-width: 200px;
}

.logo-animation {
    /* Apply floating and tilting animation similar to other images */
    animation: float 6s ease-in-out infinite, tilt 8s ease-in-out infinite;
    transform-origin: center;
    display: block;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    /*font-family: 'Hauora Sans', sans-serif;*/
    font-family: 'Montserrat', sans-serif;
    margin: 0; /* Remove default margin */
}

.logo h1 span {
    color: var(--text-color);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700; /* Bold weight */
    /*font-family: 'Hauora Sans', sans-serif;*/
    font-family: 'Montserrat', sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background-color: rgba(232, 107, 65, 0.1);
}

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

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

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

/* Main container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    margin-top: 80px; /* Reduced desktop margin to eliminate excessive white space */
    position: relative;
    z-index: 10;
}

/* Adjust margin-top for tablets */
@media (max-width: 992px) and (min-width: 769px) {
    main {
        margin-top: 80px; /* Reduced margin for tablets to minimize space */
    }
}

/* Adjust margin-top for mobile devices */
@media (max-width: 768px) {
    main {
        margin-top: 100px; /* Adjusted for smaller mobile devices */
    }
}

@media (max-width: 480px) {
    main {
        margin-top: 90px; /* Adjusted for smallest mobile devices */
    }
}

/* Additional responsive adjustments for header and navigation */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        align-items: flex-start; /* Align to top when menu is open */
    }
    
    header {
        padding: 0.5rem 0;
    }
}

/* Hero section styling */
.hero {
    padding: 1rem 2rem 4rem; /* Reduced top padding to raise content */
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Parallax background element - will be handled via JavaScript */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%; /* Extra height to allow for parallax movement */
    background: url('images/parallax-bg.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    transform: translateZ(0);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.hero-text {
    flex: 1;
    padding-right: 2rem;
}

.hero-text h2 {
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
}

.hero-text ul {
    list-style: none;
    padding: 0;
}

.hero-text ul li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1.5rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
}

.hero-text ul li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

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

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    /* Floating and tilting animation */
    animation: float 6s ease-in-out infinite, tilt 8s ease-in-out infinite;
    transform-origin: center;
}

/* Secondary section styling */
.secondary {
    padding: 1rem 1rem;
    position: relative;
    overflow: hidden;
}

.secondary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.secondary-text {
    flex: 1;
    padding-left: 2rem;
}

/* In mobile view, make sure text appears above image */
@media (max-width: 992px) {
    .secondary-content {
        flex-direction: column;
    }
    
    .secondary-text {
        padding: 0 0 2rem 0;
        text-align: center;
        order: 1; /* Place text above image */
    }
    
    .secondary-image {
        order: 2; /* Place image below text */
        margin-bottom: 1rem;
    }
}

.secondary-text h2 {
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.secondary-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
}

.secondary-text ul {
    list-style: none;
    padding: 0;
}

.secondary-text ul li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1.5rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
}

.secondary-text ul li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

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

.secondary-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    /* Different floating and tilting animation for non-synchronization */
    animation: float-alt 7s ease-in-out infinite, tilt-alt 9s ease-in-out infinite;
    transform-origin: center;
}

/* Services section styling */
.services {
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
}

.services-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-column {
    flex: 1;
}

.service-column h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: rgba(0, 0, 0, 0.5); /* #000000 with 50% opacity as requested for upper texts */
    text-align: center;
}

.service-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-card {
    background-color: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.service-card h4 {
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
    font-size: 1rem;
}

/* Dialog styles */
/* Dialog animasyonları */
@keyframes overlayAppear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

/* Dialog styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: overlayAppear 0.3s ease-out;
}

.dialog-overlay.dialog-closing {
    animation: overlayDisappear 0.3s ease-out forwards;
}

.dialog {
    position: relative;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: dialogAppear 0.3s ease-out;
}

.dialog-overlay.dialog-closing .dialog {
    animation: dialogDisappear 0.3s ease-out forwards;
}

.dialog-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    padding: 0.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.dialog-content {
    padding: 1.5rem;
}

.dialog-content h4 {
    color: var(--primary-color);
    margin-top: 0;
}

.dialog-images {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.dialog-image {
    flex: 1;
    min-width: 200px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.dialog-description {
    margin: 1.5rem 0;
    line-height: 1.6;
}

.dialog-features {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.dialog-features li {
    margin-bottom: 0.5rem;
    color: rgba(0, 0, 0, 0.8);
}

/* Projects section styling */
.projects {
    padding: 4rem 2rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: block;
    cursor: pointer;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
    font-size: 1rem;
}

/* Contact section styling */
.contact {
    padding: 4rem 2rem;
}

.contact-container {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
    text-align: center;
}

.whatsapp-contact, .ai-agent {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
}

.whatsapp-contact h3, .ai-agent h3 {
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.whatsapp-contact p, .ai-agent p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.6); /* #000000 with 60% opacity */
}

.ai-agent-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.ai-agent-btn:hover {
    background-color: #d65a2f;
    transform: scale(1.05);
}

.contact-form {
    flex: 1;
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: var(--border-radius);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    color: rgba(0, 0, 0, 0.85); /* #000000 with 85% opacity */
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(232, 107, 65, 0.2);
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #d65a2f;
    transform: translateY(-2px);
}

/* Footer styling */
footer {
    background-color: var(--secondary-color);
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    color: var(--text-color);
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Tilt animation */
@keyframes tilt {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-1.5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(5px) rotate(1.5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Alternative floating animation for secondary image */
@keyframes float-alt {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(-1deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Alternative tilt animation for secondary image */
@keyframes tilt-alt {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    30% {
        transform: translateY(8px) rotate(1deg);
    }
    60% {
        transform: translateY(-6px) rotate(-1.2deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-content, .secondary-content {
        flex-direction: column;
    }
    
    .hero-text, .secondary-text {
        padding: 0 0 2rem 0;
        text-align: center;
    }
    
    .services-container {
        flex-direction: column;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info, .contact-form {
        width: 100%;
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.7rem;
        width: 100%;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero, .secondary, .services, .projects, .contact {
        padding: 2rem 1rem;
    }
    
    .project-card {
        width: 100%;
    }
}