/* About Page Custom Styles */

/* CRITICAL: Reset all problematic styles and force permanent centering */
.about-hero {
    /* Reset all positioning */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    translate: none !important;
    
    /* Force stable dimensions */
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 180px 0 100px !important;
    
    /* Force flex centering */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    
    /* Prevent movement */
    overflow: hidden !important;
    box-sizing: border-box !important;
    
    /* Background and appearance */
    background: #1a1a1a !important;
    color: #fff !important;
}

.about-hero .container {
    /* Reset all positioning */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    translate: none !important;
    
    /* Force stable dimensions */
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    
    /* Force flex centering */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    
    /* Prevent movement */
    box-sizing: border-box !important;
}

.about-hero h1 {
    /* Reset all positioning */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    translate: none !important;
    
    /* Force stable dimensions */
    width: 100% !important;
    margin: 0 auto !important;
    
    /* Force centering */
    text-align: center !important;
    display: block !important;
    
    /* Styling */
    color: #c69c6d !important;
    font-family: 'Bilbo Swash Caps', cursive !important;
}

.about-hero p {
    /* Reset all positioning */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    translate: none !important;
    
    /* Force stable dimensions */
    width: 100% !important;
    margin: 20px auto 0 !important;
    
    /* Force centering */
    text-align: center !important;
    display: block !important;
    
    /* Styling */
    font-family: 'Didact Gothic', sans-serif !important;
}

/* MOBILE: Override everything with ultra-specific rules */
@media screen and (max-width: 768px) {
    .about-hero {
        padding: 120px 15px 80px 15px !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    .about-hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .about-hero p {
        font-size: 1.2rem !important;
        max-width: 90% !important;
    }
}

/* EXTRA SMALL MOBILE: Even more constraints */
@media screen and (max-width: 576px) {
    .about-hero {
        padding: 100px 10px 60px 10px !important;
    }
    
    .about-hero h1 {
        font-size: 2rem !important;
    }
    
    .about-hero p {
        font-size: 1rem !important;
    }
}

/* Prevent layout jumping */
* {
    box-sizing: border-box;
}

/* Mobile stable class for additional enforcement */
.mobile-stable {
    position: relative !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

/* General Styles */
:root {
    --primary-color: #215F76;
    --primary-color-rgb: 33, 95, 118;
    --secondary-color: #6b4c35;
    --accent-color: #c69c6d;
    --dark-color: #333;
    --white: #ffffff;
    --gray-light: #f9f9f9;
}

/* Prevent layout shift during page load */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.section {
    padding: 80px 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.section-dark {
    background-color: #1a1a1a;
    color: #fff;
}

.section-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.section-light {
    background-color: #f9f9f9;
}

.section-accent {
    background-color: #f5efe0;
}

.section-spacing {
    margin-top: 60px;
}

/* Make titles in dark sections use accent color */
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-primary h1,
.section-primary h2,
.section-primary h3,
.about-hero h1,
.timeline-section h2,
.vision-section h1,
.vision-section h2,
.cta-section h2 {
    color: #c69c6d !important; /* Using the accent color for headings in dark sections */
}

/* Typography - Adding Sorts Mill Goudy font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
}

.section-header p {
    font-family: 'Didact Gothic', sans-serif;
}

blockquote {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
}

/* Typography - Font Styles */
.sorts-font {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif !important;
    font-weight: 400;
}

/* Section headers styling */
.section-header h2 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

/* About Hero Section - Simplified and stable */
.about-hero {
    position: relative;
    padding: 180px 0 100px;
    background: #1a1a1a;
    color: #fff;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 400px;
    /* Force stable centering */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.about-hero .container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    box-sizing: border-box;
    /* Force stable centering for container */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 auto !important;
}

/* Force stable centering for hero elements */
.about-hero h1 {
    color: #c69c6d !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    display: block !important;
    position: relative !important;
}

.about-hero p {
    font-family: 'Didact Gothic', sans-serif;
    font-size: 1.5rem;
    max-width: 800px;
    opacity: 0.9;
    width: 100% !important;
    text-align: center !important;
    margin: 20px auto 0 !important;
    display: block !important;
    position: relative !important;
}

/* Story Section */
.story-section {
    position: relative;
    overflow: hidden;
}

.story-section:after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background-image: url('../img/scissors-pattern.png');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
}

.story-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.story-image img {
    width: 100%;
    transition: transform 0.5s ease;
}

.story-image:hover img {
    transform: scale(1.03);
}

.story-content {
    padding: 30px 0 30px 50px;
    position: relative;
}

.story-content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: -1;
}

.story-content h2 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    margin-bottom: 25px;
    position: relative;
}

