/* =========================================================================
   CORE STYLES
   ========================================================================= */

/* Use CSS variables for easy theming and rapid prototyping */
:root {
    --color-primary: #ff4500;
    --color-secondary: #97f302;
    --color-bg-dark: #000000;
    --color-bg-nav: rgba(78, 90, 119, 0.95);
    --color-text-light: #ffffff;
    --color-text-dark: #333333;
    --font-primary: Arial, Verdana, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: #f7f7f7;
    color: var(--color-text-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Center the entire site layout on large monitors */
.wrapper {
    max-width: 1440px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Reusable Utility Classes */
.text-center { text-align: center; }
.divider {
    width: 60px;
    height: 2px;
    background: var(--color-bg-dark);
    border: none;
    margin: 15px auto 40px auto;
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */

.main-header {
    width: 100%;
    /* Fixed background creates a cool parallax-like effect */
    background-image: url("resources/resized-yuriy-garnaev-395879-unsplash.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    position: relative;
}

/* The Navigation uses CSS Flexbox to align items perfectly along the top row */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-nav);
    padding: 0 40px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav .logo {
    color: var(--color-text-light);
    font-size: 32px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}

.nav-links li a {
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--color-secondary);
}

.social-links li a {
    color: var(--color-text-light);
    background: var(--color-bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-links li a:hover {
    background: var(--color-secondary);
    color: var(--color-bg-dark);
}

/* Hero Content Area layout via flexbox for perfect centering */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 530px;
    background: rgba(0,0,0,0.3); /* Darkens the image slightly for text legibility */
    padding: 40px;
    color: var(--color-text-light);
}

.hero-content h3 {
    font-size: 30px;
    color: var(--color-secondary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content h2 {
    font-size: 24px;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* Form Styles */
.subscribe-form {
    display: flex;
    border: 2px solid var(--color-primary);
    border-radius: 5px;
    overflow: hidden;
    background: var(--color-text-light);
}

.subscribe-form input {
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    width: 300px;
    outline: none;
}

.subscribe-form button {
    border: none;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-size: 18px;
    padding: 15px 30px;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: #d43b01;
}

/* =========================================================================
   MAIN CONTENT SECTIONS
   ========================================================================= */

/* Welcome Section - Flexbox layout splitting into 50/50 columns */
.welcome-section {
    display: flex;
}

.welcome-image img {
    height: 100%;
    object-fit: cover;
}

.welcome-image, .welcome-text {
    flex: 1; /* Both take 50% width equally */
}

.welcome-text {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-text h4 {
    color: var(--color-secondary);
    font-size: 28px;
    margin: 0 0 10px 0;
}

.welcome-text h5 {
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 20px 0;
}

.welcome-text p {
    line-height: 1.8;
    margin-bottom: 30px;
    color: #cccccc;
}

.btn-outline {
    align-self: flex-start;
    color: var(--color-text-light);
    border: 2px solid var(--color-text-light);
    padding: 12px 30px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--color-text-light);
    color: var(--color-bg-dark);
}

/* Headers for inner sections */
.tips-tricks-section,
.news-header-section,
.testimonials-header-section {
    padding: 60px 0 20px 0;
}

.tips-tricks-section h2,
.news-header-section h2,
.testimonials-header-section h2 {
    color: var(--color-secondary);
    font-size: 32px;
    margin: 0 0 10px 0;
}

/* Guides Section - CSS Grid makes laying out 4 blocks seamless */
.guides-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 350px;
}

.guides-section aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.card-orange {
    background: var(--color-primary);
    color: var(--color-text-light);
}

.card-green {
    background: var(--color-secondary);
    color: var(--color-text-light);
}

.guides-section aside h4 {
    font-size: 26px;
    margin-bottom: 15px;
}

.guides-section figure {
    margin: 0;
}

.guides-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* News Articles Grid - 2x2 grid using CSS Grid */
.news-articles-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px 60px 80px 60px;
}

.news-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.news-card figure {
    margin: 0;
    flex-shrink: 0;
}

.news-card img {
    border: 3px solid #d3d3d3;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.news-content h1 {
    font-size: 20px;
    margin: 5px 0;
    color: var(--color-bg-dark);
}

.news-content h5 {
    color: var(--color-primary);
    margin: 0 0 15px 0;
    font-size: 14px;
}

.news-content p {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
}

/* Services Section - Uses a background image overlaid with flexbox cards */
.services-section {
    background-image: url("resources/servicesbackground.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.services-bg-overlay {
    background: rgba(0,0,0,0.6);
    padding: 60px;
    color: var(--color-text-light);
}

.services-bg-overlay h2 {
    color: var(--color-secondary);
    font-size: 32px;
    margin: 0 0 10px 0;
}

.services-bg-overlay .divider {
    background: var(--color-text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
}

.service-card i {
    font-size: 45px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 15px;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials-content {
    padding: 0 60px 80px 60px;
}

.testimonial-card {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    background: #f1f1f1;
    padding: 40px;
    border-radius: 12px;
}

.testimonial-card img {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-card h4 {
    font-size: 24px;
    margin: 0 0 5px 0;
    color: var(--color-primary);
}

.testimonial-card h5 {
    color: #666;
    margin: 0 0 20px 0;
    font-style: italic;
    font-size: 16px;
}

.testimonial-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* Footer Information Grid */
.footer-info-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 60px;
    background: var(--color-bg-dark);
    color: var(--color-text-light);
}

.info-block h3 {
    font-size: 20px;
    color: var(--color-text-light);
    margin-bottom: 25px;
}

.info-block p {
    color: #999;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tweet {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.tweet i {
    color: var(--color-secondary);
    font-size: 20px;
    margin-top: 5px;
}

.tweet a {
    color: var(--color-primary);
    text-decoration: none;
}

.events ul, .footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.events li {
    margin-bottom: 15px;
    color: #999;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.events li time {
    color: var(--color-secondary);
    font-weight: bold;
    margin-right: 10px;
}

.events li a {
    color: #999;
    text-decoration: none;
}

.events li a:hover {
    color: var(--color-text-light);
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav li a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav li a:hover {
    color: var(--color-secondary);
}

/* Main Footer */
.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    color: #666;
    padding: 20px 60px;
    font-size: 14px;
}

.back-to-top img {
    transition: transform 0.3s ease;
}

.back-to-top:hover img {
    transform: translateY(-5px);
}
