/*
Theme Name: AAA Financial Services
Theme URI: https://aaafinancials.ch
Description: Custom theme for AAA Financial Services - Swiss Independent Financial Advisory
Author: AAA Financial Services
Version: 1.0.0
Template: astra
Text Domain: aaa-financial
*/

:root {
  --aaa-navy: #012944;
  --aaa-silver: #AAABAB;
  --aaa-petrol: #0D3F53;
  --aaa-white: #FFFFFF;
  --aaa-light-bg: #F8F9FA;
  --aaa-dark-text: #1A1A1A;
  --aaa-gradient: linear-gradient(135deg, #012944 0%, #0D3F53 100%);
}

/* Global Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--aaa-dark-text);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--aaa-navy);
  font-weight: 700;
}

/* Header */
.ast-primary-header-bar {
  background: var(--aaa-gradient) !important;
  border-bottom: 3px solid var(--aaa-petrol) !important;
}

.ast-site-title-wrap a {
  color: var(--aaa-white) !important;
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.ast-header-break-point .ast-site-title-wrap a {
  font-size: 1.3rem !important;
}

/* Navigation */
.ast-nav-menu a,
.main-header-menu a {
  color: rgba(255,255,255,0.9) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.3s ease !important;
}

.ast-nav-menu a:hover,
.main-header-menu a:hover {
  color: var(--aaa-white) !important;
  background: rgba(255,255,255,0.1) !important;
}

.ast-nav-menu .current-menu-item > a {
  color: var(--aaa-white) !important;
  border-bottom: 2px solid var(--aaa-white);
}

/* Sub-menu */
.ast-nav-menu .sub-menu {
  background: var(--aaa-navy) !important;
  border-top: 3px solid var(--aaa-petrol) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
}

.ast-nav-menu .sub-menu a {
  font-size: 0.85rem !important;
  text-transform: none !important;
  padding: 10px 20px !important;
}

/* Buttons */
.wp-block-button__link,
.aaa-btn,
a.aaa-btn {
  background: var(--aaa-gradient) !important;
  color: var(--aaa-white) !important;
  border: none !important;
  padding: 14px 36px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-block;
  cursor: pointer;
}

.wp-block-button__link:hover,
.aaa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(1,41,68,0.4) !important;
  opacity: 0.95;
}

.aaa-btn-outline {
  background: transparent !important;
  border: 2px solid var(--aaa-white) !important;
  color: var(--aaa-white) !important;
}

/* Hero Section */
.aaa-hero {
  background: var(--aaa-gradient);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.aaa-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom;
  background-size: cover;
}

.aaa-hero h1 {
  color: var(--aaa-white);
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.aaa-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 30px;
}

/* Section Styles */
.aaa-section {
  padding: 80px 0;
}

.aaa-section-light {
  background: var(--aaa-light-bg);
}

.aaa-section-dark {
  background: var(--aaa-navy);
  color: var(--aaa-white);
}

.aaa-section-dark h2,
.aaa-section-dark h3 {
  color: var(--aaa-white);
}

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

.aaa-section-title {
  text-align: center;
  margin-bottom: 50px;
}

.aaa-section-title h2 {
  font-size: 2.4rem;
  margin-bottom: 15px;
}

.aaa-section-title p {
  color: var(--aaa-silver);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.aaa-section-title .aaa-line {
  width: 60px;
  height: 3px;
  background: var(--aaa-petrol);
  margin: 15px auto 0;
}

/* Service Cards Grid */
.aaa-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.aaa-service-card {
  background: var(--aaa-white);
  border-radius: 12px;
  padding: 35px 30px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #E8E8E8;
  position: relative;
  overflow: hidden;
}

.aaa-service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--aaa-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.aaa-service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(1,41,68,0.12);
}

.aaa-service-card:hover::before {
  transform: scaleX(1);
}

.aaa-service-card .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}

.aaa-service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.aaa-service-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

.aaa-service-card a {
  color: var(--aaa-petrol);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  transition: all 0.3s ease;
}

.aaa-service-card a:hover {
  color: var(--aaa-navy);
  transform: translateX(5px);
}

/* Stats Section */
.aaa-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  padding: 50px 0;
}

.aaa-stat h3 {
  font-size: 2.8rem;
  color: var(--aaa-white);
  margin-bottom: 8px;
}

.aaa-stat p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* About Section */
.aaa-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.aaa-about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.aaa-about-text p {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.8;
}

.aaa-about-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.aaa-about-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Advantages */
.aaa-advantages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.aaa-advantage {
  text-align: center;
  padding: 30px;
}

.aaa-advantage .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.aaa-advantage h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.aaa-advantage p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* CTA Section */
.aaa-cta {
  background: var(--aaa-gradient);
  padding: 80px 0;
  text-align: center;
}

.aaa-cta h2 {
  color: var(--aaa-white);
  font-size: 2.4rem;
  margin-bottom: 20px;
}

.aaa-cta p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Blog Cards */
.aaa-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.aaa-blog-card {
  background: var(--aaa-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #E8E8E8;
}

.aaa-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(1,41,68,0.12);
}

