/* RED'S TREE SERVICE - OPTIMIZED CSS */
/* Color Palette:
   #2a406a - deep blue (primary)
   #b72941 - rustic red (accent)
   #eb6724 - burnt orange (buttons)
   #7c7d9b - muted purple (headers)
   #f6f6f6 - light gray (cards)
   #ffffff - white (background)
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2a406a;
    background-color: #ffffff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6, p {
    margin-bottom: 1rem;
    color: #2a406a;
}

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

p {
    margin-bottom: 1rem;
}

.text-light,
.text-light h1, 
.text-light h2, 
.text-light h3, 
.text-light h4, 
.text-light h5, 
.text-light h6, 
.text-light p {
    color: #ffffff;
    background-color: #7c7d9b;
}

/* Navigation */
.navbar {
    background-color: #2a406a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding-left: 1rem;
}

.nav-logo a:hover {
    color: #b72941;
    text-decoration: underline;
}

.nav-logo p {
    padding-left: 1rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #ffffff;
    color: #b72941;
    text-decoration: underline;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Footer */
footer {
    background-color: #2a406a;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 1rem;
    padding-left: 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-text,
.footer-text h1, 
.footer-text h2, 
.footer-text h3, 
.footer-text h4, 
.footer-text h5, 
.footer-text h6, 
.footer-text p {
    color: #ffffff;
    background-color: #2a406a;
    
}



.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-section a:hover {
    color: #b72941;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #fafcfd;
}

/* 404 Section */
.four0four {
    background: white url('/images/backgrounds/404.jpg');
    background-color: white;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    min-height: 80vh;
}
.four0four-content {
    max-width: 80%;
    margin: 0 auto;
    width: 80%;
    text-align: center;
}

/* 403 FORBIDDEN Section */
.four0three {
    background: white url('/images/backgrounds/403.jpg');
    background-color: white;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    min-height: 80vh;
}
.four0three-content {
    max-width: 80%;
    margin: 0 auto;
    width: 80%;
    text-align: center;
}

/* Hero Section */
.hero {
    background: white url('/images/backgrounds/background.jpg');
    background-color: white;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    min-height: 80vh;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.hero-content {
    max-width: 80%;
    margin: 0 auto;
    width: 80%;
    text-align: center;
}

.hero-content h1 {
    color: #2a406a;
    font-size: 3rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.hero-content p {
    color: #2a406a;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: #eb6724;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #b72941;
}

.txt-btn {
    background: none;
    border: none;
    text-decoration: none;
    color: #eb6724;
    cursor: pointer;
    font-weight: bold;
}

.txt-btn:hover {
    color: #b72941;
}

.btn-admin {
    display: inline-block;
    background-color: gray;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-admin:hover {
    background-color: #eb6724;
    color: white;
}

.btn-admin-delete {
    display: inline-block;
    background-color: #b72941;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-admin-delete:hover {
    background-color: #b72941;
    color: black;
}

/* Page Header */
.page-header {
    background: #7c7d9b;
    color: white;
    padding: 2rem 0 2rem;
    text-align: center;
}

.page-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
}

.page-header p {
    color: #ffffff;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 1rem 0;
    background-color: white;
    text-align: center;
}

.features h2 {
    text-align: center;
    margin-bottom: 1rem;
}

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

.feature-card {
    background: #f6f6f6;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.feature-card h1, h2, h3, h4, h5, h6, p {
    color: #2a406a;
    margin-bottom: 1rem;
}

.feature-card ul {
    list-style-type: none;
    padding-left: 0;
    text-align: left;
}

.feature-card ul li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

.feature-card ul li:before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

/* Portfolio */
.portfolio-gallery {
    padding: 2rem 0 4rem;
}

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    max-width: 300px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Contact Section */
.contact-section {
    padding: 0rem 0;
}

.contact-grid {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.contact-form {
    flex: 1; /* grows and takes available space */
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-info {
    flex: 1 1 0;                  /* ← key change: now grows to match .contact-form */
    padding: 1rem;
    display: flex;           /* ← add this */
    justify-content: center; /* ← centers horizontally */
    align-items: center;     /* ← centers vertically if needed */
}

.contact-details {
    margin-top: 2rem;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

/* Contact Protection Styles */
.contact-reveal {
    flex: 1; /* grows and takes available space */
    padding: 1rem;
    display: flex;           /* ← add this */
    justify-content: center; /* ← centers horizontally */
    align-items: center;     /* ← centers vertically if needed */    
    margin-bottom: 0rem;
    width: 100%;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    color: #2a406a;
    margin-bottom: 0.5rem;
}

.reveal-btn {
    background-color: #eb6724;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.reveal-btn:hover {
    background-color: #b72941;
}

.hidden-info {
    display: none;
    margin-top: 0px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #b72941;
    border-radius: 8px;
    width: 100% !important;
    
}

.hidden-info .contact-item:last-child {
    margin-bottom: 0;
}

.hidden-info h4 {
    margin-bottom: 0px;
    color: #2a406a;
    font-size: 1.1rem;
}

.hidden-info p {
    margin: 0;
    color: #2a406a;
}

.hidden-info a {
    color: #2a406a;
    text-decoration: none;
}

.hidden-info a:hover {
    color: #b72941;
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    background: white;
    color: white;
    padding: 0rem 0;
    text-align: center;
}

.cta-section h2 {
    color: #2a406a;
    background: white;
    margin-bottom: 0rem;
}

.cta-section p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #2a406a;
    background: white;
}

/* Recent Work */
.recent-work {
    padding: 0 0;
    background-color: white;
    text-align: center;
}

.recent-work h2 {
    margin-bottom: 0rem;
}

.recent-work p {
    margin-bottom: 1rem;
    color: #666;
}

/* About Page Styles */
.about-content {
    padding: 1rem 0;
}

.about-content ul {
    list-style: none;
    padding-left: 0rem;
}

.about-content li::before {
    content: "✔ ";
    color: green; /* optional */
    margin-right: 0.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.about-image img {
    max-width: 300px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    display: block;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Team Section (Currently Commented Out) */
.team-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.team-member h3 {
    margin-bottom: 0.5rem;
}

.team-member p {
    color: #666;
    margin-bottom: 0;
}

/* Blog Content */
.blog-content {
    padding: 2rem 0;
}

/* JavaScript-Added Styles for Dynamic Features */
.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3) !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Portfolio Animation Styles */
.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
}

/* MOBILE and SMALL SCREEN Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2a406a;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #34495e;
        -webkit-tap-highlight-color: #b72941;
        tap-highlight-color: #b72941;
    }

    .nav-menu .nav-link:active,
    .nav-menu .nav-link:focus {
        background-color: #b72941 !important;
        color: #ffffff !important;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 3rem 0;
        min-height: 50vh;
        background-position: center center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    


    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}