/* ========== MASTER STYLE.CSS - SG MULTI TOOLS ========== */
/* Dark theme with cyan accent - Professional & Uniform */
/* Version 2.0 - Updated with social media links and Adsterra ads */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #E8DE99;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== NAVBAR ========== */
.navbar {
    background: #1c222d;
    width: 100%;
    padding: 0 5%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #42f8f5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-sg {
    background: #42f8f5;
    color: #1c222d;
    font-weight: 800;
    font-size: 1.8rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(66, 248, 245, 0.4);
}

.logo-text {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

.logo-text span {
    color: #42f8f5;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    background: #42f8f5;
    color: #1c222d;
    border-color: #42f8f5;
    box-shadow: 0 0 15px rgba(66, 248, 245, 0.5);
}

/* ========== HERO SECTION ========== */
.hero {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto 10px;
    padding: 0 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1c222d;
    margin-bottom: 5px;
}

.hero h1 span {
    color: #1c222d;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #4A3B2C;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== MAIN GRID ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 10px auto 50px;
    padding: 0 20px;
}

/* ========== UNIFORM TOOL CARDS ========== */
.tool-card {
    background: #1c222d;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #42f8f5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(66, 248, 245, 0.2);
    border-color: #42f8f5;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tool-icon {
    font-size: 2rem;
    color: #42f8f5;
}

.tool-badge {
    background: #12151a;
    color: #42f8f5;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #42f8f5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-card h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-description {
    color: #c5d1de;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 16px;
    flex-grow: 1;
}

.open-tool-btn {
    display: inline-block;
    background: transparent;
    color: #42f8f5;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 0;
    border-top: 1px solid #2a4055;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.tool-card:hover .open-tool-btn {
    color: #1c222d;
    background: #42f8f5;
    padding: 8px 12px;
    border-radius: 30px;
    border-top: none;
    box-shadow: 0 0 15px rgba(66, 248, 245, 0.6);
}

.open-tool-btn i {
    margin-left: 6px;
    font-size: 0.7rem;
}

/* ========== FOOTER ========== */
.footer {
    background: #1c222d;
    width: 100%;
    padding: 40px 20px 30px;
    border-top: 3px solid #42f8f5;
    margin-top: 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links li a:hover {
    color: #42f8f5;
}

/* Social Media Row */
.social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    color: #ffffff;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.social-item:hover .social-icon {
    color: #42f8f5;
}

.social-link {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #42f8f5 !important;
}

/* Adsterra Ad Container */
.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    background: #12151a;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #42f8f5;
}

/* Adsterra Text Link */
.ad-link {
    text-align: center;
    margin: 5px 0 10px 0;
}

.ad-link a {
    color: #42f8f5;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #42f8f5;
    padding: 8px 25px;
    border-radius: 30px;
    display: inline-block;
    transition: all 0.3s ease;
    background: transparent;
    font-weight: 500;
}

.ad-link a:hover {
    background: #42f8f5;
    color: #1c222d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 248, 245, 0.4);
}

.ad-link i {
    margin-right: 8px;
}

.copyright {
    color: #ffffff;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* ========== RESPONSIVE MEDIA QUERIES ========== */
/* Tablet Landscape - 3 columns */
@media screen and (max-width: 1000px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Tablet Portrait - 2 columns */
@media screen and (max-width: 700px) {
    .navbar {
        height: auto;
        padding: 15px 5%;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 5px;
    }
    
    .hero {
        margin: 10px auto 5px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .social-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding-left: 20px;
        width: 100%;
    }
    
    .social-item {
        width: 100%;
    }
}

/* ===== MOBILE - 1 column (with requested changes) ===== */
@media screen and (max-width: 500px) {
    body {
        padding: 0;
    }
    
    .navbar {
        padding: 12px 15px;
    }
    
    .logo-sg {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    /* ===== REVISED NAV LINKS - Home, About, Contact in one line ===== */
    .nav-links {
        display: flex;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 6px 12px;
        white-space: nowrap;
    }
    
    /* Hide Tools tab on mobile */
    .nav-links a[href="tools.html"] {
        display: none;
    }
    
    /* ===== REVISED HERO SECTION ===== */
    .hero {
        margin: 8px auto 3px;
        position: relative;
    }
    
    /* Hide original hero h1 content */
    .hero h1 {
        font-size: 0;
        margin: 0;
        position: relative;
        height: 40px;
    }
    
    /* Show new title "SG Multi Tools" */
    .hero h1::before {
        content: "SG Multi Tools";
        font-size: 1.8rem;
        font-weight: 700;
        color: #1c222d;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        text-align: center;
        visibility: visible;
    }
    
    /* Hide original description */
    .hero-description {
        font-size: 0;
        margin: 5px 0 0;
        position: relative;
        height: 25px;
    }
    
    /* Show new description */
    .hero-description::after {
        content: "Reliable free online tools.";
        font-size: 0.95rem;
        color: #4A3B2C;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        text-align: center;
        visibility: visible;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 5px;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .footer {
        padding: 30px 15px 20px;
    }
    
    .footer-links {
        gap: 12px;
    }
    
    .footer-links li a {
        font-size: 0.85rem;
    }
    
    .social-link {
        font-size: 1rem;
    }
    
    .social-icon {
        font-size: 1rem;
    }
    
    .ad-link a {
        padding: 6px 20px;
        font-size: 0.8rem;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
}

/* Small Mobile */
@media screen and (max-width: 350px) {
    .nav-links {
        gap: 5px;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .hero h1::before {
        font-size: 1.5rem;
    }
    
    .footer-links {
        gap: 8px;
    }
    
    .footer-links li a {
        font-size: 0.75rem;
    }
}
