/*
Theme Name: Coral Breeze
Theme URI: https://example.com/coral-breeze
Description: A vibrant and energetic magazine layout ideal for lifestyle blogs, travel content, and modern publications with bold visual storytelling.
Version: 1.0.0
Author: Theme Developer
Text Domain: coral-breeze
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root Variables */
:root {
  --primary-color: #FF6B6B;
  --secondary-color: #4ECDC4;
  --accent-color: #FFE66D;
  --background-color: #FEFEFE;
  --text-color: #2C3E50;
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Source Sans Pro', sans-serif;
}

/* Base Styles */
body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 6px;
  z-index: 999999;
  text-decoration: none;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
}

.skip-link:focus {
  left: 6px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

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

/* Header */
.site-header {
  background: var(--background-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  align-items: center;
}

.custom-logo {
  max-height: 50px;
  width: auto;
  margin-right: 15px;
}

.site-title {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--primary-color);
}

.site-description {
  color: var(--text-color);
  font-size: 0.9rem;
  margin: 0;
}

/* Navigation */
.main-navigation {
  position: relative;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  margin-right: 2rem;
}

.main-navigation a {
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  color: var(--secondary-color);
}

.menu-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
}

/* Category Navigation */
.category-navigation {
  background: var(--primary-color);
  padding: 0.75rem 0;
}

.category-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.category-nav-list li {
  margin: 0;
}

.category-nav-list a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: block;
}

.category-nav-list a:hover {
  background: var(--accent-color);
  color: var(--text-color);
}

/* Main Content */
.site-main {
  padding: 2rem 0;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* Magazine Layout */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.featured-post {
  grid-column: 1 / -1;
}

.post-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-categories {
  margin-bottom: 0.5rem;
}

.post-categories a {
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.5rem;
  display: inline-block;
}

.post-title {
  margin-bottom: 0.5rem;
}

.post-title a {
  color: var(--text-color);
}

.post-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-excerpt {
  color: #666;
  line-height: 1.6;
}

/* Single Post */
.single-post-header {
  margin-bottom: 2rem;
}

.single-post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #666;
}

.single-post-content {
  line-height: 1.8;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Sidebar */
.sidebar {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
}

.widget {
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

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

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.widget li:last-child {
  border-bottom: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: var(--text-color);
  text-decoration: none;
}

.pagination a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Search Form */
.search-form {
  display: flex;
  margin-bottom: 1rem;
}

.search-field {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.search-submit {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 1rem;
}

.search-submit:hover {
  background: var(--secondary-color);
}

/* Footer */
.site-footer {
  background: var(--text-color);
  color: white;
  padding: 1rem 0;
  text-align: center;
  margin-top: 3rem;
}

.footer-copyright {
  font-size: 0.9rem;
}

/* 404 Page */
.error-404 {
  text-align: center;
  padding: 4rem 0;
}

.error-404 h1 {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-navigation ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
  }
  
  .main-navigation ul.show {
    display: flex;
  }
  
  .main-navigation li {
    margin: 0.5rem 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .category-nav-list {
    justify-content: center;
  }
  
  .content-area {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .single-post-title {
    font-size: 2rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .site-title {
    font-size: 1.5rem;
  }
  
  .category-nav-list a {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .post-content {
    padding: 1rem;
  }
  
  .single-post-title {
    font-size: 1.75rem;
  }
}

/* Elementor Compatibility */
.elementor-page .site-main {
  padding: 0;
}

/* Accessibility */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}