/*
Theme Name: design-archi-webrex
Theme URI: https://webrex.ma
Author: webrex.ma
Author URI: https://webrex.ma
Description: Un thème WordPress moderne et élégant pour cabinet d'architecture
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: intero-design
Tags: architecture, interior-design, portfolio, one-page, custom-menu
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
  --color-primary: #CDA274;
  --color-secondary: #1A1A2E;
  --color-text: #4A4A4A;
  --color-white: #FFFFFF;
  --color-light-bg: #F4F0EC;
  --color-accent: #CDA274;
  --color-dark: #0D0D1E;
  --font-primary: 'Gotham', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Playfair Display', Georgia, serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-secondary);
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 35px;
  border-radius: 18px;
  font-family: var(--font-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-text);
  line-height: 1.8;
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
}

.text-highlight {
  color: var(--color-primary);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

/* Logo Styles */
.site-logo {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-image {
  height: 50px;
  width: auto;
  max-width: 250px;
  display: block;
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-image {
  transform: scale(1.05);
}

/* Fallback for text logo */
.logo-icon {
  color: var(--color-primary);
  width: 28px;
  height: 28px;
}

.logo-text {
  line-height: 1;
  font-family: var(--font-primary);
  font-size: 28px;
  color: var(--color-secondary);
  font-weight: 600;
}

/* Main Navigation */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 35px;
  align-items: center;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--color-secondary);
  font-size: 15px;
  font-weight: 400;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-menu li.current-menu-item > a {
  color: var(--color-primary);
}

/* Dropdown Arrow */
.nav-menu .menu-item-has-children > a::after {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 10px;
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.nav-menu .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 15px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li {
  display: block;
}

.nav-menu .sub-menu a {
  padding: 10px 25px;
  display: block;
  font-size: 14px;
}

.nav-menu .sub-menu a:hover {
  background: var(--color-light-bg);
  color: var(--color-primary);
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-shrink: 0;
}

/* Phone Section */
.header-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 25px;
  border-right: 1px solid rgba(41, 47, 54, 0.1);
}

.header-phone .fa-phone-alt {
  color: var(--color-primary);
  font-size: 18px;
}

.phone-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.phone-label {
  font-size: 12px;
  color: var(--color-text);
}

.phone-number {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-secondary);
}

.phone-number:hover {
  color: var(--color-primary);
}

/* Get A Quote Button */
.btn-quote {
  background: var(--color-primary);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(205, 162, 116, 0.3);
  transition: all 0.3s ease;
}

.btn-quote:hover {
  background: #B8906A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(205, 162, 116, 0.4);
}

/* Header Icon Buttons */
.header-search-toggle,
.header-grid-toggle {
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.header-search-toggle:hover,
.header-grid-toggle:hover {
  color: var(--color-primary);
  background: var(--color-light-bg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-secondary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

body.menu-open {
  overflow: hidden;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(41, 47, 54, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-content {
  position: relative;
  width: 90%;
  max-width: 700px;
}

.search-close {
  position: absolute;
  top: -60px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.search-close:hover {
  transform: rotate(90deg);
}

.search-form {
  position: relative;
}

.search-field {
  width: 100%;
  padding: 20px 70px 20px 30px;
  font-size: 24px;
  border: none;
  border-radius: 50px;
  background: white;
  color: var(--color-secondary);
  outline: none;
}

.search-field::placeholder {
  color: var(--color-text);
  opacity: 0.5;
}

.search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-submit:hover {
  background: var(--color-secondary);
  transform: translateY(-50%) scale(1.05);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 80px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  color: var(--color-white);
}

.hero-title {
  font-size: 72px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--color-white);
}

.hero-description {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  background-color: var(--color-white);
  padding: 100px 0;
}

.features-header {
  text-align: center;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.feature-card {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--color-primary);
}

.feature-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--color-secondary);
}

.feature-description {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.7;
}

/* ==========================================================================
   Dark Section
   ========================================================================== */

.dark-section {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 100px 0;
}

.dark-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.dark-section-content h2 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.dark-section-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  line-height: 1.8;
}

.dark-section-image {
  border-radius: 20px;
  overflow: hidden;
}

.dark-section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  padding: 100px 0;
  background-color: var(--color-light-bg);
}

.services-header {
  text-align: center;
  margin-bottom: 60px;
}

.services-list {
  background: var(--color-white);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 60px;
}

.service-item {
  padding: 25px 0;
  border-bottom: 1px solid #E5E5E5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item:hover {
  padding-left: 20px;
}

.service-item h3 {
  font-size: 24px;
  color: var(--color-secondary);
}

.service-arrow {
  color: var(--color-primary);
  font-size: 24px;
  transition: transform 0.3s ease;
}

.service-item.active .service-arrow {
  transform: rotate(90deg);
}

.service-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0;
}

