/*
Theme Name: WebDesign Pro
Theme URI: https://yourcompany.com
Author: Your Name
Author URI: https://yourcompany.com
Description: A clean, modern theme for web design agencies. Elementor & WooCommerce ready.
Version: 1.0.0
License: GPL v2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webdesign-pro
Tags: custom-logo, custom-colors, custom-menu, featured-images, full-width-template, theme-options, woocommerce, elementor
*/

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #06b6d4;
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
  --light-gray: #e2e8f0;
  --white: #ffffff;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --container: 1200px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-light {
  background-color: var(--light);
}

.section-dark {
  background-color: var(--dark);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary);
}

.btn-white:hover {
  background-color: var(--light);
  color: var(--primary-dark);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo a:hover {
  color: var(--primary);
}

.site-logo img {
  max-height: 40px;
  width: auto;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--dark);
  transition: var(--transition);
}

/* ============================================
   HERO SECTION (Default)
   ============================================ */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--white);
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
  text-align: center;
  border-bottom: 1px solid var(--light-gray);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--gray);
}

.breadcrumbs a {
  color: var(--gray);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.site-content {
  padding: 4rem 0;
  min-height: 50vh;
}

.content-area {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* For pages with sidebar */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  align-items: start;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

/* ============================================
   BLOG / POSTS
   ============================================ */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.post-title a {
  color: var(--dark);
}

.post-title a:hover {
  color: var(--primary);
}

.post-excerpt {
  color: var(--gray);
  font-size: 0.95rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Single Post */
.single-post .entry-header {
  margin-bottom: 2rem;
}

.single-post .entry-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.single-post .entry-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--gray);
  font-size: 0.9rem;
}

.single-post .entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
  margin-top: 2.5rem;
}

.single-post .entry-content img {
  border-radius: var(--radius);
  margin: 2rem 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.widget-area {
  position: sticky;
  top: 100px;
}

.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}

.widget-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--light-gray);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-gray);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--dark);
}

.widget a:hover {
  color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 0;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-widget h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 0.75rem;
}

.footer-widget a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-widget a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================
   FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ============================================
   WORDPRESS DEFAULTS
   ============================================ */
.alignleft {
  float: left;
  margin-right: 1.5rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.wp-caption {
  max-width: 100%;
}

.sticky {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius);
}

.gallery-caption,
.bypostauthor {
  display: block;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--light-gray);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  text-align: center;
  padding: 6rem 0;
}

.error-404 h1 {
  font-size: 6rem;
  color: var(--primary);
  line-height: 1;
}

/* ============================================
   WOOCOMMERCE BASIC STYLES
   ============================================ */
.woocommerce .content-area {
  max-width: var(--container);
}

.woocommerce-page .site-content {
  padding-top: 6rem;
}

.woocommerce .products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.woocommerce .product {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}

.woocommerce .product:hover {
  box-shadow: var(--shadow-lg);
}

.woocommerce .product img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.woocommerce .product .woocommerce-loop-product__title {
  padding: 1rem 1.5rem 0;
  font-size: 1.1rem;
}

.woocommerce .product .price {
  padding: 0 1.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.woocommerce .product .button {
  margin: 1rem 1.5rem 1.5rem;
  width: calc(100% - 3rem);
  text-align: center;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.woocommerce .product .button:hover {
  background: var(--primary-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  
  .widget-area {
    position: static;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero {
    padding: 7rem 0 4rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .header-inner {
    height: 70px;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: 1.5rem;
    transform: translateY(-150%);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .btn {
    width: 100%;
  }
}