.story-content h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Timeline Section */
.timeline-section {
    position: relative;
    background-color: #1a1a1a;
    color: #fff;
}

.timeline-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/barber-pattern.png');
    opacity: 0.05;
    z-index: 0;
}

.timeline {
    position: relative;
    padding: 60px 0;
    z-index: 1;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 5px solid #1a1a1a;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.timeline-content {
    width: 45%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    margin-right: 55px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    margin-left: 55px;
}

.timeline-item:nth-child(odd) .timeline-content:before {
    content: '';
    position: absolute;
    right: -15px;
    top: 20px;
    border-width: 15px 0 15px 15px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.05);
}

.timeline-item:nth-child(even) .timeline-content:before {
    content: '';
    position: absolute;
    left: -15px;
    top: 20px;
    border-width: 15px 15px 15px 0;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.05) transparent transparent;
}

.timeline-content:hover:before {
    border-color: transparent rgba(255, 255, 255, 0.1) transparent transparent;
}

.timeline-item:nth-child(odd) .timeline-content:hover:before {
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.1);
}

.timeline-content h3 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.timeline-year {
    display: inline-block;
    padding: 5px 10px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: 'Didact Gothic', sans-serif;
}

/* Name Origin Section */
.name-origin {
    text-align: center;
    padding: 70px 0;
    background-color: rgba(0, 0, 0, 0.02);
}

.name-origin h2 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    margin-bottom: 40px;
    display: inline-block;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.name-card {
    background: rgba(255, 255, 255, 0.95) !important; /* More opaque white background */
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.name-card p {
    color: #000 !important; 
    text-shadow: none !important;
    font-weight: normal !important;
}

.values-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 20px;
}

.values-list li {
    position: relative;
    padding: 15px 15px 15px 40px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    background-color: white;
    color: var(--dark-color);
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
    font-family: 'Didact Gothic', sans-serif;
}

.values-list li:before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    left: 15px;
    top: 15px;
}

.values-list li:hover {
    transform: translateX(5px);
    background-color: #f0f0f0;
}

/* Philosophy Section */
.philosophy-section {
    position: relative;
    overflow: hidden;
}

.philosophy-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/philosophy-bg.jpg') center center no-repeat;
    background-size: cover;
    opacity: 0.03;
    z-index: 0;
}

.philosophy-cards {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.philosophy-card {
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--dark-color); /* Ensure text is dark */
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.philosophy-number {
    position: absolute;
    top: -30px;
    right: -20px;
    font-size: 8rem;
    font-weight: bold;
    color: rgba(198, 156, 109, 0.08);
    line-height: 1;
    z-index: 0;
}

.philosophy-card h3 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--accent-color);
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
}

.philosophy-card p {
    position: relative;
    z-index: 1;
    color: var(--dark-color); /* Explicitly set paragraph text to dark */
}

/* Vision Section */
.vision-section {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('../img/vision-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 0;
}

.vision-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.vision-content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: -1;
}

.vision-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.vision-list li {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 10px;
    flex: 0 0 calc(33.33% - 20px);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Didact Gothic', sans-serif;
    font-weight: 500 !important;
}

.vision-list li:before {
    content: '\f138';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color);
    margin-right: 10px;
}

.vision-list li:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.vision-list li:hover:before {
    color: #fff;
}

/* Quote Section */
.quote-section {
    padding: 80px 0;
    text-align: center;
}

