/*
Theme Name: Galvanic Works
Theme URI: https://galvanicworks.com
Author: Piero Zucchelli
Author URI: https://galvanicworks.com
Description: Custom theme for Galvanic Works - Maritime safety technology with professional brand colors and modern design
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: galvanic-works
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================
   GALVANIC WORKS BRAND DESIGN SYSTEM
   Navy Blue (#1e3a5f) + Electric Orange (#f59e0b)
   ============================================ */

:root {
    /* Brand Colors */
    --navy-blue: #1e3a5f;
    --electric-orange: #f59e0b;
    --charcoal: #2C3E50;
    --white: #ffffff;
    --light-gray: #ECF0F1;
    --slate-gray: #64748b;
    --black: #000000;

    /* Spacing - Reduced by 30% for tighter, more polished look */
    --space-xs: 6px;
    --space-sm: 11px;
    --space-md: 17px;
    --space-lg: 22px;
    --space-xl: 34px;
    --space-2xl: 45px;
    --space-3xl: 67px;

    /* Typography */
    --font-primary: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition: 0.3s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Smooth anchor scrolling with offset for fixed header */
html {
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--charcoal);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(30, 58, 95, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.02) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--navy-blue);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

h1 {
    letter-spacing: -0.03em;
}

h2 {
    letter-spacing: -0.025em;
}

h1 { font-size: 4.5rem; }
h2 { font-size: 3.5rem; }
h3 { font-size: 2.5rem; }
h4 { font-size: 1.75rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.75rem; }
}

p {
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

/* Make numbers in statistics more impactful with gradients */
.entry-content div[style*="font-size: 3"],
.entry-content div[style*="font-size: 4"],
.entry-content div[style*="font-size: 5"] {
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    background: linear-gradient(135deg, var(--electric-orange) 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


a {
    color: var(--electric-orange);
    text-decoration: none;
    position: relative;
    transition: color var(--transition);
}

/* Animated underline on hover */
.entry-content a:not(.button):not(.wp-block-button__link) {
    background-image: linear-gradient(var(--electric-orange), var(--electric-orange));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease, color 0.3s ease;
}

.entry-content a:not(.button):not(.wp-block-button__link):hover {
    background-size: 100% 2px;
    color: var(--navy-blue);
}

a:hover {
    color: var(--navy-blue);
}

/* ============================================
   LAYOUT
   ============================================ */

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    width: 100%;
}

@media (max-width: 768px) {
    .site-content {
        padding: var(--space-xl) var(--space-sm);
    }
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background-color: #1e3a5f;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 20px rgba(30, 58, 95, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4px var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.75rem;
    margin: 0;
}

.site-title a {
    font-family: var(--font-display);
    color: var(--navy-blue);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.site-title a:hover {
    color: var(--electric-orange);
}

.custom-logo-link img {
    height: 120px;
    width: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--space-lg);
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-family: var(--font-display);
    color: var(--white);
    font-weight: 600;
    font-size: 1.25rem;
    padding: var(--space-xs) 0;
    position: relative;
    letter-spacing: -0.01em;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--electric-orange);
}

.main-navigation .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: var(--electric-orange);
    border-radius: 2px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: var(--electric-orange);
    color: var(--white);
    border: none;
    padding: var(--space-sm) var(--space-md);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.toggled {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-top: 1px solid var(--light-gray);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .main-navigation.toggled ul {
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    background-color: var(--electric-orange);
    color: var(--white);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--navy-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 58, 95, 0.3);
}

/* ============================================
   CONTENT
   ============================================ */

/* Hide all page titles and headers */
.entry-header {
    display: none !important;
}

.entry-title {
    color: var(--navy-blue);
    margin-bottom: var(--space-md);
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.entry-content h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--electric-orange);
    margin-bottom: var(--space-sm);
    border-radius: 2px;
}

.entry-content ul,
.entry-content ol {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.entry-content li {
    margin-bottom: var(--space-xs);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08);
}

.entry-meta {
    color: var(--slate-gray);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.entry-meta a {
    color: var(--electric-orange);
}

/* Card Elements with Enhanced Shadows and Borders */
.wp-block-group,
.wp-block-column,
.wp-block-media-text {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--electric-orange);
    border-radius: 8px;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.wp-block-group::before,
.wp-block-column::before,
.wp-block-media-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.3), transparent);
}

