/* ============================================
   HTMLTemplates.com.tr - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --dark-bg: #1f2937;
  --dark-text: #111827;
  --light-bg: #f9fafb;
  --light-text: #6b7280;
  --light-border: #e5e7eb;
  --white: #ffffff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-text);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: 1rem;
  color: var(--light-text);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  position: sticky;
  top: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--dark-text);
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-text);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--light-bg);
  color: var(--dark-text);
  border: 2px solid var(--light-border);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
  padding: 6rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  color: var(--dark-text);
  margin-bottom: 1.5rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--light-text);
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-image {
  margin-top: 3rem;
  max-width: 100%;
  height: auto;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--light-border);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--light-bg), var(--primary-light));
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-text);
}

.card-description {
  color: var(--light-text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.card-footer {
  display: flex;
  gap: 0.5rem;
}

.card-footer .btn {
  flex: 1;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
  background: var(--light-bg);
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-content h3 {
  margin-bottom: 0.5rem;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials {
  background: var(--dark-bg);
  color: var(--white);
}

.testimonials h2 {
  color: var(--white);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  border-radius: 0.75rem;
}

.testimonial-text {
  margin-bottom: 1.5rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.testimonial-author {
  font-weight: 600;
}

.testimonial-role {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.stars {
  color: #fbbf24;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 4rem 2rem;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.newsletter-form button {
  padding: 0.75rem 2rem;
  background: var(--white);
  color: var(--primary-color);
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--light-bg);
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--light-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 4rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--light-text);
}

.text-primary {
  color: var(--primary-color);
}

.bg-light {
  background: var(--light-bg);
}

.bg-dark {
  background: var(--dark-bg);
}

.text-white {
  color: var(--white);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  section {
    padding: 3rem 1rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form button {
    width: 100%;
  }

  .footer-content {
    gap: 2rem;
  }

  .feature-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }

  section {
    padding: 2.5rem 1rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FILTER STYLES
   ============================================ */

.filter-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--light-border);
  background: var(--white);
  color: var(--dark-text);
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: var(--white);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--light-text);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ============================================
   TEMPLATE DETAIL STYLES
   ============================================ */

.template-hero {
  background: var(--light-bg);
  padding: 3rem 2rem;
}

.template-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.template-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.template-features {
  margin: 2rem 0;
}

.template-features h3 {
  margin-bottom: 1rem;
}

.template-features ul {
  list-style: none;
}

.template-features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--light-text);
}

.template-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.template-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.template-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-free {
  background: #10b981;
}

.badge-tech {
  background: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid var(--light-border);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.success-message {
  padding: 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ============================================
   FAQ STYLES
   ============================================ */

.faq-section {
  margin-bottom: 3rem;
}

.faq-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.faq-item {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--light-border);
  border-radius: 0.75rem;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.faq-item h3 {
  margin-bottom: 0.75rem;
  color: var(--dark-text);
  font-size: 1.1rem;
  cursor: pointer;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--light-text);
  line-height: 1.7;
}