.quote {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

blockquote {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 1.8rem;
    line-height: 1.6;
    position: relative;
    padding: 30px 60px;
}

blockquote:before, blockquote:after {
    content: '"';
    font-size: 6rem;
    color: var(--accent-color);
    opacity: 0.2;
    position: absolute;
}

blockquote:before {
    left: 0;
    top: -20px;
}

blockquote:after {
    right: 0;
    bottom: -50px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../img/cta-background.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 30px;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.cta-content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: -1;
}

.cta-section h2 {
    font-family: 'Sorts Mill Goudy', Georgia, 'Times New Roman', Times, serif;
    color: #fff;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.cta-section p {
    font-family: 'Didact Gothic', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-section .btn {
    font-family: 'Didact Gothic', sans-serif;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.cta-section .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background-color: #b78b5c;
    border-color: #b78b5c;
}

/* Animation Effects */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 {
    transition-delay: 0.2s;
}

.animate-delay-2 {
    transition-delay: 0.4s;
}

.animate-delay-3 {
    transition-delay: 0.6s;
}

/* Text shadows for section titles on wood backgrounds */
.services .section-header h2,
.pricing .section-header h2,
.gallery .section-header h2,
.partners .section-header h2,
section.services h2,
section.pricing h2,
section.gallery h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
}

/* Make the text in the name-card explicitly black */
.name-card p {
    color: #000 !important; 
}

/* Add black shadow to all headings on wood backgrounds */
section.services h2,
section.pricing h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Ensure all wood background section titles have proper shadow and contrast */
section.services .section-header h2,
section.services h2.sorts-font,
section.pricing h2.sorts-font,
section.gallery h2.sorts-font {
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Wood background text enhancement */
.services p, 
.pricing p, 
.gallery p,
.services li, 
.pricing li, 
.gallery li,
.services .section-header p,
.pricing .section-header p,
.gallery .section-header p {
    color: #ffffff !important;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9) !important;
    font-weight: 500 !important;
    font-size: 1.05em !important;
    line-height: 1.6 !important;
    letter-spacing: 0.01em !important;
}

/* Add semi-transparent background to paragraph containers for better readability */
.story-content, .vision-content, .cta-content {
    position: relative;
}

.story-content:before, .vision-content:before, .cta-content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: -1;
}

/* Improve text in name card section */
.name-card p {
    color: #000 !important;
    text-shadow: none !important;
    font-weight: normal !important;
}

.name-card {
    background-color: rgba(255, 255, 255, 0.95) !important; /* More opaque white background */
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Enhance the vision list items */
.vision-list li {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    font-weight: 500 !important;
}

/* Update the heading styles on wood background for better visibility */
.services h2,
.pricing h2,
.gallery h2,
.services h3,
.pricing h3,
.gallery h3 {
    color: #fff !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
    font-size: 2.3rem !important;
}

/* Make sure all buttons are clearly visible */
.services .btn,
.pricing .btn,
.gallery .btn {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .about-hero {
        padding: 150px 0 80px;
        text-align: center;
        position: relative;
        width: 100%;
        min-height: auto;
        overflow: hidden;
    }
    
    .about-hero .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin: 0 auto;
        position: relative;
    }
    
    .about-hero h1 {
        font-size: 3rem;
        width: 100%;
        margin: 0 auto;
        text-align: center;
        position: relative;
    }
    
    .about-hero p {
        width: 100%;
        margin: 20px auto 0;
        text-align: center;
        position: relative;
    }
    
    .story-content {
        padding: 30px 0;
    }
    
    .vision-list li {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 120px 0 60px;
        text-align: center;
        position: relative;
        width: 100%;
        overflow: hidden;
    }
    
    .about-hero .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin: 0 auto;
        position: relative;
    }
    
    .about-hero h1 {
        font-size: 2.5rem;
        width: 100%;
        margin: 0 auto;
        text-align: center;
        position: relative;
    }
    
    .about-hero p {
        font-size: 1.2rem;
        width: 100%;
        margin: 20px auto 0;
        text-align: center;
        position: relative;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content:before,
    .timeline-item:nth-child(even) .timeline-content:before {
        left: -15px;
        top: 20px;
        border-width: 15px 15px 15px 0;
        border-color: transparent rgba(255, 255, 255, 0.05) transparent transparent;
    }
    
    .timeline-item:nth-child(odd) .timeline-content:hover:before,
    .timeline-item:nth-child(even) .timeline-content:hover:before {
        border-color: transparent rgba(255, 255, 255, 0.1) transparent transparent;
    }
    
    .philosophy-cards {
        flex-direction: column;
    }
    
    .philosophy-card {
        margin-bottom: 30px;
    }
    
    .vision-list li {
        flex: 0 0 100%;
    }
    
    blockquote {
        font-size: 1.3rem;
        padding: 20px 40px;
    }
}

/* Extra small device adjustments */
@media (max-width: 576px) {
    .about-hero {
        padding: 100px 0 50px;
    }
    
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-hero p {
        font-size: 1rem;
    }
    
    .story-image {
        margin-bottom: 20px;
    }
    
    .story-content {
        padding: 20px;
    }
}
