/* ===== ROOT & VARIABLES ===== */
:root {
    --primary: #8b5cf6;
    --secondary: #06b6d4;
    --accent: #6366f1;
    --bg-dark: #f8f9fa;
    --bg-darker: #ffffff;
    --text-light: #1a1a1a;
    --text-muted: #6b7280;
    --border-color: rgba(139, 92, 246, 0.15);
    --glassmorphism: rgba(255, 255, 255, 0.8);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== PARTICLE MESH BACKGROUND ===== */
.particle-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: url('data:image/svg+xml,<svg width="50" height="50" xmlns="http://www.w3.org/2000/svg"><defs><filter id="blur"><feGaussianBlur in="SourceGraphic" stdDeviation="1"/></filter></defs><circle cx="25" cy="25" r="1" fill="rgba(139,92,246,0.08)" filter="url(%23blur)"/></svg>') repeat;
    opacity: 0.5;
    animation: particleShift 20s linear infinite;
}

@keyframes particleShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

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

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 99;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.mobile-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    padding: 10px;
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--primary);
    padding-left: 20px;
}

/* ===== TELEGRAM SECTION ===== */
.telegram-section {
    padding: 120px 0 80px;
    position: relative;
    z-index: 2;
    margin-top: 70px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.telegram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.telegram-card {
    background: var(--glassmorphism);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.telegram-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.telegram-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.12);
}

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

/* ===== TELEGRAM WIDGET STYLING ===== */
.tg-post-content {
    width: 100%;
    position: relative;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    min-height: 280px;
}

.tg-post-content iframe {
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 280px !important; /* Forces optimal height for sekadayiz posts, preventing clipping and empty space */
    border-radius: 12px;
    background: transparent;
    transition: opacity 0.4s ease;
}

/* Telegram Loader spinner */
.tg-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 13px;
    width: 100%;
}

.tg-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: tg-spin 1s infinite linear;
}

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

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.hero-profile {
    display: flex;
    justify-content: center;
}

.profile-card {
    background: var(--glassmorphism);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.profile-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.12);
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid var(--primary);
    flex-shrink: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.profile-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-icon {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.about-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--glassmorphism);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--glassmorphism);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.12);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.service-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== WORKS SECTION ===== */
.works-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.work-card {
    background: var(--glassmorphism);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.work-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(139, 92, 246, 0.12);
}

.work-image {
    overflow: hidden;
    height: 200px;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.work-card:hover .work-image img {
    transform: scale(1.05);
}

.work-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 20px 20px 12px;
}

.work-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 20px 16px;
    line-height: 1.6;
}

.work-link {
    display: inline-block;
    margin: 0 20px 20px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.work-link:hover {
    color: var(--secondary);
    transform: translateX(3px);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    background: var(--glassmorphism);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
}

.contact-form button {
    margin-top: 10px;
}

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 2;
}

/* ===== SCROLL ANIMATION ===== */
.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 0;
}

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

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1200px) */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .telegram-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 36px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .about-content h2 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu.active {
        display: flex;
    }

    .telegram-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .about-content h2 {
        font-size: 28px;
    }

    .telegram-section {
        padding: 80px 0 60px;
    }

    .hero-section,
    .about-section,
    .services-section,
    .works-section,
    .contact-section {
        padding: 60px 0;
    }
}

/* Mobile (480px - 768px) */
@media (max-width: 600px) {
    .logo {
        font-size: 20px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .about-content h2,
    .section-title {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .nav-container {
        height: 60px;
        padding: 0 15px;
    }

    .mobile-menu {
        top: 60px;
    }

    .service-card,
    .stat-card {
        padding: 20px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 12px 14px;
        font-size: 16px;
    }
}

/* iPhone 14 Optimization (390px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .hero-content h1 {
        font-size: 22px;
        line-height: 1.1;
    }

    .about-content h2 {
        font-size: 20px;
    }

    .telegram-card,
    .profile-card,
    .service-card {
        padding: 16px;
    }

    .post-content {
        font-size: 13px;
    }

    .cta-buttons {
        gap: 10px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 13px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .work-card h3,
    .service-card h3 {
        font-size: 14px;
    }

    .about-content p,
    .work-card p,
    .service-card p {
        font-size: 13px;
    }

    .social-links {
        gap: 8px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }
}

/* Küçük ekranlar (<385px) */
@media (max-width: 385px) {
    .logo {
        font-size: 18px;
    }

    .telegram-grid {
        gap: 16px;
    }

    .telegram-card {
        padding: 14px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 25px;
    }

    .hero-content h1 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .post-header {
        gap: 10px;
    }

    .channel-avatar {
        width: 36px;
        height: 36px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 12px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}