.wp-block-group:hover,
.wp-block-column:hover,
.wp-block-media-text:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: linear-gradient(180deg, var(--navy-blue) 0%, #14283d 100%);
    color: var(--white);
    padding: var(--space-2xl) var(--space-lg) var(--space-lg) var(--space-lg);
    border-top: 3px solid var(--electric-orange);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.site-info {
    text-align: center;
    font-size: 0.875rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-info a {
    color: var(--electric-orange);
}

.site-info a:hover {
    color: var(--white);
}

.site-info ul {
    list-style: none;
    display: inline-flex;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.site-info li {
    display: inline;
}

.footer-separator {
    color: var(--white);
}

/* ============================================
   FORMS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--electric-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* ============================================
   UTILITIES
   ============================================ */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.alignleft {
    float: left;
    margin-right: var(--space-md);
}

.alignright {
    float: right;
    margin-left: var(--space-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

::selection {
    background-color: var(--navy-blue);
    color: var(--white);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations to content blocks */
.entry-content > * {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.entry-content > *:nth-child(1) { animation-delay: 0.1s; }
.entry-content > *:nth-child(2) { animation-delay: 0.2s; }
.entry-content > *:nth-child(3) { animation-delay: 0.3s; }
.entry-content > *:nth-child(4) { animation-delay: 0.4s; }
.entry-content > *:nth-child(5) { animation-delay: 0.5s; }
.entry-content > *:nth-child(6) { animation-delay: 0.6s; }
.entry-content > *:nth-child(7) { animation-delay: 0.7s; }
.entry-content > *:nth-child(8) { animation-delay: 0.8s; }

/* Section dividers */
.entry-content > div + div {
    position: relative;
}

.entry-content > div + div::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--electric-orange), transparent);
    opacity: 0.3;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

*:focus-visible {

/* =============================================
   LANGUAGE SWITCHER & RESPONSIVE MENU
   Single clean implementation - 2025-11-25
   ============================================= */

/* Language Switcher Dropdown */
.language-switcher select {
    appearance: none;
    -webkit-appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M5 7L1 3h8z'/%3E%3C/svg%3E") no-repeat right 6px center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 22px 4px 8px;
    font-size: 12px;
    font-family: 'Manrope', sans-serif;
    color: #1e3a5f;
    cursor: pointer;
}

.language-switcher select:hover {
    border-color: #f59e0b;
}

/* Hamburger hidden by default */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #1e3a5f;
    border-radius: 4px;
    font-size: 20px;
    padding: 4px 10px;
    cursor: pointer;
    color: #1e3a5f;
    line-height: 1;
    flex-shrink: 0;
}

/* RESPONSIVE: Hamburger at 1400px - EARLY SWITCH */
@media (max-width: 1400px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation.toggled ul {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .main-navigation.toggled li {
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation.toggled li a {
        display: block;
        padding: 12px 0;
    }
}

/* MOBILE: Compact header at small widths */
@media (max-width: 480px) {
    .header-inner {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .custom-logo-link img {
        max-width: 130px;
        height: auto;
    }
    
    .menu-toggle {
        font-size: 18px;
        padding: 3px 8px;
    }
    
    .language-switcher select {
        padding: 3px 18px 3px 6px;
        font-size: 11px;
    }
}

/* Global font size reduction ~10% */
html, body, .site-content, .entry-content, p, li, td, th, span, div { font-size: 13px !important; }
@media (max-width: 600px) { html { font-size: 12.5px; } }
h1, .entry-title { font-size: 1.8em !important; }
h2 { font-size: 1.5em !important; }
h3 { font-size: 1.3em !important; }
h4, h5, h6 { font-size: 1.1em !important; }

/* Mobile text overflow fix */
@media (max-width: 600px) {
    .wp-block-cover, .wp-block-group, .wp-block-column, .entry-content, .site-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    .wp-block-cover__inner-container, .wp-block-group__inner-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    h1, h2, h3, p {
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
}

/* Ensure text is visible - fallback dark backgrounds for white text sections */
@media (max-width: 600px) {
    [style*="color: white"], [style*="color:white"], .has-white-color {
        text-shadow: 0 0 3px rgba(0,0,0,0.8) !important;
    }
    .wp-block-cover, .wp-block-media-text, [style*="background"][style*="color: white"] {
        background-color: #1e3a5f !important;
    }
}