.service-content.active {
  max-height: 300px;
  padding: 0 0 25px 0;
}

.service-content p {
  color: #4D5053;
  line-height: 1.8;
  font-size: 16px;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.stat-card {
  text-align: center;
  padding: 30px;
  background: var(--color-white);
  border-radius: 20px;
  border: 1px solid #E5E5E5;
}

.stat-number {
  font-size: 72px;
  color: var(--color-primary);
  font-family: var(--font-primary);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 18px;
  color: var(--color-text);
}

/* ==========================================================================
   Portfolio/Gallery Section
   ========================================================================== */

.portfolio-section {
  padding: 100px 0;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 60px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: var(--color-white);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-category {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: var(--color-primary);
}

.portfolio-title {
  font-size: 24px;
  color: var(--color-white);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  position: relative;
  padding: 150px 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
}

.cta-content h2 {
  font-size: 64px;
  color: var(--color-white);
  margin-bottom: 30px;
}

.cta-content p {
  font-size: 20px;
  margin-bottom: 40px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 80px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  color: var(--color-white);
  font-size: 24px;
  margin-bottom: 20px;
}

.footer-widget p,
.footer-widget a {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.footer-widget a:hover {
  color: var(--color-primary);
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: 10px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
  .header-phone {
    display: none;
  }

  .nav-menu {
    gap: 25px;
  }
}

@media (max-width: 992px) {
  .header-search-toggle,
  .header-grid-toggle {
    display: none;
  }

  .btn-quote {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 12px 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .btn-quote {
    display: none;
  }

  .main-navigation {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  }

  .main-navigation.active {
    left: 0;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: flex-start;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--color-light-bg);
  }

  .nav-menu a {
    padding: 15px 0;
    width: 100%;
  }

  .nav-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu .menu-item-has-children.active > .sub-menu {
    max-height: 500px;
    padding: 10px 0 10px 20px;
  }

  .nav-menu .sub-menu a {
    padding: 10px 0;
  }

  .logo-link {
    font-size: 24px;
  }

  .logo-icon {
    width: 24px;
    height: 24px;
  }

  .hero-title {
    font-size: 42px;
  }

  .section-title {
    font-size: 36px;
  }

  .dark-section-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .search-field {
    font-size: 18px;
    padding: 15px 60px 15px 20px;
  }

  .search-submit {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* ==========================================================================
   Portfolio Grid Overlay
   ========================================================================== */

.portfolio-overlay-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.portfolio-overlay-menu.active {
  opacity: 1;
  visibility: visible;
}

.portfolio-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-overlay-header h2 {
  font-family: var(--font-primary);
  font-size: 36px;
  color: white;
  margin: 0;
}

.portfolio-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.portfolio-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.portfolio-overlay-content {
  padding: 50px;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-grid-overlay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.portfolio-overlay-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-overlay-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(205, 162, 116, 0.3);
}

.portfolio-overlay-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.portfolio-overlay-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 30px 20px 20px;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.portfolio-overlay-item:hover .portfolio-overlay-info {
  transform: translateY(0);
}

.portfolio-overlay-info h3 {
  font-family: var(--font-primary);
  font-size: 20px;
  color: white;
  margin: 0 0 5px 0;
}

.portfolio-overlay-info p {
  font-size: 14px;
  color: var(--color-primary);
  margin: 0;
}

.portfolio-overlay-footer {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.overlay-open {
  overflow: hidden;
}

/* Responsive Portfolio Overlay */
@media (max-width: 992px) {
  .portfolio-grid-overlay {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .portfolio-overlay-header {
    padding: 20px 30px;
  }
  
  .portfolio-overlay-header h2 {
    font-size: 28px;
  }
  
  .portfolio-overlay-content {
    padding: 30px 20px;
  }
}

@media (max-width: 576px) {
  .portfolio-grid-overlay {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .portfolio-overlay-header {
    padding: 15px 20px;
  }
  
  .portfolio-overlay-header h2 {
    font-size: 24px;
  }
  
  .portfolio-overlay-content {
    padding: 20px 15px;
  }
  
  .portfolio-close {
    font-size: 24px;
    width: 40px;
    height: 40px;
  }
}

