/*
Theme Name: Gravity Expert Theme
Theme URI: https://example.com
Author: Gravity Forms Expert
Description: A lightweight conversion-focused theme for Gravity Forms agency.
Version: 1.0
*/

:root {
    /* BRAND COLORS (From Logo) */
    --primary: #226baa;   /* The new vibrant blue */
    --accent: #ffa537;    /* The new energetic orange */
    --highlight: #226baa; /* Using primary blue for highlights too */
    
    /* TEXT & BACKGROUNDS */
    --bg-light: #f8f9fa;
    --text-dark: #212120; /* The new softer black */
    --text-gray: #666;
    --white: #ffffff;
    
    /* PREMIUM SHADOW (Tinted with the new blue) */
    --shadow: 0 4px 12px rgba(34, 107, 170, 0.15);
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    margin: 0; padding: 0;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }

/* LAYOUT */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    border: none; 
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* Replace existing .btn-green styles with these: */

.btn-green { 
    background-color: var(--accent); 
    color: white;
    /* Adds a subtle gradient to make the orange pop and look premium */
    background-image: linear-gradient(to bottom right, var(--accent), #e6952e);
    box-shadow: 0 2px 5px rgba(255, 165, 55, 0.3); /* Subtle orange glow */
    border: none;
}

.btn-green:hover {
    transform: translateY(-2px);
    /* Stronger glow on hover */
    box-shadow: 0 5px 15px rgba(255, 165, 55, 0.5); 
    opacity: 0.95;
}

.btn-blue { background-color: var(--highlight); color: white; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; color: var(--white) !important}

/* HEADER */
header { background: #fff; border-bottom: 1px solid #eee; padding: 20px 0; position: sticky; top: 0; z-index: 100; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo span { color: var(--highlight); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--primary); }
.nav-links a:hover, .nav-links .current-menu-item a { color: var(--highlight); }

/* HERO */
.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 { font-size: 3rem; color: var(--primary); margin-bottom: 15px; letter-spacing: -1px; }
.hero p { font-size: 1.2rem; color: var(--text-gray); max-width: 600px; margin: 0 auto 40px; }

/* CARDS & GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.card {
    background: #fff; padding: 30px; border-radius: var(--radius);
    border: 1px solid #eee; box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.card:hover { border-color: var(--highlight); transform: translateY(-3px); }

/* PRICING */
.pricing-card { text-align: center; border-top: 4px solid var(--primary); }
.pricing-card.popular { border-top-color: var(--accent); position: relative; }
.pricing-card.popular::before {
    content: "Best Value"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: white; padding: 4px 12px; font-size: 0.8rem; border-radius: 20px;
}
.price { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin: 20px 0; display: block; }
.price span { font-size: 1rem; color: var(--text-gray); font-weight: 400; }

/* FOOTER */
footer { background: var(--primary); color: #fff; padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; color: var(--accent);}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #ccc; }
.footer-col a:hover { color: #fff; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.9rem; color: #888; }

/* FORM ELEMENTS */
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px; }
label { display: block; margin-bottom: 5px; font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; } 
    .hero h1 { font-size: 2rem; }
}

/* --- HAMBURGER MENU STYLES --- */

/* Default: Hidden on Desktop */
.hamburger {
    display: none;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary);
    transition: all 0.3s ease-in-out;
}

/* Mobile View Updates */
@media (max-width: 768px) {
    /* Show the Icon */
    .hamburger {
        display: block;
    }

    /* Transform the Menu */
    .nav-links {
        display: flex; /* Override the 'none' */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Push it right below the header */
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px 0;
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* Animation State: Hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        z-index: 999;
    }

    /* Animation State: Active (Class added by JS) */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Mobile Link Spacing */
    .nav-links a {
        margin: 15px 0;
        font-size: 1.1rem;
    }

    /* Hamburger to 'X' Animation */
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* --- MENU FIXES --- */
.nav-links ul, 
.nav-links li,
.menu-item {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Ensure items align correctly */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Fix mobile alignment so it doesn't break the column layout */
@media (max-width: 768px) {
    .nav-links {
        display: flex; 
        flex-direction: column;
        align-items: flex-start; /* Aligns text to left on mobile */
        padding-left: 20px; /* Adds a little breathing room */
    }
}

/* --- FOOTER MOBILE FIX --- */
@media (max-width: 768px) {
    .footer-col {
        text-align: left !important;
        margin-bottom: 30px; /* Adds space between the two columns */
    }
}

/* --- BUTTON OVERFLOW FIX --- */
.btn {
    box-sizing: border-box !important; /* Includes padding in width calculation */
    max-width: 100%; /* Prevents button from ever exceeding its container */
    white-space: normal; /* Allows text to wrap if it's too long on small phones */
}

/** posts ***/
.entry-title { margin-bottom: 20px; }
.entry-content p { line-height: 1.7; margin-bottom: 18px; }

/* Comment submit button */
.comment-form input[type="submit"] {
    background-color: #1f5faa; /* match your blue */
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.comment-form input[type="submit"]:hover {
    background-color: #174a85;
    transform: translateY(-1px);
}

.comment-form input[type="submit"]:active {
    transform: translateY(0);
}


/* Align comment cookies checkbox nicely */
/* Comment cookies consent: force left alignment + tight spacing */
/* FINAL fix: checkbox directly before text, left aligned */
.comment-form p.comment-form-cookies-consent {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 10px 0 20px 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* checkbox */
.comment-form p.comment-form-cookies-consent input[type="checkbox"] {
    margin: 0 6px 0 0 !important; /* space ONLY to the right */
    position: relative !important;
    left: 0 !important;
}

/* label text */
.comment-form p.comment-form-cookies-consent label {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
    cursor: pointer;
}



.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

.comment-form textarea {
    min-height: 120px;
}



/* FORCE cookies consent checkbox + text to sit together, left-aligned */
p.comment-form-cookies-consent{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  text-align: left !important;
  width: 100% !important;
  margin: 10px 0 20px 0 !important;
  padding: 0 !important;
}

/* Reset any theme positioning on the checkbox */
p.comment-form-cookies-consent input#wp-comment-cookies-consent{
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
}

/* Reset label so it stays right next to checkbox */
p.comment-form-cookies-consent label{
  position: static !important;
  transform: none !important;
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}


/** blog page ***/

/* Blog cards grid */
.blog-index .blog-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 15px;
}

.blog-header {
  margin-bottom: 20px;
}

.blog-title {
  margin: 0 0 10px 0;
}

/* Grid layout */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* Card */
.post-card {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

/* Thumbnail */
.post-card-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.post-card-thumb--empty {
  width: 100%;
  height: 180px;
  background: rgba(0,0,0,0.06);
}

/* Body */
.post-card-body {
  padding: 14px 14px 16px 14px;
}

.post-card-title {
  margin: 0 0 6px 0;
  font-size: 18px;
  line-height: 1.25;
}

.post-card-title a {
  text-decoration: none;
  color: inherit;
}

.post-card-title a:hover {
  text-decoration: underline;
}

.post-card-meta {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 10px;
}

.post-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Read more */
.post-card-readmore {
  font-weight: 600;
  text-decoration: none;
}

.post-card-readmore:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination-wrap {
  margin-top: 24px;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px 6px 0;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px;
  text-decoration: none;
}

.pagination .page-numbers.current {
  font-weight: 700;
}

/** signle post featue image ***/

.entry-featured-image {
  margin: 20px 0 24px 0;
}

.entry-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}



/* Make all images responsive inside post content */
.entry-content img,
.entry-content figure,
.entry-content video,
.entry-content iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* Prevent wide images from overflowing */
.entry-content {
  overflow-wrap: break-word;
}

/* If WP adds alignment classes, keep them responsive */
.entry-content .alignleft,
.entry-content .alignright,
.entry-content .aligncenter {
  max-width: 100% !important;
  height: auto !important;
}


/* Thumbnail images in blog cards: always responsive */
.post-card-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Mobile: make thumbnails taller and nicer */
@media (max-width: 640px) {
  .post-card-thumb img,
  .post-card-thumb--empty {
    height: 210px;
  }
}


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


