/*
Theme Name: TaxMark.AE
Theme URI: https://taxmark.ae
Author: TaxMark.AE
Author URI: https://taxmark.ae
Description: Custom WordPress theme for TaxMark.AE - Your Trusted Partner for Tax & Business Solutions in the UAE
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taxmark
Tags: business, corporate, tax, finance, accounting, dubai, uae
*/

/* ===== Theme Base Styles ===== */
:root {
    --brand-blue: #1e40af;
    --brand-navy: #1e293b;
    --brand-gold: #f59e0b;
    --brand-light: #f8fafc;
}

.gradient-bg {
    background: linear-gradient(135deg, #1e40af 0%, #1e293b 100%);
}

.text-gradient {
    background: linear-gradient(135deg, #1e40af, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hide scrollbars globally */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

*::-webkit-scrollbar {
    display: none; /* WebKit */
}

/* Ensure full viewport usage with no overflow */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    margin: 0;
    padding: 0;
    width: 100% !important;
    position: relative !important;
}

/* Force every element to respect viewport boundaries */
* {
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* Container responsive adjustments */
.container, .max-w-7xl, .max-w-6xl, .max-w-4xl {
    max-width: 100% !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

/* Responsive text sizing */
@media (max-width: 640px) {
    .text-6xl { font-size: 2.5rem !important; line-height: 1.1 !important; }
    .text-5xl { font-size: 2rem !important; line-height: 1.2 !important; }
    .text-4xl { font-size: 1.75rem !important; line-height: 1.2 !important; }
    .text-3xl { font-size: 1.5rem !important; line-height: 1.3 !important; }
    .text-2xl { font-size: 1.25rem !important; line-height: 1.3 !important; }
    .text-xl { font-size: 1.125rem !important; line-height: 1.4 !important; }
    
    /* Responsive padding/margins */
    .py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    .py-12 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .px-8 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .px-6 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    
    /* Grid responsive */
    .grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .lg\\:grid-cols-3 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
    .md\\:grid-cols-2 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}

@media (min-width: 641px) and (max-width: 768px) {
    .text-6xl { font-size: 3rem !important; line-height: 1.1 !important; }
    .text-5xl { font-size: 2.5rem !important; line-height: 1.2 !important; }
    
    .py-20 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
    .py-16 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    
    .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .lg\\:grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Responsive images */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Responsive cards */
.bg-white.rounded-xl, .bg-white.rounded-lg {
    margin: 0.5rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Hero section responsive */
.min-h-screen {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
}

/* Navigation responsive */
nav {
    width: 100% !important;
    max-width: 100vw !important;
}

/* Prevent horizontal overflow */
.overflow-hidden {
    overflow: hidden !important;
}

/* Responsive spacing utilities */
@media (max-width: 640px) {
    .space-y-8 > * + * { margin-top: 1.5rem !important; }
    .space-y-6 > * + * { margin-top: 1rem !important; }
    .space-y-4 > * + * { margin-top: 0.75rem !important; }
    
    .gap-8 { gap: 1.5rem !important; }
    .gap-6 { gap: 1rem !important; }
    .gap-4 { gap: 0.75rem !important; }
}

/* Ensure sections fit viewport */
section {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* Responsive buttons */
@media (max-width: 640px) {
    .btn, button {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
}

/* Gradient background responsive */
.gradient-bg {
    width: 100% !important;
    max-width: 100vw !important;
}
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.scroll-smooth {
    scroll-behavior: smooth;
}
.stats-counter {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(30, 64, 175, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stats-counter:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.2);
}

/* Popup Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    display: flex !important;
}
.modal-container {
    position: relative;
    transform: scale(0.9);
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}
.modal-header {
    background: linear-gradient(135deg, #1e40af, #1e293b);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    text-align: center;
    position: relative;
}

.modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.modal-subtitle {
    color: #64748b;
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #1e40af, #1e293b);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.consultation-link {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}
.consultation-link a {
    color: #f59e0b;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ===== Custom Logo Styling ===== */
.custom-logo-link {
    display: inline-block;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
    transition: opacity 0.3s ease;
}

.custom-logo-link:hover img {
    opacity: 0.9;
}

/* ===== Secondary Logo Styling ===== */
.secondary-logo-container {
    display: block;
}

.secondary-logo {
    max-height: 64px;
    width: auto;
    transition: opacity 0.3s ease;
}

.secondary-logo:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .custom-logo-link img {
        max-height: 40px;
    }
    
    .secondary-logo {
        max-height: 50px;
    }
}

/* Mobile Modal Responsive Fixes */
@media (max-width: 640px) {
    .modal-container {
        width: 95% !important;
        max-width: 95% !important;
        margin: 0 auto !important;
        max-height: 95vh !important;
        border-radius: 12px !important;
    }
    
    .modal-header {
        padding: 16px !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .modal-title {
        font-size: 20px !important;
        line-height: 1.2 !important;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-subtitle {
        font-size: 13px !important;
        margin-bottom: 16px !important;
    }
    
    .form-group {
        margin-bottom: 16px !important;
    }
    
    .form-label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    .form-input, .form-select, .form-textarea {
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
    
    .form-textarea {
        min-height: 60px !important;
    }
    
    .btn-submit {
        padding: 12px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
    }
    
    .modal-close {
        width: 28px !important;
        height: 28px !important;
        top: 12px !important;
        right: 12px !important;
        font-size: 18px !important;
    }
    
    .consultation-link {
        padding: 12px !important;
        margin-top: 16px !important;
        font-size: 13px !important;
    }
    
    .modal-footer p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}

/* Additional WordPress specific styles */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.alignleft {
    float: left;
    margin: 0.5em 1em 0.5em 0;
}
.alignright {
    float: right;
    margin: 0.5em 0 0.5em 1em;
}
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.gallery-caption {
    display: block;
}
.bypostauthor {
    display: block;
}