.aaa-blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.aaa-blog-card-content {
  padding: 25px;
}

.aaa-blog-card .category {
  color: var(--aaa-petrol);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.aaa-blog-card h3 {
  font-size: 1.15rem;
  margin: 10px 0;
  line-height: 1.4;
}

.aaa-blog-card h3 a {
  color: var(--aaa-navy);
  text-decoration: none;
}

.aaa-blog-card h3 a:hover {
  color: var(--aaa-petrol);
}

/* Contact Section */
.aaa-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.aaa-contact-info {
  padding: 40px;
  background: var(--aaa-navy);
  border-radius: 12px;
  color: var(--aaa-white);
}

.aaa-contact-info h3 {
  color: var(--aaa-white);
  margin-bottom: 20px;
}

.aaa-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.aaa-contact-item .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Footer */
.ast-footer {
  background: var(--aaa-navy) !important;
}

.site-footer {
  background: #011A2D;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 30px;
}

.aaa-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.aaa-footer-col h4 {
  color: var(--aaa-white);
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
}

.aaa-footer-col a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.aaa-footer-col a:hover {
  color: var(--aaa-white);
}

.aaa-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  text-align: center;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 992px) {
  .aaa-hero h1 { font-size: 2.4rem; }
  .aaa-about-grid { grid-template-columns: 1fr; }
  .aaa-stats { grid-template-columns: repeat(2, 1fr); }
  .aaa-advantages { grid-template-columns: 1fr; }
  .aaa-blog-grid { grid-template-columns: 1fr; }
  .aaa-contact-grid { grid-template-columns: 1fr; }
  .aaa-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .aaa-hero { padding: 60px 0 50px; min-height: auto; }
  .aaa-hero h1 { font-size: 2rem; }
  .aaa-section { padding: 50px 0; }
  .aaa-services-grid { grid-template-columns: 1fr; }
  .aaa-stats { grid-template-columns: 1fr; gap: 20px; }
  .aaa-footer-grid { grid-template-columns: 1fr; }
}

/* Elementor override - hide old content */
.elementor-section-wrap,
.elementor-element { display: block; }

/* WordPress admin bar fix */
.admin-bar .aaa-hero { margin-top: 0; }

/* Page template full width */
.aaa-page-template .site-content {
  max-width: 100%;
  padding: 0;
}

.aaa-page-template .entry-header,
.aaa-page-template .ast-article-single .entry-header {
  display: none;
}

.aaa-page-template .entry-content {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

/* Service page styles */
.aaa-page-header {
  background: var(--aaa-gradient);
  padding: 80px 0 60px;
  text-align: center;
}

.aaa-page-header h1 {
  color: var(--aaa-white);
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.aaa-page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Hide Elementor default content on pages with our template */
body.page .elementor {
  display: block;
}

/* Fix full-width layout - override Astra container */
.aaa-page-template #content,
.aaa-page-template .ast-container,
.aaa-page-template .site-content .ast-container,
.aaa-page-template article,
.aaa-page-template .entry-content,
.aaa-page-template .ast-article-single,
.aaa-page-template #primary {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

.aaa-page-template .site-main {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove Astra sidebar space */
.aaa-page-template .ast-separate-container .ast-article-single {
  padding: 0 !important;
  margin: 0 auto !important;
}

.aaa-page-template .ast-separate-container #primary {
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure hero and full-width sections go edge to edge */
.aaa-hero,
.aaa-section-dark,
.aaa-section-light,
.aaa-cta,
.aaa-section {
  width: 100vw !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}

/* Fix container inside full-width sections */
.aaa-hero .aaa-container,
.aaa-section .aaa-container,
.aaa-section-dark .aaa-container,
.aaa-section-light .aaa-container,
.aaa-cta .aaa-container,
.aaa-page-header .aaa-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hide Elementor content when our template is active */
.aaa-page-template .elementor {
  display: none !important;
}

/* CRITICAL: Override Astra container constraints */
#content.site-content > .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
}

body.page-template-homepage .ast-container,
body.page-template-about .ast-container,
body.page-template-contact .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
}

.aaa-page-template {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden;
}

/* Remove the 50vw trick - use simpler approach */
.aaa-hero,
.aaa-section-dark,
.aaa-section-light,
.aaa-cta,
.aaa-section,
.aaa-page-header,
.aaa-custom-footer {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  left: auto;
  right: auto;
  position: relative;
}

/* Also hide the site title in header since Astra builder might not show it */
.ast-site-header-content {
  background: transparent !important;
}

/* Hide default page title on our template pages */
.page-template-templates\/homepage .entry-title,
.page-template-templates\/about .entry-title,
.page-template-templates\/contact .entry-title,
.aaa-page-template .entry-title,
.aaa-page-template .entry-header,
.aaa-page-template .ast-article-single .entry-header {
  display: none !important;
}

/* Also hide the breadcrumb on our pages */
.aaa-page-template .ast-breadcrumbs-wrapper {
  display: none !important;
}
