/*
Theme Name: Marta Theme
Theme URI: https://marta.ravnalo.xyz
Author: Your Name
Author URI: https://ravnalo.xyz
Description: A modern, clean WordPress theme compatible with page builders like Elementor
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marta-theme
Tags: blog, custom-menu, e-commerce, featured-images, flexible-header, full-width-template, rtl-language-support, theme-options, translation-ready
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
  --primary-color: #1a3a52;      /* Deep navy blue - maritime */
  --secondary-color: #2874a6;    /* Ocean blue */
  --accent-color: #d4a574;       /* Teak wood color */
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --background: #fff;
  --background-alt: #f8f9fa;
  --background-dark: #32373c;
  --border-color: #e0e0e0;
  --max-width: 1200px;
  --content-width: 800px;
  --spacing: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

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: 1rem; }

p {
  margin: 0 0 1.5rem;
}

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

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

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

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

.site-branding .custom-logo {
  max-height: 50px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
}

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

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

.main-navigation a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

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

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

.site-main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

.site-footer {
  background: var(--background-alt);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-light);
}

/* ==========================================================================
   Content
   ========================================================================== */

.entry-content {
  margin: 2rem 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
}

.entry-header {
  margin-bottom: 2rem;
}

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

.entry-meta {
  color: var(--text-light);
  font-size: 0.9rem;
}

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

/* Full width template */
.full-width .site-main {
  max-width: 100%;
  padding: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .site-header .container {
    position: relative;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--background);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 5rem 2rem 2rem;
  }

  .main-navigation.active {
    right: 0;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
  }

  .main-navigation a {
    display: block;
    font-size: 1.125rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */

.btn, .wp-block-button__link {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--background-dark);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover, .wp-block-button__link:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-primary {
  background: var(--secondary-color);
}

.btn-primary:hover {
  background: var(--primary-color);
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 8rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn {
  margin: 0.5rem;
}

/* ==========================================================================
   Services/Products Section
   ========================================================================== */

.services {
  padding: 4rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.service-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  transform: translateY(-8px);
  border-color: var(--secondary-color);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  padding: 4rem 0;
  background: var(--background-alt);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  background: var(--background);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gallery-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

.gallery-item a {
  display: block;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.gallery-item h3 a {
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 0;
}

.gallery-item h3 a:hover {
  color: var(--secondary-color);
}

.gallery-item p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================================================
   About/Info Section
   ========================================================================== */

.about {
  padding: 4rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-content img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact {
  padding: 4rem 0;
  background: var(--primary-color);
  color: #fff;
  text-align: center;
}

.contact h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.contact p {
  margin-bottom: 2rem;
  opacity: 0.95;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.contact-item {
  text-align: center;
}

.contact-item svg, .contact-item i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

/* ==========================================================================
   WordPress Blocks Support
   ========================================================================== */

.wp-block-group {
  margin-bottom: 2rem;
}

.wp-block-columns {
  display: flex;
  gap: 2rem;
}

.wp-block-column {
  flex: 1;
}

.alignwide {
  max-width: var(--max-width);
}

.alignfull {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* ==========================================================================
   Responsive Updates
   ========================================================================== */

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.5rem;
  }

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

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .contact-info {
    flex-direction: column;
    gap: 1.5rem;
  }

  .wp-block-columns {
    flex-direction: column;
  }
}
